Inkless Press

Picaxe Projects

 

Here are some projects that I have built and tested that use the Picaxe microcontroller. Some of them are designed to be modular so that they can be plugged into different robots that are being worked on. It takes a lot of time to create a new robot and they often have many of the same basic circuits and programming of a previously built robot. If simple modules that easily interface with each other are built, new robot ideas and configurations can be more quickly tried out.

Below are the schematics and hookup details. If you know how to program in Basic, you can fairly easily program a Picaxe, Picmicro, or Basic Stamp 2 to emulate these circuits. Many of these projects took 2 or 3 hours to program and debug.

 

Rainbow Voltmeter

Proj-1

This voltmeter is useful for monitoring the voltage of 12 volt batteries or lower voltage robot batteries. It uses an RGB Led to output different colors to indicate different voltages. I tried to choose colors that were easy to differentiate at a glance. The water clear RGB led was modified to blend the colors better and be seen at a wider angle. See details here.

To monitor a solar 12 volt system or a 12 volt car battery, the higher voltages flash. Lower voltages that are more likely to be used in small robots are displayed as a continuous color. To calibrate the voltages, a 14 volt power supply should be hooked up to the input with the 250k pot disconnected from pin 4. Adjust the pot until its output is 5 volts or slightly less with an input of 14 volts. If you input more than 5 volts into pin 4 you can permanently damage the microcontroller.

When you program your own chip, you can of course choose your colors and voltages.

You can download the program code in a text file here.

 

 

Infrared Remote Control

 

 

Proj-2

This infrared transmitter can control with up to 10 buttons. It outputs a standard Sony code for buttons 0-9. It works with the Proj-4 receiver below. The readadc command is used to read the voltage drop across the resistors in series. You can use fewer buttons as long as the overall resistance stays the same. In most of these projects I have left out the programming resistors that connect the Picaxe to the PC. Instead, I ground the Serin pin with a 100k resistor so the input is not left floating. You can leave the 100k resistor in place when you externally add the program resistors to program and it wont interfere with the download.

 You can download the program code in a text file here.

 

 

 

4 Channel Infrared Receiver

 

 

Proj-4

This infrared receiver responds to the standard Sony TV code. So you can use a standard universal remote control set for Sony code. Or, you can build Proj-2, the infrared remote control above. The outputs can light an led with a resistor or a relay with a 1N4001 clamping diode. Be sure the relay uses 20 ma or less at 5 volts.

 You can download the program code in a text file here.

 

 Solar Charge Controller and Voltmeter

 

 

Proj-5

This Charge Controller is designed to charge deep cycle lead-acid batteries with a solar panel. In starting operation, the panel is connected to the 12 volt battery with the relay off. The voltage of the charging battery or batteries is read by voltage divider R-1. The voltage is dropped to 5 volts or less and inputted to pin 4. The readadc command is used to measure the voltage at pin 4. When the battery voltage exceeds about 13.5 volts, Pin 1 goes high and turns on pin 8 of the ULN2803 darlington driver which activates the relay. The relay stays activated for 5 minutes, stopping the charging and allowing the electrolytes in the batteries to equalize. When the voltage once again exceeds 13.5, the cycle starts again. So, when the battery is charged, the charger will charge the battery for a minute or less and then turn off for 5 minutes. In this way it will be mostly off while cycling to maintain a topping charge.

If a deep cycle 12 volt battery is allowed to drop below about 10.8 volts, it can go dead. The red Led goes on to warn if the voltage drops below 11.3 volts which means the battery is very weak. Above that voltage the green led goes on. Above 13.5 volts the relay energizes and the blue led goes on to indicate the battery is charged or mostly charged.

Be sure and choose a 12 volt relay that has a higher amperage rating than what your solar panel(s) put out. Before hooking up the circuit to the Picaxe, you will need to calibrate R-1. With 14 volts coming in where the battery is going to be, adjust the pot until 5 volts or less will go into pin 4 of the Picaxe. If you exceed 5 volts here, you can damage the Picaxe chip.

 

 

Random Music and Light Generator

 

 

 

Proj-6

Thi random music and light generator is 1.3"x2.3"x.8". It plays music over a two octave range through a built in 1" speaker. A surface mount RGB LED displays a rainbow of colors below the speaker. It uses a voltage converter to run on a 1.5 volt AAA battery.

 You can download the program code in a text file here.

For more details you can check out this instructable at: Random Music and Light Generator.

 

 

One Cubic Inch Robot

 

  

Proj-7

The R-16 robot is a one cubic inch robot. It is capable of reacting to its environment with music wire whiskers. It can move and explore the perimeter of a box or a room on its own. It can also be remoted controlled using a Sony infrared remote control. It has pre-programmed reaction patterns. It is an attempt to create a one cubic inch robot that does not use surface mount technology.

 You can download the program code in a text file here.

For more details you can check out this instructable at: Building Small Robots

 

 

 

Picaxe Projects-Page 2

   

 

The Robot Page

 You can send Questions or Comments to:

Mailto: info@inklesspress.com

Copyright 2012, Inkless Press