Saturday, February 16, 2013

Gadget or tragic? PIC Microcontroller Project

Gadget or tragic? PIC Microcontroller Project Video Clips. Duration : 4.28 Mins.


25 years on, I decided to take up an old hobby - electronics. Whereas Z80 microprocessors were the leading edge 25 years ago, today, microcontrollers are the chip of choice. So I needed to define a simple project to grown my knowledge from zero. I took an analogy on a radio controlled vehicle and decided that was it. I would re-use an ancient joystick at one end and use even more ancient fischertechnik from my childhood days to put together a joystick controlled vehicle. At the joystick end I use 16F873 microcontroller to read the voltages on the joystick and crunch the values down to a command. for each motor I have forward, backward or stop plus a pulse width modulated power rating from 0 to 100%. The command is assembled in ASCII and then sent down the wire at 1200 baud (wireless to come shortly, hopefully) . At the fischertechnik vehicle end of the wire, a 16F627 microcontroller de-serialises the message, checks the header and payload, and if it checks out OK, sets the motors directions and speeds. This is repeated several times each second. For the pulse width modulated speed control, I use a second thread kicked off 5000 times a second to prvide the pulses. An L293D dual bridge driver powers the motors at about 7v from the 4.8v logic levels of the 16F627 chip. There are about 350 lines of assembler on the vehicle and about 250 on the joystick, most of which is defensive programming, error checking and trace. I take the NASA approach to things like this, something is ...

0 comments:

Blog Archive

About Me

Marissa Jacobs
View my complete profile
Powered by Blogger.