Let's Make Robots!


Remoted controlled mobile platform for videoing robots.
Pictomatix.BAS1.5 KB
IR_remote_MkII.bas1 KB
PICTOMATIX_simple.BAS997 bytes
IR_REMOTE_simple.BAS676 bytes

This is Pictomatix, a 4WD mobile platform for videoing my robots. Taking advantage of picaxe's infrain2 command to make the most of the 08M's limited I/O pins. I'm still doing Asterix and Obelix cartoon names as they are far more interesting than Bot this and Bot that. The first video is Pictomatix videoing SplatBot MkII. This was his original purpose.







The second video is of an early attempt at mounting my camera on SplatBot MkII. It was this bouncy video that gave me the idea for Pictomatix.









The third video shows his first time up and running with the camera first mounted on a tripod and then on Pictomatix. There is a problem with his speed control in this video, the PWM code is braking the motor instead of coasting between power pulses. I've since changed the circuit so that the enable pins are controlled via some diodes and a couple of resistors.








 This was ment to be a quicky but I ended up redesigning the meccano chassis a couple of times to get the 4WD working properly. It's still not perfect and likes to throw off a wheel every now and then but it's all good fun. I thought this would be a perfect oppertunity to use a programmable TV remote I've got laying about but at this stage there is no video because I can't find the *@#% instructions for it. I'm now thinking of making my own remote using another 08M using the infraout command. This will probably be better anyway as I can program it to send a steady stream of commands treating each motor as a seperate device and using the data to send analog information from two pots to create my own version of digital proportional speed control. Below is a photo of the meccano chassis.


I don't have it geared down as much as I'd like but in a test with one motor going forward and one backwards wired directly to the batteries it did nice donuts on the carpet until it threw a wheel off. Now that it has the extra weight of the camera and circuitry plus a voltage drop accross the "H" bridges it won't be so perky. I may have to do Frits's trick of putting electrical tape on the wheels to reduce traction.


Hopefully the 4WD will be worth the effort when I do some outdoors video. As you can see it's a very simple design. Sorry for the poor picture quality below but with my good camera on the bot I had to use a low res webcam.


 I'll update this tomorrow with the homemade remote control and hopefully some down low video.


Tue 27th January, 1:32am


Well it's tomorrow already and I haven't gone to bed yet, I've been asked if I've hacked the camera and the answer is not yet, that's another project for another day. Below are the schematics for Pictomatix and a custom remote control I will build after I get some sleep. If all goes well there will be video in the near future. Click on the diagrams for larger pictures.


The robots schematic is very basic. It is really just the 08M, an IR receiver and the dual "H" bridge IC to drive the two motors. I haven't bothered with flyback diodes on the L298N as it is rated at 50V and should be able to handle the spikes from the 6V motors. I have fitted it with a reasonable heatsink as it can get hot with both motors going.

The software will be simple as well. Since my remote will provide a continuous stream of data the code should not need an interupt to prevent lockup while waiting for the next IR command. Each motor is treated as a different device so that data for one does not get sent to the other. The 08M has limited PWM capability so the bulk of my code will be generating the motor outputs from the IR data.


 The remote control will have two forward/reverse joysticks, one for each motor. The 08M will read one joystick with the readadc command, divide the result by 2 to give a 0-127 value then transmit that data. The process is then repeated with the other joystick. The TSAL5100 IR leds are rated for 200mA modulated forward current each and are specifically designed for IR remote controls. They also have a narrow viewing angle of 10 degrees to help increase range. The MPSA13 transistor is a darlington coupled transistor with a gain of 5000 and capable of handling peak currents of 1.2A for very short periods of time making it an ideal driver for these LEDs.


Later that day after some sleep and much searching for parts......


Bad news, I had a perfect radio control transmitter to put this circuit in but after an hour of searching I can't find it :(

Good news, during the search I found an old PS2 clone controller with those wicked little joysticks in it. Since I would like to add pan and tilt at a later date these dual axis joysticks are perfect. I would have loved to use the entire controller except it has way more buttons than I need or want plus it wasn't really designed to hold batteries as well.

So on with the show, this is what I ended up with after some debautury (desoldering and butchery :)


 As you can see these little beauties have two 10K linear pots (103 is 10K and B means linear) and as a bonus that I wasn't aware of, a button thats activated by pressing down on the stick (far left on the left joystick). As a result of all this bonus hardware I've redesigned the schematic using a picaxe 14M. This now gives me 4 analog inputs for the joysticks and 4 buttons for future camera hacking possibilities. Now that I'm not using the old remote I've also done away with the regulator and will disable the brownout detect in the chip (see disablebod command).


