Step 10: The Code

Step 11: More Videos

here are a few more videos in case anyone wanted to see...#2#3#4#5

What this is:

This instructable will show you how to make your Arduino into an R/C interface that you can use for just about anything requiring remote control. I will also show you how I built an R/C lawnmower using my Arduino, a cheap R/C transmitter and receiver pair, and a couple of electric-wheelchair motors from Ebay. I have used this interface to control anything from basic LED's to Bipolar stepper motors, mini-robots, lifeless R/C cars from the thrift store, and even a 100lb lawnmower (all with appropriate motor controllers). It is very flexible and easy to change and very simple to set up.

See a slightly different version of the Lawnbot400 in my new book "Arduino Robotics" , as well as a DIY Segway and several other bots.

New wheel-barrow bucket mounted on top with hinges so it can dump its contents.

UPDATE 3-10-10: NEW CODE

And new video of the Lawnbot400 moving a bunch of dirt from my truck to the flower beds across the yard, also I updated the code again.

.

I added some new code to the project that is safer, including a manual kill-switch and a Failsafe switch.

To implement the Failsafe, I used another Atmega168 (or an Arduino), to control a normally-open 60amp power relay. The relay disconnects the power to the motor-controller unless receiving a "good" signal from the 2nd microcontroller. This signal is updated 2 times every second and is either ON or OFF. If the bot gets out of range, it loses power to the motors. If I flip the kill-switch on the Transmitter, it loses power to the motors. This is also a handy way to disable it remotely if anything were to go near it that wasn't supposed to. The updated code for both microcontrollers is on the CODE page.

In addition to the failsafe, I changed the way the code reads the PPM signals to make it more reliable. Also, I realized that I was only able to run the bot at 80% speed with the old code, so now it is quite a bit faster and has more power (it can carry me across the yard @ 155lb).

Check out this new video of me riding the Lawnbot400, my wife driving it over a bunch of branches, then me making do some wheelies. Don't worry, the mower was turned off this time since the grass didn't need cutting, we were just having fun.

Disclaimer:
DANGER!!! This is a VERY dangerous piece of equipment if not handled appropriately. Since all the electronics have been home-built and the Arduino code is new, you MUST be very careful while operating anything heavy with this code. I have had 1 or 2 times during testing - and before adding a secondary failsafe - that the main Arduino jammed up and I temporarily lost control of the mower for a few seconds!!!! Though I have added several filters to discard unwanted signals and I rarely have any issues, an un-manned lawnmower IS STILL A POTENTIAL DEATH TRAP and I assume no responsibility for anything that happens as a result of your use of this code or this tutorial. This is meant as a guide for people who not only have the ability to build such a contraption, but the responsibiltity to operate it safely as well. Any suggestions or ideas on how to make this a safer project is always gladly accepted. Having said that, it's also awesome.

Background:

Most R/C equipment comes packaged for a single specific use, which makes it easy to use but is very limited in what you can do with it. So using the Arduino as an interpreter between the R/C system and the motor driver, I can use any motor controller that I want (depending on the size of the motor and power required), reprogramming the Arduino to supply the required signals.

What I ended up with:

After successfully hacking a few R/C cars from the thrift store, I got bored driving them around the driveway and I was having a hard time convincing my wife that there was any usefulness in the revived toy car. So I decided it was time to make my biggest chore at home, a whole lot easier and actually put my Arduino to work, and thats how I ended up building an R/C lawnmower.

While designing the lawnmower, I thought it would be cool to learn about the electronics that made it move, so I designed and built my own motor speed controller (or H-bridge) to power the lawnmower. I looked around at every H-bridge design I could find before deciding to go with a Mosfet h-bridge that uses both N-channel and P-channel Mosfets.

I built several different motor driver boards for this project, the first two were on Radio-Shack perf-board and the next 4 were designed using EagleCad and etched to a piece of copper-clad PCB, using the toner-transfer method. The most recent board is the one I use to mow the lawn as it has the ability to stay cool even while operating for long periods of time (30-40 mins straight) at 10-20amps and 24vdc. FWIW, I had to burn up a lot of Mosfets to find this out. If you want to see any of my other motor controllers, go to www.rediculouslygoodlooking.com and check out the Mosfet shield.

Here is what I bought already assembled:
FM R/C transmitter and receiver pair from ebay = $40
Arduino = $30
I already had a used push-mower = $60

This is the best Instructable on Instructables. Pure genious. I think I first found this on RC Groups and then Googled around until I ended up here. I searched on eBay and Craigslist for wheelchair motors. They were all way to expensive. ($300 for a set). But I just found an old guy that rebuilds wheelchairs in his garage. I got a set of motors and wheels, some castor wheels, battery boxes, and several other things for $50! I'll be FPV-RC lawn mowing by spring!

I took the spring off of the switch on the motor that the throttle cable pulls... then used a zip-tie to hold the switch open so it would allow me to crank the mower and it stay running. Then connected 2 wires to the contacts on the cutoff switch, connected to a relay to turn it off.

Sorry to bug you all again, another question. I am having an issue finding a 6ch Transmitter Reciever for a car. Does it need to be 6 channel, can it be more or less. Or is that for expansion of future stuff?

