Let's Make Robots!


Maps enviroment, explores with arm, falls over.
Juniors_Schematic.jpg1.02 MB

Sun 7th Dec 2008

Had a few setbacks with the old NiMh battery pack dying and the new LiPo battery packs not fitting where I hoped. Compare the old photo to the new one below. On the upside the new batteries have twice the amp/hour rating and a friend helped me get some polymorph plastic which I put to good use on Junior.

Junior_closeup_of_sonar__small_.jpgI've used the polymorph to make a base / mounting plate for the batteries, a bracket to mount the servo assembly and another small bracket to mount the sonar. As you can see I was in a bit of a hurry to get the sonar up and going so I've just hot glued two small servos together. They are cheap enough that I don't care if they stay that way and it was the most compact neck joint I could make.










Because the new batteries did not fit between the motor control boards I ended up with a space under the new batteries. This turned out to be perfect for my i2c eeprom expansion board.

As you can see it's a perfect fit. Just have to workout where to fit the RTC.











 Junior's looking like a "Saturday Night Fever" contestant at the moment. He's posed this way because I can no longer access his motor wires to manually adjust his position and this pose is the safest while I'm developing the code to move his arm. In this position any joint can move a fair bit without a collision.

One advantage of the bigger batteries is that they are about 50% heavier than the NiMh battery pack and are a perfect counter weight when Juniors arm bends over backwards, even at full extension. The batteries are a higher voltage, typically 7.4V so the motors get a bit more juice. The servos are not affected as they run of the 5V supply. The biggest setback with the LiPo batteries is they have special needs for charging and can explode if not treated with the proper respect. This means that ultimately I need to build a special charger/docking station. These batteries cannot be trickle charged!  Read this fact page before considering LIpO for your robot.













Tue 2nd Dec 2008

He's nearly ready for his first video! I just have to write something more sophisticated than diagnostic routines. I've saved the schematic as a jpeg so that you dont need special software to read it but it is big so save it and view it with a photo editing program.

Updated with more pictures and a full schematic of both Junior and the Laser RF MkII. I'm trying a lot of new ideas at the moment so I'm not certain when he'll be ready to video. Everything has been tested to some degree individually so hopefully he will be done in the next week or two.

Have had a lot of destractions with new sensors to make and play with. The laser RF MkII was a disapointment as it was unable to give me the resolution I had hoped for and Rover was going to be too big for Junior even if it did work.

Another reason I've taken so long is that I had some problems with my first motor control board that had to be corrected before I could make the second one. Now they are both finished and tested.


As you can see they have been shaped to fit behind / between the tracks and the wheels as this was the only way to fit so many parts on such a small robot.


I had considered making custom boards but prototype board was quicker and cheaper. Considering I made a mistake with the first one I'm glad I didn't do custom boards.


This is the first board being tested. I've plugged in some motors I removed from a toy dinosaur and wrote a test routine that slowly increased the motor speed in both forward and reverse. I was worried that with all the mucking around I might have damaged a transistor with too much heat or zapped a FET gate with static but all went well. No magic smoke.


This is Junior with both motor control boards fitted. You can also see my IR sensors on the front. These are just general obstacle detection sensors to prevent Junior hitting anything too small or low for his sonar to detect. Until I can sort out the laser range finder I've decided to go with sonar. I'm using a Maxbotix EZ1 because of it's small size and because it has a pulse width output as well as analog so I can use a spare digital input and the pulsin command.


This is the double version of my IR sensor on the back. It can detect an object over a wider range and being mounted on the rotating base give it the ability to look around a bit.


This is how I remember which wire goes where. From time to time I will add a new circuit and then this photo and the schematic have to be updated. The servo outputs were added for testing my object tracker but will come in handy plus in my schematic I've worked out how to add two more if required.




The new range finder uses a pulsed 1mW laser pointer instead of a spinning mirror. This eliminates the mixer. Should have better resolution.

Hall effect sensors for position sensors.

The gripper will have a sense of touch using antistatic foam and "wire glue". I'll do a Tip/walkthrough on this once I work it out.

Multiplexed PWM control with multiplexed feedback. Allows the MCU to control 8 motors (in pairs) and determine load/stall conditions of each motor.

Junior is going to be my test bed where I can practice my programming and try out new sensors. That Picaxe 40X1 is gonna cop a hiding!

He's a bit top heavy and can fall over if the arm extends too far in any direction but this will be good for experimenting with balance and balance sensors.

The MkII sensor board shown on the right was originally designed with a picaxe 08M but by changing to a  14M it is capable of driving two mini servos that will make up a neck. With another two mini servo's set up for continuous rotation as drive motors it will be a robot in it's own right called Rover. I'm thinking of setting up junior so that he can use his arm to attach/detach Rover.  What could be better, a robotic boy and his robotic dog? I suppose I could have called it K9 but since it will rove about...

All this is going to require a big program so Juniors main board has an i2c interface for a RTC and a eeprom miniboard I've ordered from futurlec that has 4x24LC32 eeproms. http://www.futurlec.com/Mini_EEPROM.shtml Hopefully this will be enough. There's still a lot to work out but once the parts arrive I'll get a basic program running and post a video.

Junior_gripper.jpgIn the centre of the gripper you can see the white LED torch that came as part of the robot arm kit. I've mounted a LDR above it so that the robot can determine if an object is between the pincers. The pincer on the left has my home made touch sensor mounted on it. I lost 3mm of clearance between the pincers but can now tell roughly how hard the robot is gripping an object. Because there are two touch sensors it can also tell where the object is placed within the gripper. I'm posting a walkthrough on how to make this sensor for anyone interested.












