Monday, July 23, 2012

Wixel Saves the Day!

I hate to admit to all of the TI wireless doodles that I have purchased that I have not been able to do anything with (the Chronos, the RF2500, the LaunchPad Anaren Air Booster pack, etc.) Most recently I tried to comprehend the Air Booster code: 40 files of interrelated dependencies, 4000 lines of code completely obstifucated: it is out of my league. As an avid hobbyist, I don't purchase hardware to run a pre-packaged demo; I want to use and adapt it to my own projects. In the 21st Century, I am perfectly content to let the radio be a little black box, an accessory to my microprocessor. There are popular solutions like Zigbee and BlueTooth modules at around $50 a piece; but any radio link would of course require a pair of them (exceeding even my self-indulgent hobby budget). I was so glad to come across the Wixel from Pololu. The price point is right at around $20 per transceiver, and they provide useful code that is ready to perform a job. All I wanted was an RF link to push bytes in one end and get them out the other; the Wixel sets this up in about a minute. For a quick and dirty test, I loaded the USB-to-Radio code in both Wixels. The code auto-detects whether it is plugged and powered from USB or a battery, so the unit plugged into the computer was easily controlled from a terminal program (Tera Term). The distant-end Wixel was run off of a 3V CR2025 battery. I soldered 2 right-angle header pins to P1_6 and P1_7 (Tx and Rx data lines) so I could plug and unplug a shorting jumper for a communication loopback. From my laptop terminal I typed ASCII characters, which were transmitted to the battery operated Wixel, which looped them back to the computer's display; thus evidencing full duplex communication. There is so much more that this transceiver can do. I plan on using it to upgrade my robot #7's remote control interface, so battery and sensor status can be received from my control point, as well as duplicating the functionality of my original RC rig.

Pololu Web site [Link]

Wixel Worksheet [Link]

My other interests [Link]

Friday, June 8, 2012

General Purpose 18-pin PIC/PICAXE PCB

I have been migrating from PICAXE BASIC to PIC programming in ANSI C; but sometimes I still want a quick and dirty PICAXE prototype. That usually means breadboarding a rats nest of wires for an hour. Revolution Education used to market an experimenter board; but I suspect is is being phased out because SparkFun no longer carries it. I really did not like that old board anyway, because it lacked mounting holes. Thanks to Eagle CAD and BatchPCB, I was able to quickly design my own board and even market it on the Internet for anyone else interested in a good, general-purpose board. This board is ideal for both the PIC16F88 and the PICAXE-18M2. Only +5V and ground are connected to the chip, all other pins go to pads for easy jumping to any accessory.

Notes/Schematic for GP PIC18 [Link]

PICAXE Test Code (checks all LEDs and the push-button switch and relay) [Link]

PCB for sale on BatchPCB [Link]

My other interests [Link]

Monday, May 21, 2012

USB-to-Serial Adapter to PICAXE Com Test

Pololu and SparkFun market inexpensive USB-to-Serial adapter board modules (P/N 391 and FT232R), that with the appropriate drivers appear to both the computer and the client as serial com ports. This really simplifies USB connectivity. I thought it would be fun to wire this to a PICAXE-18M2 microprocessor and see what could be done with it. The end program permits a terminal program on a PC (like Teraterm or Hyperlink) to send commands to the microprocessor to either retrieve telemetry or to turn an LED on or off. To feed the microprocessor's ADC input I connected a potentiometer form Vcc to ground and the wiper to the ADC. From the terminal, if I type "l" the LED lights up, "d" extinguishes it (l for light, d for dark); "r" reads the ADC and displays the byte value. Incidentally, the USB connection also powers the entire project.

Link to Video [Link]

Link to BASIC code [Link]

Link to Wiring Diagram [Link]

Link to USB Module Specs [Link]

Link to my other interests [Link]

Sunday, January 15, 2012

Super Tech Lab Joule Thief

One of my pet peeves is throwing out AA batteries because most gadgets consider a 1.5V battery dead by the time it degrades to 1.3V or below. It seems like 86% of its energy is wasted. My digital camera is the worst offender; understandably, the flash requies a lot of current. Rather than sending these 'spent' batteries to a land fill, I have been saving them for some energy harvesting/joule thief circuit experiments. I did not design the joule thief circuit pictured above (there are dozens of variations across the net), but I redrew it in tinycad and built a demonstration circuit. It is simply an oscillator that will run on very low power, providing an inductive 'kick' to keep an LED illuminated well below a straight DC supply voltage. The induction comes from a toroid wound with a bifilar winding (opposing coils). The easiest way to make it is to get a twisted pair of wire (like black and white so you can tell them apart), wind about 10 turns around the toroid, and then connect the black wire from one end to the white of the other (this gives us opposing coils). The 2N3904 could be replaced with just about any NPN transistor (2N2222, etc.)

The circuit I built oscillated at 10KHz, and it illuminated a LED for 108 hours on a 'bead' battery (1.3V).
It made a nice night light. The toroid could have been much smaller, I just used the first one I could scrounge.
A good green project would be to retrofit some battery operated device to use a circuit like this to get more life out of a set of batteries.

Larger Circuit Diagram [Link]

My other interests [Link]

TinyCad free schematic capture [Link]