Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: z.s.tar.gz on February 20, 2009, 04:14:58 PM
-
Hello, I'm new here, and I have a few questions about sensors and servos.
1. How much are IR rangefinders effected by sunlight? Does it have to be direct, or does even a window in the same room skew the reading?
2. Is sonar less power consuming than IR? (factoring in a capacitor for sonar)
3. Is there a noticeable difference between IR and sonar read times?
4. Can a 11.1V Liion battery power two 4.8V servos and have enough left over to run a sensor?
-
1)not really, rangefinders use modulating techniques to ditinguish between its own light and other light sources.
2)it depends. IR rangfinders are always working away when they are connected up whereas the sonar that i have got only takes a reading when its asked to so only consumes any real power when i want it to.
3)rangefinders are usually faster because of the obvious light speed/ sound speed and also because sonars have to do a bit of extra calculation before you receive a reading.
4) we need the mah rating rather than voltage rating to determine that. (never power 4.8v servo's straight from an 11.1v source - not even in series if you value them). So, you have 2 question... the original one being can my ???mah battery power this load and which voltage regulator would be able to cope with running the load....
-
Ok. I think I'm going to use IR since I'm going to reading almost all the time anyways.
I though it was implied that I would be using some kind of power regulation, but I guess not. Like I said, I'm new to robots.
So, here is the servo (http://www.servocity.com/html/hs-311_standard.html)
and here is the battery (http://www.all-battery.com/li-ion18650111v2200mahrechargeablebatterypackwithpcbprotection.aspx)
the battery is 11.1V @ 2200mAh
the servo is 4.8V @ 160mA (w/ no load)
Can I probably operate 3 of those servos and 1 sharp IR sensor?
-
I though it was implied that I would be using some kind of power regulation
Yeah, the $50 robot tutorial on this site teaches people to plug servos straight into the batteries without any regulation, but this obviously relies on using the rated batteries in that tutorial. I just thought it best to make sure that you knew not to plug them in to your'e particular batteries. :)
Yes, your batteries can handle this through a voltage regulator, I would make sure that you choose a higher current rated regulator. you can get some made for 0.5amp but i would look for more like 1.5 - 2.0 amp just to be on the safe side and possibly look into a heat sink for it. Also make sure you put some capacitors after the regulators output stage and the input stage if possible. that should handle any peaks/fluctuations when the actuators start up.
Also its recommended to use a capacitor for the rangefinder itself, theres a post from a couple of weeks ago in the misc section about this.
-
Also, I was wondering 2 more things:
5. Is the extra 10 bucks worth it between Liion and NiCAD/other?
6. How hard is it to mod the 311 servo? Or more specifically, how easy is it to render the servo useless? Is it worth it to just buy a pre-modified one?
-
5) yes its worth it, the primary difference being about 6hours less charging time
6)Ive never actually modded a servo (i use motors and gears). It depends on your own confidence with meddling ;D it first seems easy enough but the forum does go through phases of people wanting more information - maybe just try a search on the forum. I personally wouldnt pay extra for something that I could do myself. It seems the only part you really have to get right is cutting the stop tab from the gears, if you mess up with the potentiometer you can solder resistors in its place, a forum search should tell you which resistors specifically if you really do need them.
-
Hmm. Would you say it would be easy/cheap to use motors+gears vs servos? or just personal preference?
-
Ive always just used motors/gears so its just something Im used to. as for cost servo's are cheaper but they are much more limited. You get stuck with the speed/torque restrictions of the servos whreas with motors you have a greater choice and you can use different gear configurations. Currently im using stepper motors for position control which dont require any gearing but the control of them is a bit more complex.
-
I guess I'll stick with servos for now then.
So, I was taking a look at my microcontroller, and I am beginning to think 32 input/output is a bit much for a first robot. I have the atmega 644, I believe.
I really have no idea the difference between the different input groups, A-D.
Type A:
Port A serves as analog inputs to the Analog-to-digital Converter.
Port A also serves as an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The Port A output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port A pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
Port A also serves the functions of various special features of the ATmega644 as listed on page
73.
Type B:
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active,
even if the clock is not running.
Port B also serves the functions of various special features of the ATmega644 as listed on page
75.
B, C, and D are the same, just swap the letters. I also attached a jpg of pinout schematic.
I'm wondering if I should just use the 50bot as a template?
-
It depends, are you going to want to use the atmega644 for something else and only use the $50 board for this? Also can an Atmega8/Atmega168/Atmega322 hold the program you want to run? Try writing the program and compiling it and check the size. 8kb is not a lot and if it's higher you might want to make sure you buy the ic that will fit your program.
-
Ok, my plan is to use the 50bot as a template but use better materials and use the stampy alg.
So, my question is, what does the data sheet mean? What is the diffence between A and B? (C and D are the same as B)
I'll work on programming it later, but first I have to figure out how it's going to work.
-
thats intrinsicly linked to the programming.
ports b,c, and d are all digital ports. this means from a programming point of view you can set them in state 1 or state 0. when you set them in state 1, you are producing 5v flow from them. in state 0 they will act as gnd or 0v. Also you can read from these ports so if the port has 5v into it your program read 1 and if it is linked to 0v your program will read 0.
analog ports (port a) can also read analog voltages (they cant write them though). so an 8 bit analog port would read a 5v input as 255 in software and ov input would be read as 0. any voltages inbetween would be read linearly so 2.5v would read as 127. so if you have a photoresistor coupled with a voltage divider, an analog port would let you read a number depending on how much light was falling on the photoresistor allowing you to analyse the data and do something with it
-
Thank you very much, I think I'll start working on designing it now
Do know of any good (free) CAD programs? Or if not, what is one you recommend?
-
A few people are starting to use the google sketchup program (free download from google). Its advantage is that anybody who designs a specific part can upload it to a central library so if you need a servo etc.. its likely that somebody has already designed one. the member airman00 from this forum has put together an expanding library of servos and sensors, maybe you should search his models out and save yourself some time..... its what theyre there for. and of course if you design anything yourself make sure to upload it. (also contact airman00 im sure he would appreciate to add anything robotics related to his library)
-
5) yes its worth it, the primary difference being about 6hours less charging time
Lithium batteries can be charged at max 1C rating (one hour), Nicd/Nimh can be charged at 4C for 15 minute charges. Although in the end lithium wins because of better capacity.
-
So, in the end Liion is better not because of charging time but because of power/charge/weight?
-
pretty much because it has a better power to weight/size ratio.
-
One more question and I'll be done
7. As far as digital input goes, 0V = 0 and 5v = 1. But, does say 3.1V = 1? What happens if the input volatage is greater than 1 but less than 5?
-
different microcontrollers have a different bias but 3.1 would normally be read as high. Of course you can always do a bit more on the electronics to keep as close to the extremes as possible. Most of the time you will only read digital data with these. varying voltages are usually best used with analog ports. but with something like a wheel encoder that uses IR lights, you want these on interrupt ports which just happen to be digital. so in this case you could think well the high registers at 3.1v so i should be fine. but is "should be fine" good enough for your project or do you need to be absolutely sure? if so then its a case of choosing the right electronics to get the right signal so you have hours of treading through datasheets for transistors etc.. trying to get the perfect components for the job rather than using general purpose ones
-
Thanks, I really can't think of too many applications right now, but it's good to know in future situations. Thanks everyone, I guess I'll start working on my first robot now. (Or after I can get my hands on AutoCAD)
-
2. Is sonar less power consuming than IR? (factoring in a capacitor for sonar)
3. Is there a noticeable difference between IR and sonar read times?
Look up the datasheets, they will say exactly how much power is consumed and time to get a reading ;D
As for battery choice, don't forget to factor in the cost of a charger.
-
I have already thought of that, and am going to get a universal type one.