Society of Robots - Robot Forum
Mechanics and Construction => Mechanics and Construction => Topic started by: Nastybutler187 on October 01, 2007, 04:57:27 PM
-
Here's the story: I'm pretty new to this entire circuitry thing. I have a project for school (science olympiad specifically) in which I need to build an electric vehicle that travels a precise given distance.
For example, they would tell me that my car would have to stop at 173 cm, at which point I will program it to do so, and let it run.
I've been looking around a bunch of different online robotics shops, but I can't seem to find anything that I think is fit. I guess what I am looking for is a programmable motor, something running off of a 9 volt or so that I would be able to program to make a certain number of rotations. I would also naturally have to be able to change the number of rotations I want it to make at any point (changing it would have to be relatively simple, not something I would need to solder, etc. at home). Anybody have any ideas where I could go about finding something like this?
If worst comes to worst, I'm thinking about using a mechanical system for stopping the car, such as a wing nut sliding down a threaded axle as the car moves. In that case I would still need a motor to give the car its initial momentum.
Any help would be appreciated, thanks guys :)
-
I guess what I am looking for is a programmable motor, something running off of a 9 volt or so that I would be able to program to make a certain number of rotations. I would also naturally have to be able to change the number of rotations I
you need an encoder for your motor
see these:
www.pololu.com
http://www.active-robots.com/
If worst comes to worst, I'm thinking about using a mechanical system for stopping the car, such as a wing nut sliding down a threaded axle as the car moves.
why use wings? apply a braking system on the motor to stop it from running, say with the use of H-bridge ..
-
Hey, thanks for the quick reply. Could you please be more specific? Like I said I'm pretty new to this. Is an encoder the same thing as a motor controller? And where might I find one that would limit the number of rotations a motor would make? Thanks
-
Is an encoder the same thing as a motor controller?
encoder is this
http://www.societyofrobots.com/sensors_encoder.shtml
And where might I find one that would limit the number of rotations a motor would make?
this is where the microcontroller chip comes in, and you have to do programming on this
http://www.societyofrobots.com/microcontroller_tutorial.shtml
-
Thanks again. Reading this is a bit intimidating.. it seems pretty difficult. I have a couple more questions though. I read about the encoders, and it seems those are used to measure the distance a robot moves, not tell it to move a certain distance like I need. Also, exactly what parts would I need, and how much would it cost altogether? I'm looking for the precision to be to the nearest centimeter. Lastly do you know by any chance if anyone has done anything like this before. I don't want to order a bunch of stuff I know nothing about and end up breaking something.. Those links were pretty good but they wouldn't be specific enough for my purposes. Thanks man.
-
Thanks again. Reading this is a bit intimidating.. it seems pretty difficult.
at first glance it is difficult, but it's not that difficult
read the tutorial thoroughly, and use google or wikipedia for more information about encoders and its use
I have a couple more questions though. I read about the encoders, and it seems those are used to measure the distance a robot moves, not tell it to move a certain distance like I need.
By measuring rotation your robot can do things such as determine displacement, velocity, acceleration, or the angle of a rotating sensor.
what iam trying to figure out is that you are planning to make your robot move on a specific distance (displacement), say from point A to point B,
say on the x,y plane your starting point is at P(A,0) moving to P(B,0), this would indicate that your robot is moving on a straight path, simply counting down the number of rotations on the encoder you can measure if you already reached P(B,0).
remember an encoder could measure distance in millimeter(mm) but you can convert this to centimeter with simple math functions and vice versa
----
you could make this one in less than 80 bucks,
btw, are you planning to make it autonomous or RC?
-
So you're saying that I could at home measure out the distance of each rotation of the wheel using the encoder, and then when I'm given the target distance the car is to move, I will be able to input a certain number of rotations into the encoder for it to move that far? Also, for $80 do you think I could get a good enough encoder and other hardware that would be able to measure displacement to the nearest cm (millimeters would be even better of course)? And yes, I would make it autonomous so that it could start with the flick of a switch or something, start moving, and then stop at the given linear distance on its own. Lastly could you link me to the hardware I would need to make this possible, not including the chassis and basic stuff like that, but a good encoder, microcontroller, etc. Thanks.
-
You only need a single encoder and you can have it from this
http://www.acroname.com/robotics/parts/c_Sensors.html
for you microcontroller you can either go to PIC Microchip or Atmel
but i would like you to have PIC since it is cheaper
can be found here:
http://www.hobbyengineering.com/CatPCPROC.html
all other parts at
www.jameco.com
-
I understand that but like what's the difference between all of those other than the price.. could you pick out 2 for me that would be compatible? and what other parts would I need other than those 2 things?
-
motor and wheel encoder pair
http://www.acroname.com/robotics/parts/R253-WW02.html
http://www.acroname.com/robotics/parts/R246-GM8.html
compatible wheels : http://www.acroname.com/robotics/parts/R247-BLUE-GM-WHEEL.html
;;; motor driver here
http://robotstore.com/store/product.asp?pid=62&catid=1565
-
Thank you so much! How many of those encoders will I need, cuz it says "If you need a pair of motor encoders for a DC driven two wheeled robot, consider the WW-02 Wheel Watcher Kit. " Or since my wheels will be moving the same distance, will I be able to use one encoder for both wheels (one axle)? Also, what microcontroller could I use to later program the encoder to make a certain number of rotations?
-
will there be a start and finish line on the floor marking the place where you have to start and stop?
Thank you so much! How many of those encoders will I need, cuz it says "If you need a pair of motor encoders for a DC driven two wheeled robot, consider the WW-02 Wheel Watcher Kit. " Or since my wheels will be moving the same distance, will I be able to use one encoder for both wheels (one axle)? Also, what microcontroller could I use to later program the encoder to make a certain number of rotations?
you should only need the one encoder.
it is important to understand that you program the microcontroller and not the encoder.
you should check the programming section of the $50 robot tutorial to see what this would involve and wether you are ready to do something like that
-
Yes there will be a start and a finish. I'm also curious about how I'll be able to power an entire axle with 2 wheels with just one motor..?
Btw, I've been reading the different tutorials on this site, they are really interesting. Which section of the programming tutorial would pertain to me? I've read the sections about microcontrollers, PID control, and encoders.
Speaking of the encoders, I'm also still wondering about one thing. Everywhere it says that the encoder is used to measure things, such as how long it takes a wheel to rotate and to know how much distance has already passed. However, I would need the opposite of this. Instead of the wheels and encoder reading data, I would need them to actuate the data (as in, tell the wheels to make a certain amount of rotations, and then stop). Can an encoder also be used for this, and how? Or would I need other parts for that? Am I just missing something..
-
Couple more questions. Earlier, creedcradle sent me a link to a motor driver: http://robotstore.com/store/product.asp?pid=62&catid=1565
What is this for? Would it be necessary for my project?
Also, would it be possible to get all of this running with a 4.8 volt battery pack (or four 1.5 volt individual cells)?
Lastly.. do you know if it would be possible anywhere to find a pre-soldered microcontroller, encoder, and the whole deal already attached to some motors, so that I would be able to program it and save some time soldering? If not that's cool too but I'm just wondering if any of you guys have seen anything like that.
Thanks again.
-
Couple more questions. Earlier, creedcradle sent me a link to a motor driver: http://robotstore.com/store/product.asp?pid=62&catid=1565
What is this for? Would it be necessary for my project?
This is used to control control the motor and make it stop: BRAKE
Also, would it be possible to get all of this running with a 4.8 volt battery pack (or four 1.5 volt individual cells)?
YES. possible
Lastly.. do you know if it would be possible anywhere to find a pre-soldered microcontroller, encoder, and the whole deal already attached to some motors, so that I would be able to program it and save some time soldering? If not that's cool too but I'm just wondering if any of you guys have seen anything like that.
try to check this, but there is no encoder attached to the wheel yet
http://www.junun.org/MarkIII/Info.jsp?item=1#
and this
http://robotstore.com/store/product.asp?pid=778&catid=1555
-
That's cool, thank you again. It's really expensive though, I think I'm gonna try to build it myself. I'll get the encoder, microcontroller, motor, and H-bridge you suggested. That totals at about $60. Which microcontroller would be compatible with all that?
I still am not really sure if I'll be able to use this to program how far the car should move, not just read in how much it does move.
-
Which microcontroller would be compatible with all that?
http://www.hobbyengineering.com/H1346.html
I still am not really sure if I'll be able to use this to program how far the car should move, not just read in how much it does move.
It is vice versa:
I still am not really sure if I'll be able to use this to program how far the car should move, not just read in how much it does move equals when you read how much the car moves, then you know how far the car should move.
say, one revolution of your encoder equates 2cm , then if you want your car to move 20cm from its origin, simply read 10 revolutions from your encoder and bingo the car is at 20 cm from the origin. ;D
when you're done with your robot please post it here... thanks... :D
P.S
sorry for my bad english, it is just my secondary language :-[
-
I understand what your saying. But you said: "simply read 10 revolutions from your encoder and bingo the car is at 20 cm from the origin. "
For example, say, at home I tested it many times. I figured that 1 revolution is 2 cm. When I get to the competition, they tell me I need it to move 20 cm. I will then tell the encoder, through the microcontroller I guess, that it needs to make 10 revolutions. I need it to get that input from me, then when I click for it to start, I need it to start moving, and then stop directly after 20 cm or 10 revolutions. I'm sorry if it seems like I keep asking the same thing, but I'm just trying to make sure that I'll be able to do that, since that's pretty much the only thing I need this car to do. Thanks
-
Exactly. ;)
-
It seems that you need to input the distance the car needs to travel to your microcontroller ahead of start, right?
You need a couple of push buttons (or a numeric keyboard) to input the distance to the microcontroller and a display to see what the values are. So when you press Start, the microcontroller reads the distance stored in a variable, then commands the motors to move until it reads the same distance from the encoders, then stops the motors. Actually, you need to give the stop command a little before the distance has been reached so you don't overshoot it. Experiment with your car to see how much distance it travels after you give the stop command. And have the display show the traveled distance all the time.
Take a look at this microcontroller: http://www.pololu.com/products/pololu/0225/ (http://www.pololu.com/products/pololu/0225/) it has the display and 3 push buttons that you can use to enter the distance and start the robot. It also has 2 DC motor ports (dual H bridge integrated), so all you need to do is connect your motors to those ports and the sensors (get the wheel watcher, it's the best) to the sensor ports, input the distance and go! The sensor ports can drive servos if needed.
List of parts:
- Orangutan microcontroller
- 2 DC motors
- 2 wheel watcher encoders for DC motor wheels
- chassis
-
Thanks you guys! I think that will be the optimal idea.
Will this encoder: http://www.acroname.com/robotics/parts/R253-WW02.html
and this motor: http://www.acroname.com/robotics/parts/R246-GM8.html
be compatible with the microcontroller?
You also said that I can store the distance in a variable. For my purpose, I'm going to have about 50 distances I will need it to memorize. Can it store that many variables? Couldn't I also just use some variables like 1, 2, 4, 8, 16, etc. so that like to get 19 cm I would just do 16+2+1?
Do you think that I could power this, along with the motors, with a 4.8 volt battery pack? I know it says 5-10 volts but would 4.8 be enough? Or I am also able to have four 1.5 volts in series to total 6 v, would that be enough?
Lastly, do you think it would be possible for me to only use 1 encoder and 1 motor? My car will have both wheels on the same axle (it will be going in a straight line), so if both motors are moving the same exact speed and distance, would it be necessary to get 2 of them?
Hah lot's of questions, thanks guys
-
Will this encoder: http://www.acroname.com/robotics/parts/R253-WW02.html
and this motor: http://www.acroname.com/robotics/parts/R246-GM8.html
be compatible with the microcontroller?
YES.
You also said that I can store the distance in a variable. For my purpose, I'm going to have about 50 distances I will need it to memorize. Can it store that many variables? Couldn't I also just use some variables like 1, 2, 4, 8, 16, etc. so that like to get 19 cm I would just do 16+2+1?
you need a keypad for this. follow Ro-Bot-X's suggestion for this
Do you think that I could power this, along with the motors, with a 4.8 volt battery pack? I know it says 5-10 volts but would 4.8 be enough? Or I am also able to have four 1.5 volts in series to total 6 v, would that be enough?
consider a voltage drop. better power it at 6.2Vdc
Lastly, do you think it would be possible for me to only use 1 encoder and 1 motor?
Yes.
-
Orangutan has plenty of memory space to store the directions and angles the robot must travel and turn. It will be your job to use the 3 push buttons and the display to load the info in the variables. Here is a sample of how I would do it:
Label the buttons like this:
Start Sel (select) Inc (increment)
Use the first row of the display to show which variable is stored (Enter first distance:), and the second line to show the input from the buttons (3 digit variable);
press the Inc button to enter the units digit (for 2 press it 2 times, for 3 press 3 times...) then press Sel to store it;
press the Inc button to enter the tenths digit, then press Sel to store it;
press the Inc button to enter the hundreds digit, then press Sel to store it, if it is 0, just press Sel;
after the first variable is stored, update the first row of the display to show the first angle variable and so on, when you reach the final variable, just press Sel without entering any digits to the variable, you are done.
Store all variables in an array and have the robot follow the values, like this: drive straight for A1 inches (or cm), turn A2 degrees, drive for A2 inches, turn A3 degrees and so on, stop when An is 0.
To turn, just stop one motor, the robot will not stop in place like for a turn in place. If you need to use a car like setup (one motor for propulsion and a servo for steering), then you have to know your turn radius, and start turning a little before the end of the distance segment is reached, keeping the steering turned less than the angle you actualy need to turn, so when you center the steering the car will be right on the next distance segment you want it to be. You have to tweak this to mach your car setup.
And press Start when you want the robot to actualy start the race...
For a car like setup, you need one DC motor connected to one motor port, one wheel watcher connected to 2 sensor ports, one servo connected to one sensor port on the Orangutan board. Don't forget to get the proper wheels for the DC motor...
-
Why dont you consider using stepper motors. It is less circuitry to worry about and it is easier then the rotary encoder to program(at least for me). And it is is more precise (encoders use light, there is always the possibility of receiving unwanted light). And instead of making a H-bridge you could buy an toshiba motor drive IC. That will reduce greatly the amount of work you will have to do.
-
creedcradle, why do you think I would need 6.2? If I use four 1.5 volt DC batteries in series, wouldn't that give me enough voltage?
Ro-Bot-X, my project is actually much simper, as I won't need the car to be turning at all. It's just going to go in a straight line until the target distance is reached, and then stop. Also, you say in addition to one motor and one encoder, I would also need a servo. What is that and why would I need it?
Tsukubadaisei, could you elaborate on this? How would a stepper motor be easier to use in this case? Could you send me some links to the parts you are suggesting so I can check them out?
Thanks guys
-
Ok, first, the board has to be powered with at least 5V. Here is a quote from the web page at Pololu:
The Orangutan input voltage is 5-10 V, making it well-suited for use with small DC motors and 5- to 8-cell NiCd or NiMH battery packs. The motor driver can supply up to a maximum of 1 A per motor channel, subject to power dissipation requirements.
If your project only needs to drive straight then stop, you don't need the servo. Use 1 DC motor with 1 wheel watcher with the Orangutan board. This will give you an easy way to do your project. In the car like setup, the servo motor is used for steering.
Servo is basically a DC motor with a gearbox and some electronics that allow precise controll of the servo arm. It is usually used in RC planes, boats and cars, but lately it is more and more used in robotics for arms, legs and propulsion. Modified for continuous rotation, servos are easier to integrate in a robot because they don't need a driver (H bridge) and they use only one pin of the microcontroller for controll. To make a servo spin, the microcontroller sends pulses from time to time. When a pulse it is received, the servo moves a little then stops. If you measure the distance traveled during this pulse, you may generate a number of pulses for a specific distance to be travelled.
-
Thanks. Yeah, in that case I won't need the servo motor. Can you explain to me a bit about the circuitry? For my project, I'm only allowed a 4.8 volt battery pack or four volt 1.5 batteries. I understand the board needs at least 5 volts, but would I need separate batteries to power the motor? Or is there some way to use the same electricity going to the microcontroller to power the motor? Thanks
-
The board is designed to use the same power supply for both motors and electronics, so all you need is a pack of 4 AA Alkaline batteries.
-
Alright, thanks everyone, that's all the info I need for now. I'm about to order the Orangutan controller, the WW02 encoder, a couple of the GM8 motors, and some wheels. I'll probably have more questions about putting it all together and programming it later on, I'll keep you updated. Thank you so much for all the help.
-
Hey guys, the microcontroller came in today, I'm pretty happy. To program it though, don't I need the USB Programmer?
http://www.pololu.com/products/pololu/0740/
Otherwise how will I be able to program the thing?
Also, I need to buy a couple of rechargeable battery packs along with the charger, so I can actually power the thing. However, I can't seem to find a battery with a compatible input. The Orangutan has a "2 pin male" connector, as it says in the documentation, but that doesn't tell me much. I've only been able to find batteries with an input called "Hitec/JR Standard", like this
http://www.onlybatteries.com/showitem.asp?ItemID=12563.59&cat1=12&uid=1672
as well as ones called "Standard Tamiya Connector" such as this one
http://www.onlybatteries.com/showitem.asp?ItemID=12494.59&cat1=12&uid=1008
do you guys know which one, if either, is the right one? Thanks
-
Yes that programmer you posted is good.
the controller board itself takes between 5-10V
also, you don't need connectors? You can also just strip the wires and solder them together.
Check the website I'm sure that they specify which connector.
it probably is a 2 pin male connector in which case the Hitec/JR Standard should connect .
If you find the diameter of the pins we can tell you for sure.
Check the website for something about Specifications.
Side question: Which orangutan controller are you using?
-
The one Ro-Bot-X suggested earlier, http://www.pololu.com/products/pololu/0225/
I'm not sure the Hitec/JR will work, I looked at some pictures and it doesnt seem to fit.
I guess I could solder it though, except I would still need to take off the battery to recharge it (right now, I can't find any batteries, so I'm just using my phones batteries :))
-
Why not solder to the pins your own wire connector?
Use the connector that came with the phone battery( its in the phone)
-
I am sure that on the linked page there was a programmer for the controller...
As for the battery connector, on the board there are 2 regular male pins where you can plug any battery using a Hitech compatible plug.
-
Hey guys, I'm back. I've got all my parts ready to go. I started putting it together, but I'm really new to this, and I can't seem to find a good step by step tutorial on this. So of course I have questions, hehe.
All I've done so far is mounted the encoder onto the motor, and started the wiring. However, I can't figure out how to wire the encoder to the microcontroller. It has a mounter thingy that fits 8 wires, however they only sent me 6. On their website (http://www.solarbotics.com/assets/documentation/ww02-product_manual.pdf) they are as follows:
1. Clk
2. VCC
3. Dir
5. ChB
7. ChA
8. Gnd
All I know is that GND is for ground, everything else is a mystery.
On the microcontroller itsself, there is 3 lines of 12 I/O ports that are as follows:
Always VCC on power pin VCC VBAT VCC VBAT
Signal
Power PC5, PC4, ADC6, ADC7 PC0, PC1, PC2, PC3 PD0, PD1, PB6, PB7
Ground
So, nothing really matches up. Could someone please explain to me in a simple way at least what these all mean, what should be connected to what, and how I would physically connect it? The wires had special connectors to attach to the encoder, but on the side that goes away from it, they are just regular ends. Do I need some sort of extra connector for this?
Thanks guys.
Oh yeah, one more question. Do you know where I could find a replacement for the WinAVR studio, that is similar to it except is in Java? I'm familiar with Java at least a little bit, so it would be useful.
-
After looking up the pdf file, I have to say this:
You need to install 2 jumpers (wires) to enable power on the right and middle group of pins. Connect Vcc (left pin) to the middle pin of each group.
All PCx pins have analog to digital converters; pins PD0 and PD1 are Rx and Tx pins for the hardware UART; a cristal can be connected to pins PB6 and PB7 to increase the operating frequency.
Unfortunatelly the push buttons are tied to some pins of the LCD so they can't be used together. For your application you will need to add separate push buttons that you can connect to any input pins (connect one pin of the push button to the GND and the other pin to the Signal pin of any group of 3 pins on the board - if you use the right group of pins don't connect the power jumper to that group).
The wheel watcher wires you have to connect as follows:
the Red (Vcc) wire to the middle (Power) pin of the PC5 group;
the Black (GND) wire to the GND pin of the PC5 group;
the Violet (Clk) wire to the Signal pin of the PC5 group;
the Orange (Dir) wire to the Signal pin of the PC4 group.
You should have mentioned Java in the first place, there is no possibility for Orangutan to be programmed in Java. But there are other microcontrollers... like OOPic-R (not LCD and more expensive) and IntelliBrain (has everything, but is $$$).
Good luck!
-
Thanks for the explanation of what to connect. But are there special connection add-ons that I have to buy? Because like I said, the ends of the wires for the microcontroller do not have any special attachments like the sides that went into the encoder were.
Also, when you say install jumpers, do you just mean solder a wire to them? So I would have to connect the power port on PC0 to the power ports of PC1, PC2, and PC3, and do the same thing for the right-most group, or am I getting confused? Exactly which pins are getting power, and which ones aren't that need it?
Lastly, you said that the buttons and the LCD can't be used together. Why is it made like this? Or is that only when you attach more things to it? For my purposes, I'm guessing I would need to use the LCD. So are you suggesting I should buy separate push buttons and attach them on?
Thanks for all the help.
-
I just realized that all the connections you were telling me about were on the left side of the I/O panel, so would I have to activate the rest of it with jumpers if I only need that left side? The only thing I really need to know right now so I can move on is if there's a special connector for the wires to attach them to the microcontroller. Thanks.
-
Hey guys, where could I find some other push buttons to attach to the I/O ports?
-
you can buy them at any webshop that sells electronic components
better:
buy them locally at a diy shop
much better:
de-solder them from an old electrical appliance you have lying around...
There are bound to be push buttons in almost everything.