I want this to be fast and responsive as possible so I don't want to slow the picaxe down with too much processing. This means that I want to just read the inputs, divide the analog inputs by 2 since the IR data is only 7bits and then transmit the data. Since Pictomatix is skid steer and I want to control both motors with one joystick leaving the other for pan and tilt at a later date this means I'll need to show you a little trick ;)

Pictomatic_Remote_MkII_Layout.jpgInstead of the 14M trying to translate the forward/reverse/left/right movement of the joystick into the equivalent of two forward/reverse joysticks I'm going to turn that joystick 45 degrees. Now when you push forward both the X axis and the Y axis move forward together. Pull backwards and they both move backward together. pull to one side and one motor will go forwards while the other goes backwards etc. 

This is how it looks so far.

The 15mm nylon spacers I'm using give just enough clearance for the batteries and poke the sticks about the right height above the lid. I can always add a few washers to fine tune the height as it needs to be right otherwise the sticks won't get full movement.

Wednesday arvo (28-1-2009) - Thursday early morn - God knows when!

I finally finished my IR remote! Works great (eventually :)


Turns out I didn't read the fine print with the infrain2 command. Although infraout can talk to multiple devices, the infrared input commands only work from one device (TV). For now I've worked around the problem and can send 6bit analog information where before I was going to send 7bit data (due to limitations of IR protocol). Below is the finished remote.


Inside and out.


Later if I hack the camera I can add up to four push buttons. Presently pushing down on the joysticks activate two buttons built into them but although the code transmits and receives this data it is not used yet.

I've posted another video showing Pictomatix's first time out. He has good speed and reasonable power considering the voltage drop across the "H" bridge but I've realised that the motors are braking when power is off and the 08M has no spare outputs I can use. It looks like Pictomatix will be another 14M bot as multiplexing the outputs will slow down his response time too much. I'll fix that later today. Sample code for the IR transmitter and Pictomatix has been attached.


Wednesday 4-2-2009


I've added another video and updated the attachments with the code used in the third video minus a glitch that occasionally prevented him from reversing or turning anti-clockwise.  Both the transmitter and receiver code with "simple" in their name. I found that the IR protocol was too slow for my original code to generate PWM speed control. I'd need to use two seperate processors or a 28X1. I've since tried with a 28X1 and suspect that the irin and servopos commands are conflicting bringing me back to my original thought that two processors are needed.


 The additional 10K resistors pull the enable pins low when no outputs are high causing the motor to coast rather than brake. When an output goes high, the diode from that output to the enable pin pulls it high allowing normal function.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
I'm glad you like but if you read the post then you'll find your answers since I explained what the chassis was made from and where I got the pots.
Tell me more about the 3-pin IR receiver... This is not the "picaxe standard" set-up. Is there an advantage to your circuit over the standard one? Also, your pins are 1,2,3 from top to bottom or 3,2,1 from top to bottom when looking at the schematic?
I've redone the remote section as a seperate tip walkthrough. I've included the datasheet for the LEDs and the receiver.
Pretty cool putting together a remote, like the joysicks.

I see you've joind the "show your feet on LMR" club.

The driven wheels seem to be skidding on the carpet when the bot starts to move. A more gradual application of power might help to make a smoother camera platform.

Perhaps you should include a live video feed from the bot to your controller so that you can see what you are filming.


Sound affects are cool on MKII. looks like the camera is doing a lot better on the pictomatrix. :)
I was thinking in making a similar remote with two wii nunchucks.. but looking at the way you did with yours, I think I will try to make a similar one.. hope you don´t mind  :)
That's what these post are for, to inspire others. I had a fault in my code earlier that was causing some problems but the biggest problem I had is the slow data transfer rate of the IR protocol. about 10 commands a second. It may pay to use one chip to monitor the IR signals while another chip does the rest. Also realise that the IR does not work in bright sunlight. It only works indoors.

I will use Xbee modules for comunication, they are very easy to use and have a good range (about one km on open space)

just seen the 3rd video, Pictomatix is making really cool videos.. I love the green led and sounds on splatbot.. good work ;)

Looks great oddbot! You always amaze me how quickly you pump out fantastic robots.

If/when you get a cheap camera to permamently mount you could try making a frame and suspend the camera with elastic or springs inside to stop the vibrating.