The goal of this project is to build up our skills. While it would be fun for our first project to be to build a laser harp or a self playing and easily programmable guitar (both projects to expect later on), I’m going with something ‘easier’ but still awesome for our first project because this is potentially going to be the first project for a number of people.
Quick note about why I chose this as the first one: It will entail the basics of Arduino/robotics like digital output, digital input, serial read/write etc. so it’s simple and interesting.
Focuses: (What it is, how it relates to this project)
- Reading circuit diagrams
- Not releasing the magic blue smoke
- Digital I/O on Arduino
- Controlling motors with an Arduino
For anyone who don’t know what the ‘magic blue smoke’ is, it’s when you fry an electric component. If you put too much voltage or current through it, it will release some blue smoke and the magic inside of the component that made it work is gone forever.
So let’s get started!
What do we want to do? Build a small car of our own that we can control and can be upgraded.
Let’s break that down a little. It needs to: Drive, be controlled, not take up all the resources doing the basics and not crash into things when driving forward.
How will it drive? I’m personally a fan of the Arduino -> H-bridge -> two Motors set up. Where you control forwards, reverse, left and right by controlling the motors rotation. This handy diagram I drew (in paint…) will help describe what I mean. M = motors, C = caster so this design traditionally works on three points of stability.
The alternative option is two ‘drive’ wheels and one motor and two ‘steering’ wheels which are turned by a servo and three rods, this is what you see in the cars you drive. That option is more energy efficient when in use however the option I’m going with is easier to build and program for us.
How will it be aware of it’s surroundings? Because we’re not putting this on the public streets of $INSERT_YOUR_TOWN_HERE we only really need to worry about what’s directly in front of it so it doesn’t crash into things. We have a couple of options. Laser Distance sensors, Ultra Sonic distance sensors and Infra-Red distance sensor (which comes in ‘analog’ and ‘digital’ versions. So it will either tell you ‘this item is X distance away’ or it will simply reply HIGH or LOW depending on of there is something too close to it or not). The Laser is the most accurate, but also the most expensive, the analog Infra-Red is fairly accurate with a decent range without being too expensive, the Ultra-Sonic is cheaper but the cheapest and least informative is the digital IR sensor. Each of them have their benefits and their drawbacks (IE: laser is most accurate however is less accurate when being shone on items that are reflective and the cost is another drawback. Ultra Sonic has poor range) however for our purposes I’m going to be using the digital IR sensor ones because that’s what I have lying around and they fit the bill for what we need.
Thinking? The Arduino will do the thinking. It will take information it’s given (from us, from the sensors) and go from there. However it won’t know anything else about the world. For example unless we put a sensor on the wheels (an encoder for example), it won’t know if a wheel has stopped spinning
That about covers planning. Next post will be movement!