Skip to main content

Posts

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...

TP-Link MR3420 serial connection with Raspberry Pi

It happened to me - I've bricked my TP-Link MR3420 router by changing some settings in /etc/config/firewall, with the result that I couldn't get a connection to the router from either a wired or a wireless connection. And the failsafe option also doesn't work on OpenWRT Backfire 10.03.01, so the only remaining option was the use the router's serial port. Enters the Raspberry Pi ( http://www.raspberrypi.org ). The Raspberry Pi has a serial port available on the GPIO pins, and what is nice is that it is operating on the same voltage levels as the TP-Link MR3420's serial port (0V and +3.3V). This means we don't need any RS232 voltage level converters (RS232 goes from -12V to +12V). The only way to get access to the TP-Link MR3420's serial port is to open the router, and solder some wires to the SJ1 connector (see  http://wiki.openwrt.org/toh/tp-link/tl-mr3420#serial ). You need to solder at least 3 wires: Tx, Rx and Gnd, which is pins 1-3 on SJ1. You'll...

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...

Installing OpenWRT 10.03.1 on a TP-Link MR3420

Update: click  here  for installation instructions of OpenWRT 14.09 on TP-Link MR3420. The idea is to install OpenWRT 10.03.1 on a TP-Link MR3420 and configure it to use a 3G USB modem. I'll assume you have a Windows computer where you can connect with 3G USB modem. First flash the router with the OpenWRT image. See   http://wiki.openwrt.org/toh/tp-link/tl-mr3420  for more details. Reboot the router. Then set your computer ethernet connection to a fixed IP address of 192.168.1.100 with subnet of 255.255.255.0. Connect the router port 1 to the computer. From the computer you should be able to ping 192.168.1.1. Then telnet to 192.168.1.1. You'll get a busybox shell, type passwd and provide a new root password. Once this is set telnet will be disabled and you'll only have access via SSH.  Open a web browser to 192.168.1.1. Log in with username root and password as defined above. Then go set up your wireless settings & configure everythi...

HP laptop power woes

My HP510 laptop had the strangest power problem: when running on AC power, the charge indicator LED plus the power button LED will suddenly start to blink. After this Windows will report that the laptop is running on battery power, and if left unattended the battery will eventually run out and the laptop will die - with the AC adapter plugged in. Even after I shut the laptop down, the LEDs keep to blink until I reboot the machine. Because the battery is old, I've removed the battery and all went well for some time. Then the laptop began to die whenever I touch the AC adapter, which lead me to the real problem: the wire coming out of the AC adapter was badly damaged at one spot where it was always flexed around the brick. I presume the blinking LED was some sort of indication that the AC adapter could not supply enough current for the laptop. So I cut the wire at that spot and soldered it back - and everything seems to be working again!

A4 paper size

Let's start off with three basic rules: 1) The width:length ratio is constant for all paper sizes 2) Halving a paper along the long side will give you two transposed pages of the next smaller page size. 3) The area of a A0 page is 1m 2 We can calculate the width:length ratio as follows: Take a landcape A4 page, and dividing it in half will give you two portrait A5 pages. The width of the A5 page (w 5 ) will be the half of the length of the A4 page (l 4 ), and the length of the A5 paper (h 5 ) will be equal to the width of the A4 page w 4 ). Because the width:length ratio of both pages is the same, we can write: w 4 / l 4 = w 5 / l 5 w 4 / l 4 = l 4 / (2w 4 ) 2w 4 2 = l 4 2 l 4 = sqrt(2) x w 4 Using the result above, the width:lenght ratio can be written as: w 4 / l 4 = 1 / sqrt(2) The area of an A0 page is 1m 2 , A1 is 0.5m 2 , etc. The area of a An page can therefore be written as 1/2 n m 2 . Because the area is the product of the height and length of the page, we get t...

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 ...