Skip to main content

Posts

Showing posts from 2008

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: Pin SRAM ROM 1 N/C Vpp 2 A4 A12 3 A5 A7 4 A6 A6 5 A7 A5 6 A8 A4 7 A9 A3 8 A10 A2 9 A11 A1 10 A12 A0 11 D0 D0 12 D1 D1 13 D2 D2 14 Gnd Gnd 15 D3 D3 16 D4 D4 17 D5 D5 18 D6 D6 19 D7 D7 20 CE1# CE# 21 A0 A10 22 RD# G# 23 A1 A11 24 A2 A9 25 A3 A8 26 CE2 N/C 27 WR# P# 28 Vcc Vcc 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

Cloning a WinXP system to Virtual PC

Steps to clone a physical WinXP system to run on Virtual PC: Create image(s) of your hard drive(s) in .vhd format. WinImage is a 30-day shareware program that does a pretty good job. Tip: Do not select the fixed-size image. The vhd file will be the same size as the partition, but you can shrink the image later if you've selected the dynamically expanding option. Set up a virtual machine using the .vhd images you've created in step 1. The virtual machine will probably hang when you try to start it in Virtual PC. The reason for this is incompatibilities between the physical hardware and the hardware Virtual PC is simulating. We need to overwrite the Hardware Abstraction Layer (HAL) to force a redetection of all hardware: - Boot the Virtual PC using a Win XP boot CD and select the Recovery Console - Log on to the Windows partition (I'll assume it is C:\Windows) - cd c:\Windows\System32 - expand d:\i386\HALACPI.DL_ (assuming d:\ is the CD-ROM drive) - copy HALACPI.DLL HAL.DLL

8051 Schematic with ROM & SRAM

U1: ATMEL 89C52 running at 11.0592 MHz (for standard baud rate generation) Port 0 is the multiplexed address / data bus. Because this port uses open drain logic, all lines must be pulled high. Port 1 is not used in this example, can be used for any TTL logic. Port 2 is used for the upper 8 bits of the address bus. Port 3 is used for control signals, more specifically the RS232 port and RD# / WR# signals used for external memory reads / writes. U2: 74HC138 3-to-8 multiplexer This multiplexer is used to divide the 64 kB RAM address space in 8 x 8kB segments using the upper 3 bits of the address bus. The mutiplexer is only active when WR# or RD# is active, i.e. a write to or read from RAM is active. U3: 74HC08 AND gate This AND gate is used to enabled the multiplexer whenever WR# or RD# is active. The WR# and RD# signals uses negative logic (active when at ground) and are multual exclusive (only one can be active at any given time). Note that a positive logic AND gate can be used for

WinCVS: Add a directory to a empty repository

For WinCVS to work, you need a CVS-enabled folder before you can add to the repository. When you do a normal checkout it will create a CVS-enabled folder and you can continue as normal. But what must you do when you have an empty repository? You first need to check out the base directory, i.e. specify "." as module name. This will make the root of your working directory a CVS-enabled folder, and add a"CVSROOT" folder. Don't worry about this CVSROOT folder, this is a copy of the internal CVS data. After this you can add new folders and files to the repository. When you want to get rid of the CVSROOT folder, wipe everything from your working folder and do a fresh checkout of the new folder you've created.

CVSNT 2.0.51d

I've reverted back to CVSNT v2.0.51d because CVSNT v2.5.04 places the following message on all commits, reason enough to get rid of it: Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ I had some trouble to get the user working. Change step (4) in the previous post to: cvs -d :local:c:\Repository passwd -r cvs -D DOMAIN -a cvs where DOMAIN must be replaced with your local machine name. Also make sure the "use local users" tickbox is not checked in the CVSNT control panel box.

CVSNT setup

Setup of CVSNT  on Windows Vista I've installed CVSNT v2.5.04, but the process should be more or less the same for other versions. 1) You MUST create a cvs user. Go to Control Panel - User Accounts - Manage user accounts. On the advanced tab, click on the Advanced button, and add a new cvs user to the system. For this example I'm going to assume the username is "cvs". 2) Add a repository. Go to Control Panel - CVSNT Server. Under the repository configuration tab, add a new repository, e.g. Name c:/Repository Root /Repository. This should create & initialize the folder. 3) Under the Server Settings tab, choose user cvs from the "Run as user" listbox. Also change the temp directory. Windows doesn't allow read & write access for our cvs user in certain folders, including c:\Program Files. I've used c:\Repository\Temp. 4) Add a repository user. We can't add users the the repository using normal access, because we can't get in without a va

HP Laptop Battery calibration

My HP 510 laptop's battery is supposed to keep the laptop running for 2 hours. However it lasted only 1 hour (I bought it new), and 1.5 years later I got about 15 minutes. The laptop runs WinXP Home. Reading some pages on the HP battery check utility, I've decided to reclaibrate my battery. This means charging the battery to 100%, set the power saving setting to "Always on", and keep the laptop running until it eventually dies.  For the first 15 minutes, the power level dropped at a constant rate, until it hit about 5%. Then it stayed for almost 30 minutes at 5%, and then died quickly. Running the laptop on AC power, I saw that the HP battery check utility reported a different battery level as Windows. After a restart both reported the same level. This means Windows does not always report the right battery level, and this is why you need to calibrate your laptop's battery every couple of months.

8051 HEX file upload code

NumBytes equ 040h Choice equ 041h CRC equ 042h LineCount equ 043h Counter equ 044h Counter2 equ 045h BaseH equ 046h ; Base address of SRAM BaseL equ 047h HexCount equ 048h ; 16 hex chars/line counter Endflag equ 20h Hexflag equ 21h org 0000h ljmp Main org 0020h Main: lcall Init ; Initialise hardware mov BaseH, #0E0h ; Set default base E000h mov BaseL, #000h mov dptr, #WelcomeMessage lcall SendString ; Print welcome message lcall SendCRLF MenuLoop: mov dptr, #MenuMessage lcall SendString ; Show options Wait: jnb RI, Wait ; Wait until a char is received from serial port lcall Receive ; Get char in accumulator mov choice, a ; save choice mov dptr, #Optio

8051 Hex file upload

The Atmel AT89C52 microprocessor has built-in flash and support for external ROM. Using a SRAM chip as a "configurable" ROM chip can significantly shorten development time. I've used some logic to make the SRAM available as ROM, but also writeable in another address space. The AT89C52's flash was loaded with a program to receive HEX files over the serial port and write it to SRAM. A jumper was used to switch between internal flash and external ROM. The code assumes a crystal running at 11.0592 MHz. COM port is 19200bps, no parity, 1 stop bit, no flow control. Using any terminal program, the user has 3 options: B: sets the base address (SRAM address for read/write access) D: download - download a HEX file from the PC to the SRAM V: verify - display the contents of the SRAM as HEX or ASCII Source code available in another post.