So I'm new to LMR, and this is my first robot. For now, it's just an Arduino Uno, a motor driver circuit, and two motors. The motor driver circuit I got from here: https://www.robotshop.com/letsmakerobots/node/2074 - thanks heaps to guibot, that circuit solved a problem I've for yonks.
The base, motors and gearboxes were ripped from a kit I had, a line-tracking bot from ■■■■ Smith, which didn't work (one of the transistors literally exploded), the Arduino was from . . . well, Arduino, and the motor driver circuit was built from guibot's schematic (see above link). There are two bits of wood between the Arduino and the gearboxes, and the motor control and the Arduino, to prevent shorting. It's powered by 4 x AAA batteries.
UPDATE (29/1/11): I got a Sharp GP2Y0A21YK IR sensor, and a servo, and mounted the first on the latter (so the sensor can look around, but I haven't got that far), and replaced the 4 x AAA batteries with a 9v, and now the robot is an obstacle avoider: when it senses an object, it stops, chooses a random angle, rotates that angle around to the left or right, then continues on its merry way.
Am currently having problems with the gearboxes; one seems to drive faster than the other, and if I use PWM to slow it down, it stops completely. But I will continue to work on this. Future plans for this bot are now: driving around instead of away from obstacles, and hopefully after a drive mapping out its path in Processing.
Thanks for reading.
Avoids obstacles
Actuators / output devices: standard 4.5v motors
CPU: arduino uno
Power source: 9v battery
Programming language: Arduino programming language
You must be an Aussie when you mention ■■■■ Smith’s. It was only 20 dollars and it works a treat as a line follower. I worked out the micro in it was pinout compatible with a pic16f84 so I stuck a socket in it in case I wanted to play around with it later. Why don’t you make it a line follower if you’ve got the sensors still?
But a maze solver would be good. I’d like to have a go at building a maze solver soon.
Ahh good old ■■■■ Smith… not what it was 15 years ago. Now it`s just a small Hardly Normal with some sad looking mostly empty component trays cowering up the back.
I’m not sure how good the sensors still are. I tested them as proximity sensors with my Ardino (or two of them, at least), and while one worked fine, the other was a little weaker, and I have a feeling the third isn’t too good either. This I attribute to my soldering from all those years ago, which was awful. (I know this isn’t really a good reason, but hey. Also, I was going to use those sensors for maze-navigation on this bot, but as I said, they are a little dodgy, and I’m getting some better ones)
Reason two is a lot more simple, and has less holes in it: I don’t know how to. I don’t know how it tracked the black line, and I’m not sure how to do it myself. Assuming I need only the Arduino and sensors, if you could provide an explanation of how to do it, I will give it a go.
to get some new sensors then. If you think the old ones are damaged. If you bought the qtr-1rc from pololu you could just use my sketch for the line follower I posted here. I used 3 and they cost around 3-4 dollars each.
Just had a look at your Polduino (very nice, by the way), and I might look into that after this current bot is finished.
Several questions about it though . . .
1. In the sketch it is programmed for five sensors whereas your pictures show only three. I assume this can be fixed by lowering the max “line tracking” value from 5000 to 3000?
2. How are you controlling the motors from the Arduino? I notice you used PWM, but can motor driver chips take analog values?
The library from pololu supports up to 8 sensors actually. You define how many sensors in the variable NUM_SENSORS
PololuQTRSensorsRC qtrrc((unsigned char[]) {8, 9, 10}, // and here the pin assignments for them(3 sensors) using pins 8-10 NUM_SENSORS, TIMEOUT, EMITTER_PIN); // if you had 5 then it would be {6, 7, 8, 9, 10}
The 0 to 2000 values indicate which sensor the line was last seen under because I used 3 sensors. 0 = sensor0, 1000 = sensor2 and 2000 = sensor3. If you had 6 sensors it would be like 3000 = sensor4, 4000 = sensor5, 5000 = sensor 6 etc… As sensor 1 was my middle sensor I wanted it to maintain as close to 1000 as possible. So I just kept testing if it was less than 900 it was to the left of the line so turn right and if it was higher than 1100 it was to the right of the line so turn left.
I thought I read that analog write is different to anolog read in that it uses pwm to get the variable voltage output. Well it seemed to work anyway. The value can range from 0 to 255 with higher values giving closer to full power. I only used it to slow one motor so it would track as straight as possible and not veer off and need to be corrected continuously.