Robot 4wd with 4 motors, PC with Windows, and Windows Kinect

Hi Everyone!,

Help with my project will be greatly appreciated.. Also, I know the below is a lot to ask for and know what I am asking. However, if you have notes from an existing project like this, the effort to just send will hopefully be easy enough to help me out (emcgehee@jym-st.com). I am a complete Arduino and Robot noob by the way.

Background: I have done quite a bit of reading but I am a robot and arduino noob. I'm an ex Air Force Structural Mechanic and have decent mechanical experience. I build my own PC's but I do not know how to make my own boards (plug and play).

Objectives: Robot will have the frame with potential to ride it with up to 500 lbs. PC or Laptop and connect to Arduino and kinect. Kinect will be used as a follow robot Option to crontrol using a bluetooth controller via PC Windows

Hardware: Lithium car battery for performance (can this power the laptop, car and everything or how to prevent ruining my electronics with control of power)? Car setup with 4 wheels and 4 motors. What Arduino boards, shields and items do I need for electronics? I was reading about an H bridge and other issues with 4wd and 4 motors. Could someone explain and has a solution? Complete hardware list to accomplish the above would be cool, if someone has the time. Schematics for mechanics and electronics would be amazing!

Kinect-arduino applications: Arduino IDE Kinect SDK for windows *I hear C# is good but do I need to use this as well or what languages should I use? *I will need to learn coding for these applications to modify to my use but existing coding would be appreciated for a good starting point.. 4wd with 4 motor coding would be outstanding!

Thanks for the help in advance!

Edgar McGehee

I would strongly suggest starting with a few smaller projects before you try to tackle something this ambitious. There is a lot here and I'm sure that many of your questions will answer themselves once you start with something simple.

Put it this way, you are an AF structural mechanic. What if I told you that I wanted to build my own airplane, but have no experience with welding or aerodynamics, or any other skill involved. What if I was asking questions like what materials are airplanes built from and what size wrench would I need to build my own plane?

I doubt that 4 wheels and 4 motors is a good design. Two motors will be sufficient, more motors only require perfect synchronization. A truck can carry more than 500 lbs using a single motor, the load is not related to the number of motors used.

Can you provide a schematic drawing of your chassis?

Part 1:

emcgehee: Hi Everyone!,

Help with my project will be greatly appreciated.. Also, I know the below is a lot to ask for and know what I am asking. However, if you have notes from an existing project like this, the effort to just send will hopefully be easy enough to help me out (emcgehee@jym-st.com). I am a complete Arduino and Robot noob by the way.

Background: I have done quite a bit of reading but I am a robot and arduino noob. I'm an ex Air Force Structural Mechanic and have decent mechanical experience. I build my own PC's but I do not know how to make my own boards (plug and play).

This is an extremely ambitious project, and I agree with others that you should get a few (actually, several) simpler projects under your belt before tackling this one. Those other projects can also serve as test beds for this larger project, while being of a size that won't take up your living room.

I should also note here that this project will be expensive - depending on your skills, parts availability, scrounging capabilities, etc - I would expect you to spend a minimum of $500.00; realistically plan for spending much, much more than that - if you haven't already.

As far as those simpler test beds are concerned - you'll want to investigate simple things, like connecting and using a switch with the Arduino, along with how to hook up and use quadrature encoders (for wheel position and speed sensing). Learn how to control servos (learn how to build your own servo while you're at it!). Find out how to control small h-bridges and small DC motors. Build a small-scale version of your platform; it doesn't need to be exact or have all of the features, but it should be a platform you can experiment with. Don't make it much larger than a larger (say 1/10 scale) hobby-grade RC car.

Indeed, I would suggest that you learn how to hook up and control both a hobby-grade RC car (like something from Traxxas, Losi, or Redcat Racing) - as well as a toy-grade RC car. Hobby RC cars are simple to control (using the Arduino's Servo library), while toy-grade cars require a bit more hacking to get working - see this thread for starters (it's a reference that I post every time when this topic comes up):

http://forum.arduino.cc/index.php?topic=86883.0

Then, learn how to use the Kinect to control an Arduino; you'll also want to learn about various robotics control platforms, and the languages they use. There are a ton out there, most have interfaces to the Arduino and the Kinect - and they include a whole host of other libraries and utilities to make doing what you want to do simpler (note that I didn't say "easy" - nothing about your project - save perhaps building the frame - will be anything "easy" - trust me on this - seriously).

