PDA

View Full Version : Build Log: Robotising a RC tank (first attempt)



Fivetide
30-09-2012, 02:33 PM
Iíve always wanted to covert a Model Tank into a house guard or a garden rover, but never actually got around to starting one. There are certain things I want from it. Good range, lightweight and tracked, ultimately to have the ability to climb stairs. I see it as a little home sentinel, that can detect movement, sense smoke etc , that I can control from a web page or an android phone. It might sound silly but as a contractor I often spend a lot of time working away from home, although I have good neighbours who watch out for each other, they wouldnít be able to sense a fire immediately and warm me, or want to tackle a burglar. Thatís what Iím aiming for in the long term with a bespoke built robot, the tank is my R&D phase and if the Robot never appears then I have RC FPV BB tank I can play with in the garden.
Anyway I bought a Heng Long Walker Bulldog (http://www.wirelessmadness.com/rc-bikes-rc-tank/rc-tanks/heng-long-1-16-scale-u-s-m41a3-walker-radio-controlled-tank-with-bb-3839-4400808 locally)

7005

*Not my tank but for reference.

Thereís nothing fancy about it , no smoke or sound, and after a few hours playing around shooting various things (badly) it got a tad boring lol

So now it looks like this:

7006

The idea is of what to create... is evolving as I go along. I first thought of using a wireless camera via my Wi-Fi network. This is fine but is very very limited. First of all the range would be poor unless I added repeaters or boosted the signal somehow. Anyway I decided to go for first person view equipment. Lots of range , lightweight for RC planes and lots of things on the forums to help me decide the correct equipment for my project.

The ultimate idea will be to use my CNC / Casting equipment to build a really robust rover , so this is my R&D phase plus I can have some fun.
So for the camera setup so far I have:
RX / TX


1.2GHz 800mW 8 Channel Digital Wireless AV transmitter & receiver (http://www.sunsky-online.com/view/13087/1.2GHz+800mW+8+Channel+Digital+Wireless+AV+transmi tter+%26+receiver.htm)


Camera


WDR700 OSD Color Camera 550 Lines SONY Super HAD II (http://www.firstpersonview.co.uk/cameras/wdr700-osd-color-camera-550-lines-sonyr-super-had-ii)




Pan and Tilt


260 Degree Pan & Tilt Camera Mount (http://www.firstpersonview.co.uk/head-trackers-pan-tilt/md260-pan-tilt-camera-mount)

7009


However as I said before this is evolving , mainly due to the fact I underestimated the space I have for the equipment.. next post will be control equipment.

blackburn mark
30-09-2012, 05:20 PM
7010 iv just been looking at what it would cost to use t2.5 belt for tracks :( ....a tad pricey once you get towards 1m lengths and 50mm width .... especialy if you use double sided
a shame because im guessing they might climb carpet at 45 degrees and would be nice n quiet for sneaking up on any cats taking a dump in your garden lol

boldford
30-09-2012, 07:01 PM
. . . . would be nice n quiet for sneaking up on any cats taking a dump in your garden lolAnd fire a BB right at their tea-towel holder.

Fivetide
30-09-2012, 07:12 PM
7010 iv just been looking at what it would cost to use t2.5 belt for tracks :( ....a tad pricey once you get towards 1m lengths and 50mm width .... especialy if you use double sided
a shame because im guessing they might climb carpet at 45 degrees and would be nice n quiet for sneaking up on any cats taking a dump in your garden lol


And fire a BB right at their tea-towel holder.

I'm saying nothing lol :) but your not far off the "Mark"


Hence why I’m thinking of swapping cameras to

1/3 SONY Colour 700TVL CCD Waterproof Camera, IR Distance: 50m (http://www.sunsky-online.com/view/251572/1+3+SONY+Color+700TVL+CCD+Waterproof+Camera++IR+Di stance++50m.htm)

Give me more of a Stealth ability at night lol !

Fivetide
30-09-2012, 07:46 PM
So part 2 Controller.


Well Iím not sure here, I have an Arduino Nano, which would server the purpose in all honesty, mainly because thereís actually not much to it.

It uses 6 motors and 2 servos.
The 2 x servos are for the pan and tilt camera,
and the motors are :
2 x motors for the final drive
1 for turret rotation
1 for Depression and elevation of barrel
1 for winding the plunger back for the gun.
But thatís leave a bit of problem, I have the
Arduino Servo & Motor Shield for 2 Servos and 4 Motors (Adafruit) (http://www.ebay.co.uk/itm/180970288137?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649)

Which means I fall short by one motor control otherwise it would be perfect. Size weight control all excellent.
I thought about replacing the gun mechanism with a solenoid type of device, though good in theory Iím not sure, anyway thatís the least of my concerns it tertiary to the actual use,( though slotting a bb in the rusty sheriffs badge of a squatting feline at a 20 paces would be pretty kewl, and rewarding for that matter :thumsup:).
The wireless control comes from marrying the Arduino with 2 Xbee proís (http://http://uk.farnell.com/digi-international/xbp24-z7sit-004/mod-xbee-pro-zb-0-01w-w-rpsma-connx/dp/1751800)

On 2 x Adafruit XBee Adapter Kit - Point to point and mesh wireless networking Arduino (http://www.ebay.co.uk/itm/350573634848?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649)

Cheap kit / Prepare to solder
They rate at about 1 km
I have been able to control the Pan and tilt using Processing and Arduino sketches. Very simple, tutorial (http://www.youtube.com/watch?v=jkDEXX06A-g). Be careful though so far I have only found my Mega AXT has been able to supply enough power to the servos and servo board at the same time, I have now 9v external powers on each and every board and it works spot on. This is one of the reasons Iím looking into a power distributor similar to RC helicopter boards, either buy one or make my own.

Swarfing
30-09-2012, 08:58 PM
Why not go for something like this? we are using one for an octopod we are building.

32 Channel Servo USB Controller board for arduino MCU PIC | eBay (http://www.ebay.co.uk/itm/250998651279?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649)

Fivetide
30-09-2012, 09:00 PM
Why not go for something like this? we are using one for an octopod we are building.

32 Channel Servo USB Controller board for arduino MCU PIC | eBay (http://www.ebay.co.uk/itm/250998651279?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649)

Can you run motors off the board ? I'm worried about the amount of heat and load on it, aircraft are great as they blow air over electronics constantly

Swarfing
30-09-2012, 09:25 PM
Caution is always good advice. We are actually using a 16 channel version and it is not being built for speed so heat is not a big issue but a fan would not go a miss.

Check out the octopod builds and you will see what others are using. You can get a lot of servos running ok on these.

Fivetide
30-09-2012, 09:37 PM
You can get a lot of servos running ok on these.
what about drive motors like ones on the tank ?

Swarfing
30-09-2012, 10:09 PM
DC motors may be a problem with this type of setup?

Fivetide
30-09-2012, 11:08 PM
DC motors may be a problem with this type of setup?

I think it would, it’s the power demands, the servos have much smaller DC motors than the final drive ones, same as the propeller motor on a helicopter would be drawing at full revs almost the entire power output. A board like that would be excellent for servos that are on/off and small, but I think the motor shield somehow manages to distribute the power a lot better, who knows though lol ? This is all new to me. I do have a servo and sensor shield I could try it , but I expect they made a motor shield for a reason rather than just have one sensor – servo – motor board.. don’t quote me on that it’s just a feeling
I've seen a video somewhere where you can use a small heat sensor that regulates the fan speed via Arduino code.

ecat
01-10-2012, 01:38 AM
If you need more servo outputs it should be possible to combine the Adafruit board with this idea ...

Drive 10 Servos using only 2 Arduino Pins - DIY Drones (http://diydrones.com/profiles/blogs/drive-10-servos-using-only-2)

You need to remove the servo drive code from the Adafruit library and change the linked 4017 code to use pins 9 and 10 instead of 9 and 8, then connect the 4017 circuit to the Adafruit servo 1 and 2 control pins. This would give you 4 motors and up to 10 servos at an extra cost of around £2. I've used the 4017 idea before with a PIC32 controller, it worked well.

If instead you just need to drive one more motor/solenoid you could use a transistor on one of the free d0, d1, a0..a5 pins to give a single direction drive, or two of the pins + an inverter chip and another L293D, as on the Adafruit board, to drive 1 motor both forward and backwards.

And if you wanted to be really sneaky you could perhaps wire a 2nd Adafruit board up in parallel to pins d4, d7, d12 and GND but connect one of your free pins to the second boards d8 connection and get yourself an extra 4 full motors - N.B. Each additional motor will also require one of your additional free pins and some code to drive it for Enable/Speed control. Again you would need to modify the Adafruit library but the changes shouldn't be too tricky*.

*Shouldn't be too tricky*: the famous last words of many a programmer :(

irving2008
01-10-2012, 07:42 AM
From my experince a few (read many) years back of creating an autonomous robot, keeping the drive motor control seperate from the servo control is critical for reliability. Personally I'd use a multi-way PWM output shield to drive the servos and two channels of that to drive external PWM controllers for the motors. That way you can keep the Arduino and low curent systems away from the high current and position the motor controllers to optimise (e.g. shorten) the high current wiring. Also motors controllers have a habit of going pop and keeping them seperate can save money in the long run.

ecat
01-10-2012, 07:57 PM
From my experince a few (read many) years back of creating an autonomous robot, keeping the drive motor control seperate from the servo control is critical for reliability. Personally I'd use a multi-way PWM output shield to drive the servos and two channels of that to drive external PWM controllers for the motors. That way you can keep the Arduino and low curent systems away from the high current and position the motor controllers to optimise (e.g. shorten) the high current wiring. Also motors controllers have a habit of going pop and keeping them seperate can save money in the long run.

Wise words indeed. Never underestimate the latent malice of electric motors.

A bit of easy reading for when random failures occur:
http://modelsolutions.ca/articles/DavidsOriginalArticles/RFIArticleMarch2006.pdf
http://www.fightingrobots.co.uk/documents/EMIGuidelines.pdf

I'm quite new to all this motor stuff but my feelings are:

1) If you can use a servo then use a servo. Servos are designed to be mechanically and electrically robust while playing nicely with the rest of your electronics.

2) If you can use a brushless motor + electronic speed controller then do so. Expensive but efficient and while the ESC will generate electrical noise it is easier to manage than the all-out circuit frying shotgun blasts of...

3) Typical, cheap brushed motors. There are two at the front of the tank in the first post picture. Use caution, read the links and good luck.

At the risk of stating the obvious, all of these models are designed to be powered by batteries, batteries that are designed to deliver massive amounts of current as and when required. Even a small electric motor may pull 1Amp while running under load, and more when changing direction. Stick 5 such motors in model and a typical 'made for models' battery will handle the 5A or more current with ease, the same cannot be said of the typical wall/mains adapter you may use in place of the battery while messing about - expect random resets. And don't even think about running the whole shooting match from a USB port!

But you, yes, you random reader who I know won't listen to that last bit, will you? You watched a clip on YouTube of some random running their motor(s) from an arduino + USB connection. It worked for them so it will work for you, obviously. They also know a lot more than I do too, obviously, they have a video! Good luck, USB should protect itself and limit the current to about half an Amp after which things may randomly stop working or reset or your PC may start smoking.

Last bit, honest.
So you have your motors running off a battery supply and you have wired your arduino to run from the same batteries. Is it ok to plug in the USB connector, or one of those neat 6 pin breakout boards? The battery is supplying voltage and the USB connector wants to supply 5V so what happens when the two meet up? The answer is, I don't know. Perhaps it depends on the flavour of arduino, perhaps it doesn't matter, perhaps... On my 6 pin Mini Pro I just don't connect the 5V pin, in general I think it a good idea to always disconnect the arduino battery/external supply before using USB.

Fivetide
01-10-2012, 08:32 PM
Wise words indeed. Never underestimate the latent malice of electric motors.


Last bit, honest.
So you have your motors running off a battery supply and you have wired your arduino to run from the same batteries. Is it ok to plug in the USB connector, or one of those neat 6 pin breakout boards? The battery is supplying voltage and the USB connector wants to supply 5V so what happens when the two meet up? The answer is, I don't know. Perhaps it depends on the flavour of arduino, perhaps it doesn't matter, perhaps... On my 6 pin Mini Pro I just don't connect the 5V pin, in general I think it a good idea to always disconnect the arduino battery/external supply before using USB.

Thanks ecat, yes thats why I have all the baords powered, and I to dont know the effect of having power and pluging in the 5v USB, but I hope that once all the wireless stuff is up and running I can swap to total independant and use the wireless to program the board (as seen on youtube :) )

One of the things I want to attempt is to switch between two cameras using a relay, in theory it should be easy, but I bet it wont be.

blackburn mark
01-10-2012, 11:06 PM
I'm saying nothing lol :) but your not far off the "Mark"


Hence why Iím thinking of swapping cameras to

1/3 SONY Colour 700TVL CCD Waterproof Camera, IR Distance: 50m (http://www.sunsky-online.com/view/251572/1+3+SONY+Color+700TVL+CCD+Waterproof+Camera++IR+Di stance++50m.htm)

Give me more of a Stealth ability at night lol !

be careful splashing loads of cash on posh branded ccd .... in my experience all things being equal (chip size and lens quality) i never could tell the difference between a branded and a ten bob ccd board
they all seemed to "hunt" for white balance etc and the picture quality tends to be pretty bad.
i used to stick them in a paraglider wings during flight before gopro got its act together :)
make sure you get a slack hand full of lenses one really wide one 150+ degree field of view would probably earn its keep (standard threads are 12mm x 0.5mm pitch)