Most of my parts have arrived except for some minature servos for a neck to mount the MKII Laser RF.


As you can see it's a lot of parts for one small robot. especially those eight motor control relays and 5W shunt resistors. The shunt resistors perform two functions, they limit the stall current to just over 1A per motor and they allow the picaxe to measure the current drawn by the motors so that it can tell how hard a motor is working. You can also see one of the IR proximity sensors and my eeprom and RTC mini boards from Futurlec.


This is Junior's main board, with the TLC1543 10bit 11channel ADC in the upper right and two 4052 dual 1 of 4analog switches below. The TLC1543 brings my total number of analog inputs to 18 and the 4052s allow me to multiplex my PWM and directional outputs to control 8 motors in 4 pairs. This was necessary because the 40X1 only has two PWM outputs and therefor I can only control 2 motors at a time. Other features of this board include the i2c port at the bottom of the 40X1, IR communication, internal serial connection to communicate with slave boards like the MkII laser RF. Battery monitoring with warning LED.


This is my solution to lack of space, the motor control circuitry is divided onto two boards and mounted either side with the relays, shunt resistors and drive FETs mounted between the tracks and idler wheels. The sheer number of wires and connectors are proving a problem because of the space they take up.


As you can see in this picture I needed some insulating washers, since I didn't have any I cut two slices of a gluestick and melted a hole in the middle with the soldering iron. You gotta love those glue sticks!


This is the other side still waiting for it's motor control board. I'm quickly running out of space and I haven't even mounted the IR sensors and wheel encoders let alone the laser range finder.

As soon as I have him going I'll post some video's.  Once I've worked out his software I'll try to get him to write LMR with a pen.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm working on that now, at the moment my code has to deal with a lot of factors and thats slowing me down. eg. The shoulder motor is usually under greater load lifting the arm than say the wrist motor so settings that make the shoulder work ok cause the wrist to over correct. This means the joint movement routine has to take motor current draw into consideration.

I really wish I'd just stuck a heap of servo's together :/

Oh well, once I have that worked out things should get easier and quicker. Hope to have video by next weekend.

Nice project!

 I have a couple of questions regarding that arm:

It uses simple geared motors right? No servos or absolute positioning, as far as I can tell?

Have you added some position sensing to it? Noticed the glue on the joints.

How much room is there for sensing-stuffs?

 edit: found your tip on hall-effect sensing.


They are simple geared motors with clutches, good quality for the price. There isn't much room inside the gearbox. As you've realised I'm using hall effect sensors for positioning. The advantage is small size and no moving parts. Your code must do the job of the servo circuitry. The screw in the centre of the joint is fixed to the yellow gearbox and has a small magnet glued on. The hall effect sensor is mounted on the rotating output. It would be easier but more expensive to just make an arm with servos. I had this arm already laying about and am just seeing what can be done with it.


We're off to France for Christmas tomorrow morning, so we had our Christmas yesterday. My wife got me this arm.


Looking forward to building it and taking it apart again.


I see a bank of relays in your robot. Are these DPDT relays? Are they what you've used to hook the arm to the MCU? Looking forward to building a custom board for this!! It'll have to wait until January, though :-(


Merry Xmas to you and your family.

Yes they're DPDT, I found Futurlec had them quite cheap, but order now before you go on holidays as it usually takes 2-3 weeks for parts to arrive. I used the HFD2-05 which are rated at 2A with a coil voltage of 5V. If you open Juniors schematic you'll see how I've hooked them up. They just select forward or reverse with the PWM outputs controlling speed. I'm making a small change at the moment. Due to the high frequency of the PWM output and a higher stall resistance than expected the shunt resistors are too big. I'll be changing them to 1.5 ohms.

Gone mine finished tonight.

It wasn't until I got to the back page of the book that I realised I wasn't going to be able to do what I thought. I thought I'd just hook a PWM'd FET to a DPDT relay and use that to switch on/off and reverse teh motor.

Now I see why you took away ALL the original PCBs. Damn. Who'd have thought they'd draw +3V and -3V from the cells using the centre tap as ground.

I was also surprised to see the motors draw 1.7A.

Well, I have a box of FETs and a load of DPCO telco relays, so I'm going to try and knock up an RS-232 controller for this. I think I can see a way of putting a graduated disc into the gearbox housings with an opto-sensor close by.

Welcome back, I was wondering how your arm was going. The power draw is one thing that has temporarily stopped Junior. I did design him for up to 2A per motor but with higher resistance than I allowed for plus the inductive reactance at a PWM frequency of 16KHz (about the lowest I can get with a 16MHz clock)  is limiting current to about 0.5A. I need to reduce the resistance of my current shunt.

One feedback method you may want to try is to set up a trimpot externally where I have hall effect sensors. When a joint moves, you'll see the screw head stays still. By attaching the trimpot to the body the way my hall effect sensors are and linking the head of the screw where my magnets are to the rotor of the trimpot you'll get a linear feedback over 270 degrees. My biggest problems with the hall effect sensors are non-lineararity and complex code for more than 180 degrees. I'm probably going to go to trimpots myself for these reasons.

Good luck with the arm, I hope to see video of it soon.

your realy sure about using LiPo batteries? from what i have seen your robot could be gone in a flash !
They do have an explosive disposition but so did my last girlfriend. My brother races RC cars with them and I've done some research of my own. If you use proper chargers then they are pretty safe. Ultimately a second processor (14M or 20M) will control charging and monitor temperature as well.
How much robot can you fit into such a tight space? :D