For instance - learn about "Firmata" (https://github.com/firmata/arduino) and Johnny-Five (http://johnny-five.io/). Maybe NodeBots (http://nodebots.io/) if you like javascript. Or, if you want some more esoteric like GoLang - try GoBots (http://gobot.io/). You could also do simulation of robots, such as with Gazebo (http://gazebosim.org/) or Assemblino (http://assemblino.com/). If Windows is your thing, there's always RoboRealm (http://www.roborealm.com/). If you prefer something extremely challenging, though - check out ROS (http://www.ros.org/), which is a true reseach platform used by universities, corporations, and hobbyists worldwide.

You'll also want to learn about something called SLAM (Simultaneous Localization and Mapping) - but save that for the future...

Below, per your points of interest, my comments should help guide you.

emcgehee: Objectives: Robot will have the frame with potential to ride it with up to 500 lbs. PC or Laptop and connect to Arduino and kinect. Kinect will be used as a follow robot Option to crontrol using a bluetooth controller via PC Windows

Let's call this robot your "final" implementation - ok? If you want an idea of what you are trying to build, research the CMU Terragator (it was a long-term research project in the 1980s, IIRC - so what you will find is mostly research papers about it). You might also want to look into the Parallax QuadRover - which was a robotics chassis they used to sell (interestingly, it was a hybrid power system of sorts - using a small engine driving a hydraulic pump, which powered hydraulic motors - powerful enough to pull a car). Just to get some ideas.

You'll also want to grab some books - for instance, "Robot Builder's Bonanza" (http://www.amazon.com/Robot-Builders-Bonanza-4th-Edition/dp/0071750363/) - that's the fourth edition, but I encourage you to get copies of the previous three as well (because things have been added and taken away over the years - I have all the editions, so I know), as well as "Building Robot Drive Trains" (http://www.amazon.com/Building-Robot-Drive-Trains-Robotics/dp/0071408509) - if I were only allowed two robotics books on my shelves, those two would be at the top of my list (I have many more than just those two, though).

Part 2:

emcgehee: Hardware: Lithium car battery for performance (can this power the laptop, car and everything or how to prevent ruining my electronics with control of power)?

I would stay away from Lithium chemistry for the time being - instead, go with good-old reliable SLA (sealed lead acid) batteries, like the kind used for electric wheelchairs. They are safe, reliable, and cheap. Later, you can upgrade them to Lithium based LiFePo batteries designed as "drop-in" replacements, which have charging controllers and such built in, so you don't need a special charger (they are much more expensive, but you get lighter weight in exchange).

In fact - regarding electric wheelchairs - such chairs (or the parts - unless you get lucky and score a cheap orthopedic wheelchair that can handle 500+ lbs) can easily move the weight for long distances. Look on craigslist and similar to find them, most will be selling for around $500.00. Look for differential drive wheelchairs (not power scooters). They are usually powered by two 12 volt SLA batteries in a 24 volt configuration. You'll only need the chair chassis and motors - if you get batteries, that's a bonus if they work. Don't worry about the controller or motor driver - they are highly proprietary and undocumented (for interfacing) - so don't even go there (and most of the time, the electronics are also heavily coated in conformal coating to prevent tampering and increase reliability).

For your power supply needs - those books I mentioned (among other sources) will give all the info you need. It isn't as hard as you think - but proper layout is key (to avoid building an impromptu welder!).

emcgehee: Car setup with 4 wheels and 4 motors.

Don't even go there - use two motors, and four wheels (if you must), connected with a chain drive for a skid-steer differential platform. It is a robust and proven solution (in battle robotics and elsewhere).

emcgehee: What Arduino boards, shields and items do I need for electronics?

You'll know when you get to this point.

emcgehee: I was reading about an H bridge and other issues with 4wd and 4 motors. Could someone explain and has a solution? Complete hardware list to accomplish the above would be cool, if someone has the time. Schematics for mechanics and electronics would be amazing!

I'm not going to do your work for you - do more of your own research as you learn. As far as h-bridges are concerned, for the size of robot you are planning you are going to need a large h-bridge - 50 - 100 amp per motor. These aren't cheap (not quality ones, anyhow). Look into companies like Vantech and Roboteq. Be prepared to drop your jaw and pick it back up. Don't be tempted to build your own, or you will likely end up spending more money chasing failing components than you would had you simply bought a controller.

emcgehee: Kinect-arduino applications: Arduino IDE Kinect SDK for windows *I hear C# is good but do I need to use this as well or what languages should I use? *I will need to learn coding for these applications to modify to my use but existing coding would be appreciated for a good starting point.. 4wd with 4 motor coding would be outstanding!

You aren't likely to find a ready-made solution, and any such solution you might find will probably be rife with bugs or other issues, or won't fit in with your control scheme.

As far as a language is concerned - I wouldn't worry about that right now. You might end up finding yourself coding a system in multiple languages (simplest case for instance would be C/C++ for the Arduino, and Visual Basic or C# on the laptop).

Finally - this is a huge word of warning - when you get to the point of building your "big" robot - build in your security and fail-safe system (hardware and software) FIRST. There should be a huge red emergency shutoff switch (like you see in factories) on the robot itself in an easy to hit location. There should be a wireless solution as well. There should also be an autonomous sensing solution (so that if the robot senses that something ain't quite right - it shuts down). Do all of this first, and test the hell out of it. You don't want to find yourself in a situation where your 500 lb robot is barreling down the street into traffic with as you chase it wishing you had a way to shut it down. Finally - when you do get to the point of initial testing of the large machine - do it "up on blocks" - wheels off the ground! I've heard of situations where people have modded electric wheelchairs, then did testing, and suddenly had an out-of-control 200 lb machine on their hands rolling down the hallway with no way to stop it. It happens, don't think it won't.

emcgehee: Thanks for the help in advance!

Edgar McGehee

You're welcome - and good luck.

DrDiettrich, I thought that having 4 motors would allow independent control over each wheel for more control but I can see your point. I'll look for more heavy duty motors to just require two.

I thought about using http://www.andymark.com/product-p/am-0950.htm for the chassis and is said to operate at up to 600 lbs but I just want to make sure that I have enough power.

Schematic: http://files.andymark.com/am-0948/schematic.pdf

Delta G, I understand the concern and have an outstanding book (Arduino and Kinect Projects). I'll flip back to earlier chapters as I need to and follow the model. However, someone with a similar project might have a different perspective on hardware with code. The book has an example but would like a live opinion from someone who actually accomplished this type of project.

With respect a complete aircraft system is far more difficult but I know what you mean.. even without considering weight, balance and aerodynamics in general. I don't want to re-invent the wheel but build off an existing system, which I understand is not too difficult.

I would pretty much need the chassis with setup from above, arduino pwm pin compatible parts to this system. USB to PC and Kinect with Arduino. Other than a few modifications for the car, it should just be about the code and an existing project could be a good start with the vehicle being able to at least move.

Cr0sh, thanks for the point of view on batteries and would you still start with acid, if you did not need to worry about budget?

Interesting idea about the wheelchair but I was looking for something more low profile.. even if it costs more.

I do love the tank style of movement but I was concerned about the power loss and reliability from reading forums but maybe I'll give it a shot because I would rather go for the better long-term goal.

Thanks for the advice with the H as well and this is for a work project, so I don't need to worry too much on budget.

I'm big on safety, so I'll give it a fail-safe system but I was not even thinking about that.. haha! I guess I did't expect a danger in this. Too funny just the image of a wheelchair or robot going ape $tuff.

I plan on using the 1/10 or 1/5 scale first.. I wouldn't want to ruin electronics or parts that are too costly but by knowing everything required at my ultimate goal, I'll be able to scale down a prototype. Awesome advice though!

I'll look at the resources that you mentioned and what do you think about this one that I have been reading? http://www.amazon.com/Arduino-Kinect-Projects-Design-Technology/dp/1430241675/ref=sr_1_1?ie=UTF8&qid=1443729175&sr=8-1&keywords=arduino+and+kinect+projects+design+build+blow+their+minds

Interesting idea about the wheelchair but I was looking for something more low profile.. even if it costs more.

Hmmm..., did you consider using smaller wheels?

Possible ideas:

https://www.youtube.com/results?search_query=wheelchair+motor+robot

Cool ideas.. I'll work on the actual robot and get back to you guys when I have it complete.

Thanks for the topics to consider!

Edgar McGehee

emcgehee: Cr0sh, thanks for the point of view on batteries and would you still start with acid, if you did not need to worry about budget?

If I didn't have to worry about budget - then I would probably start with the drop-in replacement LiFePo batteries you can buy now that are meant to replace same-size SLA batteries; typically, they are much, much lighter, have larger amp-hour capacity, and most importantly, they have the built-in controller to charge the cells properly off fairly standard 12 volt chargers which can be bought anywhere automobile parts are sold. Also, the LiFePo chemistry is considered safer (fire/explosion hazard due to shorting, over-charge, etc) than standard LiPo.

I would not go with my own custom LiPo solution - because then you are looking at cost issues (and possibly problems) associated with charging the cells properly, and all the other issues. If you had somebody who understood this on your team - that you could delegate that part of the system to, then that would be a different thing (you might then potentially save money). But - if you are planning on doing this using mostly COTS components - then the mentioned LiFePo solution would likely be best.

That all said - if cost was a factor (and I now understand here it isn't) - SLA batteries are great for this kind of purpose. They are proven capable and reliable for use in electric wheelchairs, where they can last and run for many miles between re-charges, and they are easy to design a charger for as well.

Just so you know - I have been a volunteer for this organization for a couple of years now, and have learned tons about electric wheelchairs, and what they can and can't do over that time. They are some of the most robust machines for helping people on this planet - we actually find them perfect for robotics platforms when we need something heavy duty.

emcgehee: Interesting idea about the wheelchair but I was looking for something more low profile.. even if it costs more.

Definitely, though, look into at least the motors - they are some of the most durable and quietest motors you can want - and some of them actually have fairly low current draw. The only downside is that they are 24 volt devices, but that only matters when you need to charge them; you either make a 24 volt charger, or you build or buy a 12 volt balance charger (they make such a thing - but they aren't cheap - we used one on a custom art car we made for Burning Man that used 4 extremely large SLA batteries meant for a telco UPS system - it was running a 36 volt golf-cart motor - we could get that thing to do 40 MPH!).

emcgehee: I do love the tank style of movement but I was concerned about the power loss and reliability from reading forums but maybe I'll give it a shot because I would rather go for the better long-term goal.

With any skid-steer system you'll have a power loss - especially if doing panning-style or single-side running turns; losses are less if you do proper forward-motion turns (where you're running both sides, just one at a slightly slower rate, the total difference in speeds, of course, being related to the rate of the turn).

Reliability is only really an issue on a tracked system - unless you purchase actual tracks (for this larger scale robot - if you want tracks - and since this is a work project: Use snowblower replacement parts for the tread system, or look into those custom track systems meant for 4WD off-road trucks; a couple of those, while very expensive, would make for one bad-a$$ machine).

emcgehee: Thanks for the advice with the H as well and this is for a work project, so I don't need to worry too much on budget.

Then stick with Vantec (http://www.vantec.com/) or Roboteq (http://www.roboteq.com/) - trust me on this, both companies have awesome and proven products.

My friend Lance at Wheelchair Labs has used Vantec controllers in the past - they are very capable controllers, though not as "polished" as Roboteq's offerings (but the difference in price is insane - but you get what you pay for, and Roboteq's controllers are top-notch in that).

emcgehee: I'm big on safety, so I'll give it a fail-safe system but I was not even thinking about that.. haha! I guess I did't expect a danger in this. Too funny just the image of a wheelchair or robot going ape $tuff.

Yeah - the image is funny - until it happens to you! Ok - it can still be funny then, provided you have insurance (property and/or health and/or life) and pain isn't an issue. But seriously - design this part and test it first. Don't try to "do it later" and "patch it in" - this is why so much "security code" in software development fails, because the systems weren't designed around the proper needed security, and it was attempted to be patched in later, resulting in a poor and buggy implementation. I've seen it too many times in my software development career. The same design strategy unfortunately happens in hardware, too. Do it right - give it thought, put it in at the beginning, and test the hell outta it - then work on the fun stuff.

emcgehee: I plan on using the 1/10 or 1/5 scale first.. I wouldn't want to ruin electronics or parts that are too costly but by knowing everything required at my ultimate goal, I'll be able to scale down a prototype. Awesome advice though!

Prototyping is one of the best ways to test your ideas, and to learn what works, and what doesn't. Since this is a work project, you might find that a Lego Mindstorms kit might be a good prototyping investment. Or - if you want something much more professional (but not as easy to get in the States, unfortunately) - look into Fischertechnik. It isn't a cheap construction system, but it isn't really a toy, either. You can build actual functioning systems with it; it is used by universities and such to teach mechatronics and other engineering practices. As such, though - it isn't cheap.

Another option would be stuff like MakerBeam (and other small-scale extruded aluminum t-slot profiles) and/or ServoCity's prototyping and robotics building stuff...

emcgehee: I'll look at the resources that you mentioned and what do you think about this one that I have been reading? http://www.amazon.com/Arduino-Kinect-Projects-Design-Technology/dp/1430241675/ref=sr_1_1?ie=UTF8&qid=1443729175&sr=8-1&keywords=arduino+and+kinect+projects+design+build+blow+their+minds

TBH - I haven't seen that book before, but I have been impressed with that particular publisher's other offerings for other authors about the Arduino and robotics. I'll have to look into it.

Your vision is certainly big, as it should be!

Just as a heads up to the feasibility of your project, regarding using a Kinect camera, it is possible, and there are some good resources to get you going without Kinect for Windows SDK.

You can Google Kinect for Arduino to get some idea of the books available to help you get things up and running with the Kinect. When it does work, the results are very satisfying!

However, you should be aware that the Kinect has some limitations. One for example is that is won't work very well in a brightly lit environment. Even a living room with the sun shining in through the window can render the Kinect inoperable. It is also only good to a range of about 15 feet, max, under ideal lighting, in my experience. Take the previous poster's advice and really break this idea of yours down to the most basic steps, and get each step up and running reliably before trying complicated control methods such as a hacked Kinect.

Good luck, would love to see the finished machine one day!