Hi all! I'm looking to use Arduino is a project of mine, and I had some questions. I have some programming experience with Java and PHP, and just barely any with Python and C++. I don't know much of anything about programming with Arduino, nor do I know much about building robots, so sorry if my questions might be obvious.
I'm making a vehicle that will be set to get a set distance (10 meters to 50 meters). The distance the vehicle travels needs to be VERY accurate (like to 3 decimal places?). Will I be able to be this accurate with the Arduino using servo motors moving the vehicle?
I'm pretty new to motors, but I do know that if you're thinking of driving a wheeled vehicle, your scheme won't work because servos only move 180 (or sometimes 360) degrees. See Whats a servo: A quick tutorial for example. You'll want to use a DC motor, I think.
You won't get 3 digits of accuracy from a servo. And even if the surface is quite flat you will get some error due to slippage so an encoder may not solve the problem, although its worth a try. Can you say more about the task and any restraints (for example, can you set up a few ultrasonic reflectors around the periphery so your vehicle can triangulate a fix from them)
Yes but even with stepping motors 3 places of decimals for dead reckoning is almost impossible over such a distance due to the backlash in gearing as well as slippage.
Perhaps if the surface can be marked, reasonable accuracy can be achieved by using it as part of a giant encoder. A light sensor running over a series of bar-code-like markings would detect pulses you should be able to read.
Three decimal places on meter-range distances is millimeter resolution, which should be fairly easy to mark accurately over a 50 meter distance. The design of the 'bar-code' would be the smart bit, but if your dead-reckoning is good over, say, ten centimeters (definitely feasible with good steppers), you could encode an absolute distance every ten centimeters over one centimeter (50 meters every ten centimeters would need 500 absolute references so 10 bits would be plenty, meaning at one millimeter per bit your reference would span ten millimeter or one centimeter) and then just have millimeter tick-marks in between.
Not for the faint of heart, but I think it might be implementable reasonably cheaply and easily.
A simpler version, if you're happy with the accuracy of your dead reckoning over fairly long distances (e.g. ten centimeters), would be to only mark the surface every interval to reset the dead reckoning. No need to have millimeter tick-marks, just an accurately positioned band every ten centimeters. You might even be able to hide such a design as part of some graphics on the surface.
If your task is to get the vehicle to go a set distance in a straight line (please do say what the actual task is) then you don't need to mark the surface, you could just carry a length of fishing line of the appropriate length attached to the vehicle and the starting point. When the vehicle reaches the correct distance the cord will be pulled taught and can close a switch stopping the vehicle
I'd print and paste, or buy from someplace like this. Alternatively, you could make your own rubber wheel-stamp with some creative carving, rolling on the ground and against another roller to ink it. Can I leave it as an exercise for the class?
For ease of deployment, I'd much rather dead reckon between markings each X centimeters, of course, as suggested at the end of my post.
Depends on the requirements for accuracy and the capabilities of the dead reckoning.
Why not just put a small mark at the target distance (or a few centimeters before to have the time to brake the vehicle) ?
Well, we still have to know what kind of material is on the floor and if he can mark it ^^
Its actually for a competition. I'm trying to build a car that goes in a straight line and goes to an exact distance that would be to 1mm accuracy. The distance is random between 5 to 10 meters.
So which kind of motor would I need to use? I'm not really sure of the different kinds of motors out there. You guys mentioned steppers?
Do I need a certain shield to use the Arduino with steppers?
Is it indoors or outdoors and how smooth is the surface? If its something like a gym floor you could monitor the distance traveled using somthing like the mechanism from an optical mouse. It won't be mm accurate over 10 meters but probably better than dead reckoning.
Why not use some real fast DC motors, coupled to a gearbox with a huge ratio and big ass wheels ? Maybe you could use a laser cut encoding wheel with a IR couple diode to get the exact number of degrees your wheel rotated.
I like the idea of decoupling the encoders to measure the distance from the motors driving the wheels, with different gearing and perhaps on different wheels?
Wheel slip is the critical question. If there is a chance for wheel slip, you must measure distance separate from the drive wheel rotation. If the surface is flat and smooth, just devise an accurate way to count the rollout of the wheels.
If you are concerned about wheel slip, put a tape measure on the back of the vehicle with the end attached to a weighted base. Then punch holes in the tape measure for absolute position points and measure the rotation of a pinch roller to add on to the last punched holes read.
If wheel slip isn't an issue, go for small wheels. That gives you better accuracy measuring a fraction of a wheel rotation. Slower vehicle, but more accurate.