Archive for June, 2006

Achtung!

Most versions of this story are vaguely correct:
http://www.signonsandiego.com/news/education/20060620-9999-1m20whizkid.html or http://securitypronews.com/news/securitynews/spn-45-20060620YoungProgrammerDevelopsSecuritySolutions.html

But don’t you hate when you get crap like this?: http://www.theinquirer.net/?article=32543

“Already, a manufacturer has created a working prototype based on Sergeev’s design and he is trolling around the tech fairs flogging his ideas.” Yeah, I love those juicy insults.
There was one (rather big) mistake in the original article: there is no hardware manufacturer “producing my device”. In fact, I designed the pcb schematic and board entirely in CadSoft EAGLE Lite. The pcb got printed/etched by Advanced Circuits ($83 with 1 day turn around for 3 prototype boards), and I assembled the boards myself with parts either sampled from the companies (Microchip, Philips, etc.) or from Mouser and Digikey. As for specifics: the board is based on a Philips LPC2148 ARM microcontroller, and two Microchip ENC28J60 ethernet controllers. RJ-45 jacks are actually Magjacks with integrated magnetics. Other goodies include a serial port, JTAG header, and of course basic voltage regulation.

You know what I loved the most, though? This: “where it probably beat off opposition from another kid’s ant farm and the display ‘My dad’s a scientist’.” As for my dad, well, he’s actually a high-level database programmer (FoxPro), so his expertise does not apply and could not have applied to the science fair project what-so-ever. Writing firmware for a microcontroller (an ARM one by Philips, in my case) is usually low-level C or assembly (mostly C in my case), and includes driving interfaces like UART or SPI (which I do in my project), not query and select statements to a db. Not to mention the whole other side of the project: digital electronics and pcb board design. So yes, I did well in science fair… why? because I honestly built, wrote, and conceived my project by myself, and the judges obviously judged the way they did after they got to know me well enough to realize that this was true. What explains my experience in these subjects? Take it or leave it, but it’s all self-taught. Also, GSDSEF (Greater San Diego Science and Engineering Fair) is hardly your ant-farm project fair. The senior divison projects, particularly, go through some pretty extensive screening sessions to keep the bullshit projects out. A good handful of the projects progress into bigger fairs, patents, or even to the market.

__(’Read the rest of this entry »’)

Comments

DC Motor Driver

I wrote a simple driver a few nights ago for the single DC motor driver FAN8082 by Fairchild. This is a very straight-forward 8 pinned IC. The motor is controlled by two inputs, and can be set to spin forward, reverse, or brake. Today I setup a breadboard on the car and wired the microcontroller circuitry to the 4 AA batteries housed underneath the car. After some experimentation with the motor driver, I gave the DC motor its own dedicated 9V supply :-)

Yes it spins very fast (relatively speaking to the stock setup), but I think it will work out fine. The DC motor driver is actually very neat because you can control the speed of the motor by changing the voltage on the Vctl pin (I left it unconnected).

Here is a short video of the motor spinning forwards and backwards, toggled by a simple button connected to the microcontroller: video

Comments (1)

AVR Servo Control

Well, my two days worth of figuring out AVR timers and PWM produced a very small and clean servo driver. Today my two 5g servos arrived and I hooked up one of them to the chip. I setup a test program and it worked out of the box. If you care to see it, just watch this:

http://www.frozeneskimo.com/electronics/wp-content/uploads/Videos/avrservo.avi

Comments

Manchester Encoding/Decoding

Like I said in the previous post, the RF receiver will pick up junk data when the transmitter isn’t transmitting anything. This means that you need some sort of encoding or decoding method of the data to differentiate from junk in the air and actual data. This can be easily done through Manchester Encoding, which was used in Ethernet until 100Base-TX came along.

Manchester Encoding actually halves the data rate. The encoding is extremely simple, though. If you have a 1 in your data, it will be followed by a 0, if you have a 0 in your data, it will be followed by a 1. So the ASCII letter ‘A’, or 0100 0001 in binary, would be encoded as 01 10 01 01 01 01 01 10.

This allows for easy error checking- if a bit in the received data is not followed by its inverse, you know that the data is invalid. In other words, there are an equal number of ones and zeroes in the Manchester encoded data. Of course, there is that small chance that one byte of the random junk floating around is actually properly encoded, but these bytes can be avoided with a basic protocol on top of the encoding (possibly with a checksum).

__(’Read the rest of this entry »’)

Comments

RF Transmitters/Receivers Arrived

Those RF units I was talking about in the previous post arrived today. Since the transmitter and receiver are actually separate devices, I ordered two sets at different frequencies for the robot and computer to communicate. One set is 433MHz, the other set is 418MHz.

These things are very small, and after playing with them, they seem to be on par for $12 per transmitter and receiver pair–even though they have a maximum speed of 2400 bps. I hooked up the transmitter to an AVR microcontroller (ATTiny2313) that was sending A’s straight out of the UART port. I hooked up the receiver to max232 serial module which was connected to my computer through a serial->USB converter. When the transmitter isn’t transmitting, the receiver picks up junk data that is floating around. With the AVR sending A’s though, I could see a fresh, clean stream of A’s coming in with the transmitter and receiver about 10 inches apart. It simply worked out of the box. More distance between the transmitter and receiver required some sort of an antenna, so I just plucked a 5 or something inch wire with the transmitter, and the receiver picked up the A’s from all the way across my room (it probably could have picked up from even further).

Here are some pictures of the devices:

__(’Read the rest of this entry »’)

Comments

Building a Basic Robot

Well, I’ve decided that I wanted to build a basic robot based on a toy car I recently dissected. I took out all of the cheap RF stuff in there, and left the back DC motor and gear box that gives it two-wheel drive. I also modified the front wheels so that they had complete left and right freedom of motion (the radio controlled toy car had this interesting steering mechanism that had only let the wheels point straight or to the right).

What do I have left? A simplified car frame with two-wheel drive, 4 AA battery compartment housing, an on-off switch, and front wheels that can’t steer. The only thing to do mechanically is to add steering to the two front wheels, which I’ll probably do using Ackermann Steering, kind of like what cars use. I originally thought of using a gear rack, and doing a simple rack and pinion model with a stepper motor, but later I found out that the easiest (and cleanest) way is to use a servo motor. Since the two front wheels have a connecting bar that keeps the wheels parallel, I only need to focus on moving this bar left or right. A stiff wire connected from the horn of a servo motor to this bar (or a wheel) would do exactly this. Besides, servos remember their position, so all I’ll have to do is send it the angle I want the wheels to be at. I ordered two cheap 5g servo motors from ebay.

__(’Read the rest of this entry »’)

Comments