Hello, i have recently had this project rekindled in things to build. I have wanted to do something like this for a long time. And with the recent snows this year i have had a thought to put a snow scoop on the front of it to shovel. I have one maybe two questions for you. All the RC transmitter reciever pairs i am finding on ebay are in the GHZ range. I am new to arduino and not sure if this will work. And i guess the second question is, I see alot about the scooter motors, wheel chair motors are pretty expensive versus the scoter motors. Do you think the scooter motors handle mowing the lawn, hauling dirt and or a person around, and shoveling snow? Thank you in advanced for any comments

I been reading the arduino r/c lawnmower and am looking into building it. Just have a question, do u have a schematic for the pcb, or layout, with the receiver on it. The pcb under the moter driver board. Not sure how to connect the components on the board to the receiver and the to the power board and to the h-bridge board

Hi. Great instructable! Especially the 3x8 HBridge! I am going to use that one for my arduino powered dalek.

I ordered the parts list first from this instructable. Then i checked out your github for the files. (STUPID me! First check all the files and then order your stuff). It turned out that the parts list here and the .sch and .brd files don't fit together. The V3 version only has 1 elco in the middle, instead of the 4 on the rest of the pictures. Do you perhaps have the originals also somehwere that match the partlist here :-). Thanks ramses

Hey John, sorry to ask again, am trying to get ahold of a schematic of the trasmitter board, and it seems that none of the links in the comments are working anymore. I need some idea on how to put it together and whats on it. Would love to see them, am disabled and am facsinated with this idea. Have all the time in the world to play with and build stuff. Ty in advanced.

I'm going to build something similar to this, but I'm going to make it so not only can I suspend the mower, but mount it on top for longer cut on rocky terrain.

I don't like the sprocket and chain system though, but I haven't done enough research or know for sure I can do it any other way. I'm worried the chain is too complex and something weeds and twigs will get caught in.

The main problem I'm having is I can't find these wheelchair motors for a reasonable price. I live in Australia and there don't seem to be any local cheap ebay auctions for these, and shipping on these suckers from the USA is $100-$200. I can't even find a cheap old wheelchair.

Is there a more... retail... kind of product I can use? Something like a servo/actuator I can order? I have no idea what I'd need to look for in terms of torque though. What sort of specs would I need to ensure in such a product to make it work with this project?

I need it to go up steep hills (30 degrees?) in long grass on rough ground. I'm already getting hardier wheels, larger drive wheels, and I found a company in Australia called Fallshaw that makes puncture-proof semi-pneumatic castors (though I can't find a price!), I will check out one of their stockists soon.

Because I need to mow my rocky terrain sooner rather than later, I might build the frame and use it like a push mower until I can get the motors and retrofit the electronics.

Any suggestions on alternatives to wheelchair motors would be appreciated.

i used e300 razor scooter motors they are 280w each (there are larger sizes of motors up to 500w that i have seen so far) and the ones i got were off ebay and i only paid about $65 for the pair they are working well so far i have not had any trouble with them and the sprocket size on them is #25. if you are comfortable with drilling your own holes there is #25 sprockets on amazon for pretty cheap they also have #25 size chain (10ft for $12). Hope this helped

i have a 72 tooth sprocket on my 10 inch wheels (still goes fast with about an aproxamatly 5:1 ratio, but that is besides the point ) i put a wagon behind it and it was able to pull me (160 lbs. ) with ease and it struggled a little (like it might not do hills) with me and my 2 cousins in it ( about 350 lbs.), but if you change the gear ratio to a higher ratio then mine then it should be able to pull alot more then what i did, mine is too fast even with that gear ratio so i'm thinking about changing mine, but if you are using a 72 tooth sprocket on the wheels it should be able to pull about 200-300 pounds without it having much trouble but once you go over about 350 pounds then it will struggle. Make sure you are using 24v (for the torque) , and dont hit rocks with it (i did and i was sorry for about 2 hours of work [with the blade not the mower itsself] ) :)

If you have any more questions feel free to ask me, i would upload a video but i finished it then pulled out all the electronics in the back pannel to install an alternator.

I was lucky motors of the wheelchair gave me one for free otherwise they are expensive but the best solution, as an alternative solution can be taken from the truck to 24v, scooter, such as John, but the best of the wheelchair I was denied the money I worked 2 years but the project eventually end only needs to be persistent.

I'm also in Australia close to Ballina NSW, I hounded a local scooter shop about an electric wheel char they had on consignment for $380, eventually got it for $150. If there are old people living near by (lol) there should be a scooter shop which will have parts. Batteries I got for $5 each (deep cycle) as they replace both batteries at once and one is normally "still ok". Hope this helps

Hi y'all! I'm currently sourcing parts for this bot (following your awesome book's blueprints :) , thing is I cant get any wheelchairs motors for a decent price.

Then there are quite a few electric scooter motors going around, some even have gear reduction (http://cpc.cx/5Jm), so i was wondering if those would be ok to use...Also regarding the frame, no 2" angle iron around, biggest angle iron i can get at fair price is 4cm (1.57").

About This Instructable

Bio:I have always been one to take things apart to figure out how they work, so most of what I own has been dismantled. If it can't be taken apart or hacked, i'd rather not have it. And I like to do thing...read more »