Skip to main content

FLL EV3 Robot

This blog post is about our current EV3 robot we're planning to use in the 2023/2024 FLL competition. Some features: 2 large motors for steering. 2 medium motors for attachments.  2 colour sensors for picking up the white and black lines, also used for line squaring. 1 gyro sensor. To enable attachments to be changed as quickly as possible we're using gravity to keep the gears connected, i.e. you don't need to fasten anything to the robot. Every attachment has 2x 12 tooth double bevel gear (part 32270) which comes in contact with the 2x 20 tooth double bevel gears (part 32269) on the robot. The medium motors are horizontally aligned on the robots, but we use 12 tooth double bevel gears to convert that to vertical alignments. These in turn are connected to 20 tooth double bevel gears, and the attachments in turn connect to these 20 tooth double bevel gears with their 12 tooth double bevel gears.  The complete robot is modelled in Bricklink Studio 2 . You can download the rob

8051 ROM replaced with SRAM

Compare this schematic to the 8051 schematic posted earlier.

U6 (2764 8kb ROM chip) was replaced with a 6264 8kB SRAM chip. The idea is that the 8051 will still be able to access this chip as an external ROM chip using PSEN#, but also as external RAM. This way it is possible to download firmware to SRAM and execute the firmware as if it was stored on ROM.

Comparing the DIP pinouts between SRAM (6264 8kb SRAM) and ROM (2764 8kB ROM), we can see that the two chips follow more or less the same pin layout, except for the address pins:






























PinSRAMROM
1N/CVpp
2A4A12
3A5A7
4A6A6
5A7A5
6A8A4
7A9A3
8A10A2
9A11A1
10A12A0
11D0D0
12D1D1
13D2D2
14GndGnd
15D3D3
16D4D4
17D5D5
18D6D6
19D7D7
20CE1#CE#
21A0A10
22RD#G#
23A1A11
24A2A9
25A3A8
26CE2N/C
27WR#P#
28VccVcc

To enable the SRAM to respond to ROM access and RAM access, we need to add logic to the chip select and output enable pins.

Chip select (CE1# and CE2):
The SRAM should be selected either when we have a write (WR#) or read (RD#) to the SRAM segment or when we have a ROM read (PSEN# - Program Store Enable). Referring back to the schematics, we can use any one of CS1# to CS7# of the multiplexer as an enable line for the SRAM segment (note that the other SRAM module is using CS0#). For this example we'll take CS7#, i.e. the external data mapped to the upper 8kB of the 64kB address space will also be used as ROM. This means we must select the chip when either CS7# or PSEN# is active.

CE1 = CS7 OR PSEN

Converting this to negative logic, the OR gate is changed into an AND gate (see U3):

CE1# = CS7# AND PSEN#

CE2 can be tied to Vcc.

Output Enable (PSEN# and RD#): The SRAM must output data on the data bus whenever PSEN# is active or when we have a RD# on the correct SRAM segment. However, the selecting of the SRAM segment is done by the multiplexer (U2), so the output enable should be active on a external data read (RD) or external ROM read (PSEN).

OE = RD OR PSEN

Converting this to negative logic, the OR gate is changed into an AND gate (see U3):

OE# = RD# AND PSEN#

SRAM on an existing ROM socket
It is possible to use an existing ROM socket on a PCB to use a SRAM chip, provided you have easy access to WR#, RD# and CS7# in the vicinity of the ROM socket. Most of the ROM pins can be used as is. Even the address pins can be used as is although the pins differ. As long as the SRAM stores the data at a specific location and is able to retrieve that data at the same location, everything should be fine. Pins 1, 20, 22, 26 & 27 must be modified as per the schematic above.

Comments

Popular posts from this blog

Installing Lego Digital Designer (LDD) on Windows 10

If you're using Windows 10 18.09 or later and try to install Lego Digital Designer (LDD) 4.3.11 you'll probably get an installation error for Adobe Flash Player. However, there is an easy way around it: Download the installation file for LDD 4.3.11. Rename the .exe file to .zip. If you don't see the .exe extension in Explorer, go to "View - Options" on the Explorer menu, then under the "View" tab deselect the "Hide extensions for known file types". Open the zip file with Windows Explorer. Copy all files in the zip to another directory on your computer. In the new folder: Delete install_flash_player_active_x.exe. Copy OpenGLChecker.exe and rename it to install_flash_player_active_x.exe. Run LDDSetup.exe. In short the installer will execute install_flash_player_active_x.exe during the installation process, but all it does now is to execute the same logic as what OpenGLChecker does. In theory you can run any .exe that will not retu

OpenWRT 3G connection checker & logger

A 3G connection is normally not very stable - so we need something to periodically check it & reconnect when needed. I also wanted a summary email at the end of each day with the total traffic per client. I'm using the following settings/scripts: Edit /etc/crontabs/root (create if not existing): # send stats & disconnect 3G at 23:00 everyday. # check the connection every 5 minutes between 5:00 and 23:00 and reconnect if needed # reboot at 5:00 if /tmp/stats.msg doesn't exist - will be sent in checkconnect */5 5-22 * * * /usr/bin/checkconnection 0 5 * * * if [ ! -s /tmp/stats.msg ]; then reboot ; fi 0 23 * * * /usr/bin/sendstats && ifdown wan The first line will run /usr/bin/checkconnection every 5 minutes between 5:00 and 22:59. Then at 23:00 the  day's statistics will be emailed and the 3G connection disconnected. The next morning at 5:00 it first checks if the email was sucessfully sent at 23:00, if so it will reboot the router (seems to be m

Windows Hyper-V Server 2019

This post will explain how to use the free Hyper-V Windows 2019 Server version. This version doesn't come with any GUI interface as provided in the full Windows 2019 Server version. Instead it comes with a character interface, but with the help of some third party tools you can easily get a fully functional Hyper-V server for free. The following will be assumed: You have a dedicated server connected to a network and you want to install Hyper-V 2019 on this server to run Virtual Machines and/or act as a file server. You have physical access to this server to do the installation. You have another machine connected to the same network to do remote management, running a recent version of Microsoft Windows. You don't want to join a domain or use Active Directory. You can do this if you want to, but this is not included in this post. First you'll need to download the Hyper-V 2019 ISO from  https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 . You’ll