Author Topic: Amateur Question  (Read 5195 times)

0 Members and 1 Guest are viewing this topic.

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Amateur Question
« on: September 05, 2012, 07:00:52 PM »
Hi All,

I'm building a little tank robot with my son, but without much basis in electronics finding it a little difficult. Is there anyone who could help us with the electrics, am willing to pay for someones time to tell us how to design what we're after. I believe I can do the programming (am programmer by trade), but need to work out how to fit all the electronic components together with correct voltages etc.

Parts List (all specs on http://www.pololu.com/):
120:1 Mini Plastic Gearmotor Offset 2mm Spline Output x 2 (one for each track)
Pololu Qik 2s9v1 Dual Serial Motor Controller
Baby Orangutan B-328 Robot Controller
Lithium Ion Battery Cell - 3.7V 2000mAh
MMA7361L 3-Axis Accelerometer ±1.5/6g
QTR-1RC Reflectance Sensor
Computer Fan (This 40mm x 10mm fan, part number AD0412HB-G70 has 2 ball bearings for long life and a 2 pin PCB connector. 
Computer Fan specifications:
Voltage, 12V
Voltage Range, 6-13.8V
Current, 0.09Amps
Speed, 6000RPM at rated voltage and zero pressure

We also want to be able to control the speed of the fan via a knob.
We want the ability to set a timer, so would need a clock that the robot controller can grab the time from
Lastly, we want the battery to be rechargeable without disconnecting anything (e.g. a separate cable that we can plug into a charger without disconnecting battery from robot)

I know it's a big ask, but if you're after a little cash throw me a quote :-))

Cheers,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #1 on: September 06, 2012, 12:36:28 AM »
Hi,

[...] need to work out how to fit all the electronic components together with correct voltages etc.
[...]
Lithium Ion Battery Cell - 3.7V 2000mAh
[...]
Computer Fan specifications:
Voltage, 12V
Voltage Range, 6-13.8V
Not sure why you want a fan in the first place, but as a programmer, you can surely see the problem driving it.
There might be some of the other stuff needing a bit more than 3.7V as well (Didn't check each part).


We also want to be able to control the speed of the fan via a knob.
While the 'bot is standing still, via a remote, or...?


We want the ability to set a timer, so would need a clock that the robot controller can grab the time from
Unless you need absolute time, the controller alone can time whatever interval.


Lastly, we want the battery to be rechargeable without disconnecting anything (e.g. a separate cable that we can plug into a charger without disconnecting battery from robot)
Easy.


I know it's a big ask, but if you're after a little cash throw me a quote :-))
"A little cash"?... We don't need no stinkin' "a little cash"  ;D


If you start with the beginning... Not how you want to bake the cake or the list of ingredients, but your ideas of how it should be, the approx. dimensions and what it should be able to do, then it's easier to decide on the the rest.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #2 on: September 07, 2012, 07:14:08 PM »
Hi Soeren,

Thanks for the reply :-)

Sorry about the brain fade. The fan although rated 12volts we are doing some testing as we don't want it to spin that quick, so a drop in voltage should be fine. I'll be testing that in the next week or so which will enable us to determine what we require better as far as voltage range to run the fan. It's difficult to explain but the fan is to create a small vacuum effect. I'm hoping that 3.7 volts will be enough to move it at the speed required. Otherwise we will look at 5v fans or higher rated batteries.

The Fan speed would be affected by voltage, so we basically need a knob that allows us to set the amount of voltage being received by the fan. It would only run when the unit is On (whether by setting the unit to On or when a Timer has activated). Thanks for the info on the controller!

I'll do our fan tests and get back to you with regards to that.

With regards to controllers I really don't understand how the voltage requirements work, for example the dual motor controller says:
The motor supply voltage range is 4.5 to 13.5 V; the continuous current per channel is up to 1 A (3 A peak). The logic supply can be as low as 2.7 V, allowing operation with modern microcontrollers running at 3.3 V.
The motors themselves will spin from 0.6v to 6V.
However, if the battery is for example 3.7V then I could not supply 4.5V-13.5V controller for the motor supply voltage (even though the motor will run fine on 3.7V). So I'm confused as to why the motor supply voltage range on the controller has a minimum? (noting that the website says the controller and gearmotor are a great match)

This is a slow moving vehicle so lower voltage will be fine. Longest possible battery life is important as is the smallest size (therefore the choice of battery Li-Ion seems like the best option - if you have another suggestion for a 5v battery that is similar size and would have a similar life that would probably be ideal).
Motor Controller: http://www.pololu.com/catalog/product/1110
Gearmotor: http://www.pololu.com/catalog/product/1122 (0.6v - 6v)
Robot Controller: http://www.pololu.com/catalog/product/1220 (min 5v)
Step Up/Down: http://www.pololu.com/catalog/product/2120 (2v - 12v input and output)

Thanks for your help Soeren I really appreciate it.

Cheers,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #3 on: September 08, 2012, 12:47:49 AM »
Hi,

The fan although rated 12volts we are doing some testing as we don't want it to spin that quick, so a drop in voltage should be fine. I'll be testing that in the next week or so which will enable us to determine what we require better as far as voltage range to run the fan. It's difficult to explain but the fan is to create a small vacuum effect. I'm hoping that 3.7 volts will be enough to move it at the speed required. Otherwise we will look at 5v fans or higher rated batteries.
Most 12V fans completely stops working at around 6V (5..7V).
For any kind of useable vacuum (I'm imagining you want to increase traction?), especially with such small fan, you don't want to feed it a lower voltage, rather up it around 25% of rated voltage (i.e. 15V for a 12V fan), as the air flow will fall more or less exponentially with the voltage and the small fans, especially the thin ones moves very little air, compared to their larger cousins.


The Fan speed would be affected by voltage, so we basically need a knob that allows us to set the amount of voltage being received by the fan. It would only run when the unit is On (whether by setting the unit to On or when a Timer has activated). Thanks for the info on the controller!
It's better to control the fan with a PWM signal from the controller (via a transistor) and that way you can turn it on/off by the program as well and the speed can be changed based on some sensor input if required, or by a potentiometer (a "knob") connected to the controller.

I'm not aware if you got some of the stuff already, but you don't need the motor controller, as it's alreasy included on the Baby Orangutang board (same H-Bridge chip).


I'll do our fan tests and get back to you with regards to that.
Even if you'll probably find that the vacuum it can create is far too weak, testing is a very good way to learn.



With regards to controllers I really don't understand how the voltage requirements work, for example the dual motor controller says:
The motor supply voltage range is 4.5 to 13.5 V; the continuous current per channel is up to 1 A (3 A peak). The logic supply can be as low as 2.7 V, allowing operation with modern microcontrollers running at 3.3 V.
The motors themselves will spin from 0.6v to 6V.
However, if the battery is for example 3.7V then I could not supply 4.5V-13.5V controller for the motor supply voltage (even though the motor will run fine on 3.7V). So I'm confused as to why the motor supply voltage range on the controller has a minimum? (noting that the website says the controller and gearmotor are a great match)
The controller (Baby Orangutang) has got an LDO voltage regulator at its input, which means that it needs a minimum of 5.2V (to stay in regulation).
The H-bridge motor voltage is taken from the battery voltage, same as the input of the regulator (so 5.2V minimum).
You should use PWM to slow the motors, just like the fan, but when you include the losses and the weigth of the fully loaded 'bot, you probably end up needing a higher voltage than you think now.
The minimum voltage is dictated by what voltage the components need to work reliably and if just one component needs 5.2V, it doesn't help that some of them can work from 2.7V.
Your motors may be able to turn unloaded from 0.6V, but don't expect to see it move at that low voltage when loaded (i.e. when trying to move the 'bot).


This is a slow moving vehicle so lower voltage will be fine. Longest possible battery life is important as is the smallest size (therefore the choice of battery Li-Ion seems like the best option - if you have another suggestion for a 5v battery that is similar size and would have a similar life that would probably be ideal).
Slow it down by PWM. When you get a bit more into it, use encoders on the wheels, then you can program the controller to keep a certain speed (even if the battery voltage falls while discharging).
You haven't revealed the size of neither the 'bot, nor the battery you have in mind, so I have to be general about it. Within a given chemistry, the Watt-hour rating roughly follows the size, so if you need twice the voltage in the same size, the available capacity (mAh) will be halved.
With a rechargeable battery, runtime isn't all that important, as long as it allows you to run it for a reasonable time, so I'd recommend getting a 2-cell lithium battery, as 1Ah (1000mAh) would still give you at least an hour or two, depending on how the motors are run - even with both motors blocked, you'd still have juice fr more than half an hour (but your motors would die screaming long before your battery went flat).

You'd be looking for a battery specified as 2S (for 2 Series connected cells), or just go with two single cells - sometimes you can find cheap cell phone or MP3-player batteries (I got some intended for a handheld Gameboy of sorts at around $3 a pop).

A small circuit should be included to keep the cells balanced on both charge ad discharge, especially when you want to charge them on-board.


Motor Controller: http://www.pololu.com/catalog/product/1110
Not needed, already included.


Robot Controller: http://www.pololu.com/catalog/product/1220 (min 5v)
Minimum ~5.2V and this is the motor supply as well.


Step Up/Down: http://www.pololu.com/catalog/product/2120 (2v - 12v input and output)
This is good for up to 300mA max. and your motors takes more.
Beefier boost converters can be found though and you don't need a SEPIC converter if you just need boost, like if you used either a single lithium cell or two NiMH cells. and wanted eg. 5.5V out. A SEPIC regulator converts both up and down, so if set for eg. 5V out, it will be so over the entire input range (1.5V to 12V with the mentioned converter).

Do you have a soldering iron intended for electronics assembly? (You need it)
Do you have a  multimeter? (Even the cheapest sub-$10 'meter will make your life a lot easier building this and can be used for a lot of other stuff as well).
What should the robot do besides driving?
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #4 on: September 09, 2012, 02:06:07 AM »
Hi Soeren,

That's fantastic information thanks :-)) The robot is small, about 10cm long and 7cm wide.

Ignoring the fan which I'll get a 5v one if I have to, should I be looking at:
1200mAh 7.2V battery (http://www.ebay.com.au/itm/RC-7-4V-1200mAh-20C-Lipo-Battery-R-C-Mini-Car-Truck-Boat-Helicopter-/261012660448?pt=AU_Toys_Hobbies_Radio_Controlled_Vehicles&hash=item3cc59120e0) - my max length for the battery is 68mm so this will fit.

I haven't bought the components yet, want to get it straight in my head first :-))
Components List:
Baby Orangutan Robot Controller: http://www.pololu.com/catalog/product/1220 (min 5v)
Battery (As above)
Gearmotors x 2: http://www.pololu.com/catalog/product/1122 (0.6v - 6v)
MMA7361L 3-Axis Accelerometer ±1.5/6g: http://www.pololu.com/catalog/product/1251 (2.2-16 V)
QTR-1RC Reflectance Sensor: http://www.pololu.com/catalog/product/959 (5.0V)
Small PCB board

So my questions are:
1. Given the Baby Orangutan can control two DC motors, and I have two gearmotors, where does that leave me with the fan? What would I need to control that via PWM, and how to attach a knob to control the fan speed?
2. Do I need a step up/down regulator if I'm connecting the DC motors directly to the Baby Orangutan and everything will run at 5V?
3. What do I need to charge the battery on board?
4. What else do I need (apart from a fair bit more knowledge :-)))?

I'll be getting a new soldering iron before I start this (my old one is not looking in great shape!), and have a multimeter.

Thanks Soeren, I appreciate your help!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #5 on: September 10, 2012, 07:22:08 AM »
Hi,

[...] should I be looking at: [snip] - my max length for the battery is 68mm so this will fit.
That sounds like a good choice, but be aware that chinese batteries are very oft4en extremely over-rated - in some cases real capacity can be down to half. I don't know this seller of course, so they may be legit, but I'd still check up on some non-chinese batteries as well (I can try finding something later if you come up empty handed, but after this post, I'm venturing out into the Big Room for the rest of the day).


I haven't bought the components yet, want to get it straight in my head first :-))
Smart move :)


Components List:
Baby Orangutan Robot Controller: http://www.pololu.com/catalog/product/1220 (min 5v)
Battery (As above)
Gearmotors x 2: http://www.pololu.com/catalog/product/1122 (0.6v - 6v)
MMA7361L 3-Axis Accelerometer ±1.5/6g: http://www.pololu.com/catalog/product/1251 (2.2-16 V)
QTR-1RC Reflectance Sensor: http://www.pololu.com/catalog/product/959 (5.0V)
Small PCB board
If the battery is 1200mAh and the motors each take say 100mA on average (if driven more or less continuously), you'd have around 5..6 hours of runtime a charge.
For the PCBoard, a matrix-board (Vero Board) of some persuasion may be the easiest


So my questions are:
1. Given the Baby Orangutan can control two DC motors, and I have two gearmotors, where does that leave me with the fan? What would I need to control that via PWM, and how to attach a knob to control the fan speed?
1a) Exactly where you need to be ;D The fan should be controlled from an I/O-pin, via a small signal transistor like BC337 or 2N2222 and one or two resistors, I'll draw you a schematic later.
1b) Your controller (Baby Orangu) and you caan read a potentiometer either via an A/D-C pin or via a digital pin.
Alternatively you could make a tiny cheap circuit to drive that as a separate entity, but then you loose the direct program control over it - (might be worth it for now though, to simplify things). An external fan controller could be made to boost the voltage if you need to go with a 12V fan.


2. Do I need a step up/down regulator if I'm connecting the DC motors directly to the Baby Orangutan and everything will run at 5V?
No, but the motors won't see the full 5V (I guess that's fine anyway).
For now, just run everything on 5V. It's fairly easy to change later, if you eg. want a higher speed. Especially if you use pin headers for connecting the motors and everything else.


3. What do I need to charge the battery on board?
A 2-cell lithium charger, preferably with balancing and a 3 pin polarized connector mating the battery.
Later on, you can use the controller as a charge controller as well, but you need a bit of experience first, as lithiums are not something to play with blindfolded.


4. What else do I need (apart from a fair bit more knowledge :-)))?
The locomotion parts (belts and rollers in your case), a chassis to hold everything together, a head full of hair to pull (way better than throwing a PC through the window ;)) and patience towards yourself.

Programming exercises:
Start with flashing a LEDs from the controller, then 2 LEDs and when you have that down, start getting a motor to run forwards and backwards - one step at a time is the right pace.


I'll be getting a new soldering iron before I start this (my old one is not looking in great shape!), and have a multimeter.
Great. If you plan to mak a lot of robots or other electronics for years to come, don't get a cheap soldering iron.
My personal preferance is a Weller soldering station with adjustable temperature - the one I use the most is a Weller WTCP50 (50W and you change the temperature by using a bit made for 600, 700 or 800°F, on newer models you set the temp. on a dial/knob) - I bought it around 1976 and for a good part of the time, it has been on 24/7. I have cleaned a switch inside it around 3 times, but never had to replace any part (other than bits of course, but there's years of service in a Weller bit).
Whichever you get, be sure to get a solder sponge for wiping the tip, prior to each joint you make and keep it damp at all times when you use it (not wet, just damp - the purpose is to keep it soft and able to withstand the heat).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #6 on: September 10, 2012, 06:05:28 PM »
Fantastic thanks Soeren!!!

How about this battery:
http://www.ebay.com.au/itm/Venom-13C-2S-1320mAh-7-4V-LiPO-RECEIVER-BATTERY-JST-15005-/360471969617?pt=Radio_Control_Parts_Accessories&hash=item53edcdbf51

Have ordered a package from Pololu with all the components :-)

You have been a fantastic help so far, thanks Soeren.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #7 on: September 13, 2012, 04:27:57 PM »
Hi,

Not all that cheap.

Take a look at HobbyKings selection:
http://www.hobbyking.com/hobbyking/store/__86__85__LiPo_LiFe_NiMH_Battery-Li_Poly_All_brands_.html


The safer (and more expensive!) LiFe batteries in 1mm above your measure, 6.6V and 2300mAh
http://www.hobbyking.com/hobbyking/store/__16576__A123_6_6VB_2300mAh_2s1P_Receiver_Pack.html


I'm not trying to scare you into a more expensive battery! I personally wouldn't pay the extra for something I used myself... If it was for my grand children OTOH, I'd pay ten times that to keep them as far as possible from even the tiniest chance of malfunction :)

And I honestly believe that lithiums only get bad if mistreated physically, if bad from the production line, it would likely burst into flames while bouncing down the conveyor belt, rather than months later. Common sense is a must with any chemistry :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #8 on: September 13, 2012, 05:14:02 PM »
Hey Soeren,

I actually bought the Venom battery yesterday, as long as it will suit I'm happy. It's a small size for 1300mAh at 7.4v which was my main requirement :-)

Looking forward to getting all the bits and pieces. In the mean time, as funny as it sounds, my son has one of the large snap circuits kits so going to do a bit of a hands on refresher with that first for both of us!!

Cheers,
- Will

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer · Roboticist
    • Index of Oddities
Re: Amateur Question
« Reply #9 on: September 13, 2012, 10:26:01 PM »
Because it's the main point of danger, I'd like to check that you're using an appropriate charger... What's your current charger plan?

Also, I would highly recommend a battery monitor.  Search ebay (or google) for 'battery monitor 2s'.  This and this are examples. I use the latter.
I

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #10 on: September 13, 2012, 10:33:56 PM »
Hi Soeren,

I actually have a Venom Pro Charger I bought when my son was playing with some RC Trucks a couple of years ago. The one I have supports fast/slow charging pretty well any LiPO battery, so at this stage I'll just use that ;-))

Never heard of a battery monitor before so will look into that too!

Thanks,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #11 on: September 14, 2012, 08:25:58 PM »
Hi,

I actually bought the Venom battery yesterday, as long as it will suit I'm happy. It's a small size for 1300mAh at 7.4v which was my main requirement :-)
No problem then - and if your charger is guaranteed to work with a 2-cell lithium, it should be OK.

Does your charger have a balance connector (for the 3 thinner wires separate from the main output wire from the battery)?

You can make a lithium monitor yourself. All it needs to do is, to keep the cells from becoming too flat - they shouldn't get below ~3V/cell, or 6V in your case - most cells will accept down to somewhere in the interval around 2.4V to 2.6V, but 3V is a good point, in case you don't get them to a charger right away.

A monitor can either be a complete cut-off at 6V, or it could include a flashing LED and/or a beeper warning a bit before the point is reached - both warning and cut-off can be made with a cheap dual op-amp like LM358, a voltage reference and a little "glue" components and there's monitors for a simple "voltage reached" in a TO-92 case (like small signal transistors) which work as well.


Looking forward to getting all the bits and pieces. In the mean time, as funny as it sounds, my son has one of the large snap circuits kits so going to do a bit of a hands on refresher with that first for both of us!!
Oh, he must be older than I first imagined then :)

I don't know much about those kits, or what components they hold, but if you're interested, I have a circuit for driving a 12V fan with 6V to 14.5V out, set by a potentiometer and powered from 5V
Simple circuit, but slightly complex behaviour, so I don't know how much you'd learn from it though.

Here's the parts list, so you can check if the kit contains them all:
R1   3k9   
R2   100R
R3   22k       
R4   10k
R5   47R     
R6   4k7
R7   2k2
R8   1R2
R9   1R2
R10  100k
R11  4k7
Pot1 10k         
C1   3n3
C2   68n
C3   10µ
L1   80µH       
D1   1N4148
D2   BYV27
Q1   BC547
Q2   BC337
Q3   ZTX450
IC1  NE555
Let me know if you want it :)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #12 on: September 23, 2012, 07:12:19 PM »
Hi Soeren,

Yes the charger has about 20 different connectors for all kinds of batteries :-) Works fine. Will look into a lithium monitor a little bit further down the track.

The SnapCircuits kit only has about 6 resisters so nothing as complex as you're imagining I don't think. Billy is 11 years old!

We've done some tests on the fan side of things, built the base out of acrylic and lo and behold you were right, we need as close to 12 volts as possible to run the fan fast enough to pick up anything apart from balls of styrofoam. We also had a play in solidworks and re-did the concept so that it's smaller. This unfortunately makes our battery useless so back to the drawing board on that one.

Trying to balance size (making it as small as possible) vs length of operation is oh so much fun.

The space we have available is 57 x 20 x 27mm. We can probably extend the 27mm or 57mm sides a little if necessary, but the 20mm is fixed. Given we are after a 11.1V minimum for the fan now which are we better off doing:
1. 11.1V battery with smaller mAh
2. 7.4v battery with larger mAh where I'd need a step up voltage regulator

That circuit might be really handy!!

Thanks Soeren,
- Will

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #13 on: September 25, 2012, 12:44:56 AM »
Hi Soeren,

Hope you are well! I think I'm ready to try to work out the circuits now.

My first problem:


Orange/Red = VIN
Yellow = Ground
Green = Motor Controls

I created a basic circuit where I have 7.4V battery which connects to a switch (http://www.pololu.com/catalog/product/750), which in turn provides power to the Baby Orangutan Controller.

The green leads on either side connect to two motors which I can control the speed of through PWM beautifully.

Problem 1: My initial problem is that the power on/off button on the switch simply doesn't work. I've resoldered it a few times and for some reason pressing the button does absolutely nothing, the unit always stays on. I've tried everything I can think of.

Problem 2: I really don't know how to proceed as far as voltage/resisters etc. to connect the following components: -
A: Reflectance Sensor (http://www.pololu.com/catalog/product/959). I intend to use this to detect if the robot has moved under something.
B: Accelerometer (http://www.pololu.com/catalog/product/1251). I intend to use this to determine if the robot is moving and in which direction.
C: The 12 volt fan. At the moment I don't have a step up voltage regulator but intend to purchase this if suitable (http://www.pololu.com/catalog/product/2120). The fan needs to be able to be turned on and off by the Baby Orangutan controller. At this stage lets not worry about making it adjustable. Like to get as close to 12V to it as possible.

Any help would be appreciated :-)

Thanks,
- Will

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Amateur Question
« Reply #14 on: September 25, 2012, 07:59:42 PM »
Did you read the app note in the resources on the pololu page for the Reflectance senor?
Anything there you don't understand?

Same for the accelerometer.

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #15 on: September 25, 2012, 08:33:34 PM »
Hi Walter,

I'm assuming I can power both the accelerometer and reflectance sensor off the VCC 5V pin on the Baby Orangutan. The supply current should be sufficient for both.

Had no problems with the reflectance sensor which is great.

The fan is another issue entirely. I need to be able to turn it off/on through the Baby Orangutan. So I assume I would connect something like this:
main power feed -> step up voltage regulator (set to 12v using the on board POT) -> 12 volt fan
However, what do I need to enable the orangutan to turn it on and off?
Should I use this switch (http://www.pololu.com/catalog/product/750) which can programatically be turned off and I assume on.
Or can I just use a basic three pin transistor?

Cheers,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #16 on: September 27, 2012, 05:20:42 PM »
Hi,

Problem 1: My initial problem is that the power on/off button on the switch simply doesn't work. I've resoldered it a few times and for some reason pressing the button does absolutely nothing, the unit always stays on. I've tried everything I can think of.
I cannot find a schematic for it on the Pololu site, did you get it with the switch and if so, can you post it?
It's imposssible to trouble shoot a circuit "blind".


Problem 2: I really don't know how to proceed as far as voltage/resisters etc. to connect the following components: -
A: Reflectance Sensor (http://www.pololu.com/catalog/product/959). I intend to use this to detect if the robot has moved under something.
"Under something"?
Did you notice the...
"Optimal sensing distance: 0.125" (3 mm)
Maximum recommended sensing distance: 0.375" (9.5 mm)"?
 Other than that they're not complicated at all and the page gives a full description on how to use it.

What distance are you hoping to detect?


B: Accelerometer (http://www.pololu.com/catalog/product/1251). I intend to use this to determine if the robot is moving and in which direction.
Just note the "external components (such as voltage dividers) are required when interfacing the board’s g-Select and Self Test pins with 5V systems" and you should be good.
The A/D converter reading it should be set up for 3.3V, if that's possible at all, to give the best resolution.

That said, a wheel encoder will do the same, only simpler.


C: The 12 volt fan. At the moment I don't have a step up voltage regulator but intend to purchase this if suitable (http://www.pololu.com/catalog/product/2120). The fan needs to be able to be turned on and off by the Baby Orangutan controller. At this stage lets not worry about making it adjustable. Like to get as close to 12V to it as possible.
The one at http://www.pololu.com/catalog/product/799 can go higher and for your purpose, you probably need the max. 15V that a 12V fan can handle.

The one I designed do change with the input voltage and the PCB are for through-hole components, as ithe intention is to make it easy to get parts for and contrary to ready made units, gives you insight in how it works (although a thorough walk-through isn't in the documentation yet). Made with SMDs it could be just as small, but that's not the point for me - simplicity, basic component selection and the potential to teach people how it works is.
I'll PM (since it's not yet as fully documented as I want it) you a file with this variable switcher, if you want it, but do not publish or redistribute it!

The component list that I posted has changed a little, mainly to linearize the potentiometer/output voltage dependency, as it started out as exponentially ugly as the Pololu switchers and that makes it very hard to set the output voltage, as most of the range lies in the last 10% of the potentiometer range. Mine is linear now, with a 30° rotation per volt (on a common 270° pot) and its efficiency from 9V to 15V averages to ~90%

It's easy to make it controlable by a logic level, but it's not included as is, as most people will want it to be on when powered and extra (idle) components are banned in my circuit ;D
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #17 on: September 30, 2012, 07:41:20 PM »
Hey Soeren,

Firstly you are a champion. Thanks so much for helping with this. I think I've nearly got the electronics side of things down using the off the shelf components now. One day I'll try to disect and build from scratch rather than just assembling components, but for now I nearly have enough working to finish building the design in solidworks, 3d print the pieces and assemble!

I got the ambient light reading perfect using the reflectance sensor by breaking one of the resistors which turned off the IR emitter. This enables me to detect changes in ambient light (e.g. when it moves under something).

Accelerometer works okay, will figure out whether I can get enough data from it to determine movement and collisions on the first build, I think it should be okay. I don't want to use the wheel encoders due to space. I don't see the need to even connect the self-test or g-select pins.

I used a transistor to turn on/off the fan which works brilliantly and was far easier than I'd imagined. So I'll just put the voltage booster (when it arrives) between the transistor and the fan and that should be good.

The only things I'm not really sure about are:
1. How to get feedback to the IC with regards to battery voltage. Using either of the components you suggested (http://www.ebay.com.au/itm/LIPO-Battery-Monitor-2S-6S-Cell-Voltage-Meter-Checker-/271046403302?pt=AU_Toys_Hobbies_Radio_Controlled_Vehicles&hash=item3f1b9fe4e6 or http://www.ebay.com.au/itm/Maxpro-2S-Lipo-Battery-Low-Voltage-Monitor-LED-ALARM-/310397848113?pt=Radio_Control_Parts_Accessories&hash=item4845274a31) I don't see a way to read back the value to the IC. Ideally I want the robot to detect it's low, say under 6.5V, then I'll swap green headlights for red ones, then if it drops to 5.5V or below to switch off.

2. How to charge the battery. The Lipo has a power output (2 pin) and balancing output (3 pin). To charge can I just splice the power output? Or should I splice both allowing the charger to use the balancer as well? Or is there a better way of doing it?

Cheers,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #18 on: October 01, 2012, 05:21:50 PM »
Hi,

I used a transistor to turn on/off the fan which works brilliantly and was far easier than I'd imagined.
You did use a couple of resistors as well I hope?


The only things I'm not really sure about are:
1. How to get feedback to the IC with regards to battery voltage. Using either of the components you suggested [...]
The monitors were suggested by Gertlex.


I don't see a way to read back the value to the IC. Ideally I want the robot to detect it's low, say under 6.5V, then I'll swap green headlights for red ones, then if it drops to 5.5V or below to switch off.
You're right... They're meant to be read off directly by eye.

You don't need a monitor anyway, a voltage detector that tells the controller when the battery falls below ~6.0V will be more than sufficient. They are made by several manufacturers (and in several voltages) and come in (amongst others)  a TO-92 package (like a common small signal transistor) which makes them easy to use, just connect B+, ground and the output (to an I/O line) - it doesn't get any simpler :)

You can use two if you want the "near flat" indication of course and you can even use the same type, as they can be modified with a couple of resistors.

Your next 'bot will use this signal to return to it's charging base for an automatic recharge of course ;D


2. How to charge the battery. The Lipo has a power output (2 pin) and balancing output (3 pin). To charge can I just splice the power output? Or should I splice both allowing the charger to use the balancer as well? Or is there a better way of doing it?
I assume it's this one(?):
http://www.venom-group.com/Venom-Pro-Charger-w-Power-Supply-US.html
(Perhaps another color though).

I'd make up a charging lead of a good quality (i.e. the fattest gauge of copper you can find) cat-5 cable (Ethernet cable) and mount an RJ-45 socket on the 'bot.
Then connect the other end to two 4mm "banana" jacks (I guess from the pictures in the manual) and whatever the needed connectors are for temperature monitor- and balancing ports.
No need to chop up the temperature monitor that came with the charger, just measure it at two temperatures (like eg. 25°C and 45°C) and get an NTC resistor with the same parameters.

Mount the NTC in touch with the battery and wire this, the balancing connector and a tap into the power connector the RJ-45 socket.

Just in case you should wanna ask if the temperature monitor is absolutely necessary... No, but... Summer of '74, I poured around 0.25l benzine into a glowing hot oven full of glowing embers (don't ask ;)) *kapoof* and I spent the rest of that summer in a hospital bed (2nd and 3th degree burns from my waist up to my forehead) and from what I've heard about lithium fires, they're nastier than benzine and your son is 11 - well... You decide whether you need it :)
Good thing though, you heal better when you're young ;D


The outer pins of the balancing connector is connected to the same points as the power connector, but in a Kelvin configuration, where the wiring resistance of the power plug etc. doesn't influence the voltage read by the balancing wires.

If you can't find good quality cat-5 cable, you can add a 2-wire lead of a heavier gauge to the cat-5, but then you'll need another plug or the RJ-45 and an extra two conductor plug - Either way, make sure you cannot easily charge without the temperature monitor and balancer in  place.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #19 on: October 01, 2012, 07:02:41 PM »
Hi Soeren,

Why do I need resistors for the transistor? The transistor is rated:
Collector-Base voltage VCBO 40 V
Collector-Emitter voltage VCEO 30 V
Emitter-Base voltage VEBO 5 V
Collector current IC 500 mA
Emitter current IE -500 mA

My collector voltage (input) is 7.2V
The emitter voltage (output) is 5V as specified
The base voltage is the a switch which gets 5V at very low current when turned on.

From this I don't see a requirement to drop the input voltage using a resistor? Or am I missing something entirely?

Thanks,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #20 on: October 04, 2012, 05:13:48 PM »
Hi,

Why do I need resistors for the transistor?
[...]
The emitter voltage (output) is 5V as specified
What transistor are you using?
The emitter should be at ground potential for an NPN (or N-ch.) and at the positive voltage for a PNP (or P-ch.)


The base voltage is the a switch which gets 5V at very low current when turned on.
The base current should be limited by a resistor, unless you have some other means of limiting it. "Very low" means what?


From this I don't see a requirement to drop the input voltage using a resistor? Or am I missing something entirely?
Please post a schematic of how you connected it and the name of the transistor, as it sounds all wrong to me.

As an aside, you should never ever go by the maximum ratings of a datasheet, they just mean "cross this line and you're in serious trouble", not "it's OK to run the device at this level"  ;D
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #21 on: October 04, 2012, 06:48:27 PM »
Hi Soeren,

The base current is 20mA (the output from the Baby Orangutan digital IO pins). I'm using this NPN transistor: http://www.datasheetcatalog.org/datasheet/auk/S9013.pdf

I can't seem to find an output value for it for the base current at all in the documentation.

Essentially my schematic (sorry if you need this drawn up let me know) is this:

7.2V (Power Supply) -> Collector
5V 20mA (when turned on PB1 on Baby Orangutan) -> Base
Emitter -> 5V Power to Fan

Fan obviously connects to ground to complete the circuit as does the Baby Orangutan.

So if I'm getting this at all...lol...your saying that that 5V on the base is the limit, and I should reduce that by a couple of volts. So if I for example:
If I want to drop by 2 volts I would work out the required resistance:
(2 Volts / 0.2 A = 10 ohms)

So I would really want to put a 10 ohm resistor between the base and the baby orangutan.

If I'm off the mark here, could you please try to explain it to me or point me in the direction of resistance for dummies..haha :-)

Thanks Soeren,
- Will

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Amateur Question
« Reply #22 on: October 04, 2012, 07:15:38 PM »
Quote
The base current is 20mA (the output from the Baby Orangutan digital IO pins)
This is the MAXIMUM current output from the processor pin. Not the base current.
Quote
I can't seem to find an output value for it for the base current at all in the documentation.
You won't. The base current is set to Collector current divided by current gain of the transistor (Hfe). The transistor you linked to has an Hfe of 96 to 246 (use 100 or 150 for calculations).

You need a resistor in series from the processor output to the transistor's base. This resistor sets (limits) the current to the base. With the emitter grounded (NPN), the base is about 0.6V maximum (one diode drop). So, the base resistor needs to drop 5V - 0.6V = 4.3V.

How much current does the fan draw? Lets assume 0.2A, which would be the collector current.
With an Hfe of 100 you need 0.2/100 = 0.002A of base current.
The series base resistor is then calculated with Ohm's Law, 4.3V / 0.002A = 2150 Ohm. Since I used the minimum Hfe a slightly higher value resistor will work so use a 2.2K.
This will turn the transistor fully on when the processor's output is high (logic 1).
The fan is connected between the +5V PS and the collector.

Try googling NPN switch for much more info and diagrams.

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #23 on: October 04, 2012, 07:43:35 PM »
Hey Walter,

Wow, okay, I think I get it.

So the fan actually drawns 0.1A, mind you I'm going to be putting a boost regulator (http://www.pololu.com/catalog/product/799) between the transistor and the fan, as the fan is 12V 0.1A.

Regardless I still need to drop the base resistor as you said to 4.3V, so to do that I would need to do:

Calculate base current:
0.1 / 100 = 0.001A

Resistance calc:
4.3V / 0.001A = 4300 Ohm
So 4.3K resistor

Now things I don't understand:
1. How did you reach 0.6V with the emitter grounded?
2. When you say the fan is connected between the +5V PS and the collector, what do you mean? The fan is currently connected to the emitter and back to the main ground?

Thanks, my brain is starting to hurt a little bit..haha,
- Will

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Amateur Question
« Reply #24 on: October 04, 2012, 08:53:13 PM »
Hi,

So the fan actually drawns 0.1A, mind you I'm going to be putting a boost regulator (http://www.pololu.com/catalog/product/799) between the transistor and the fan, as the fan is 12V 0.1A.
So, with a converson efficiency of slightly below 90%, you need around 1.1W into the converter.
As around 0.2V is dropped over the transistor and your battery is flat at say 6V, you need to calculate for a worst-case 5.8V source, which gives ~190mA.

Personally, I'd shoot for ~230mA (to have overhead) and with a hFE of 100, the minimum base current to make this happen is 2.3mA.
Since you use the transistor as a switch, you want it to saturate hard, so a base current of 5mA would be better.
This gets you to a resistor value of 860 Ohm and the next lower standard value is 820 Ohm (although it would work with 1kOhm, as this would give 4.3mA, which is still a reasonable current for saturating the transistor.

The 20mA that the controller is spec'd for is what it can handle (max.), but it's up to the user to make sure of that - Eg. connecting LED's directly between an I/O and ground only works on controllers that have current limited outputs - on all other controllers it's taking them far beyond the max limits and while it may work for a while... Even if they're cheap, it makes sense to make them last :)


1. How did you reach 0.6V with the emitter grounded?
The base-emitter junction is a P-N junction - a diode in other words and a silicium diode has got a voltage drop of ~0.65V (+/- depending on temperature and current)


2. When you say the fan is connected between the +5V PS and the collector, what do you mean? The fan is currently connected to the emitter and back to the main ground?
Fan positive (probably red, maybe yellow) connects to B+ (your "+7.4V").
Fan negative (probably black, maybe blue) connects to the collector.
Emitter  connects directly to ground (0V).
Basis connects to 820 Ohm resistor.
The other end of the resistor goes to the I/O pin.


my brain is starting to hurt a little bit..haha,
No pain, no sane ;)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline willkTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: Amateur Question
« Reply #25 on: October 04, 2012, 09:30:49 PM »
Thanks Soeren,

Still digesting all this, but it makes a lot more sense than the way I had it setup!!

 


Get Your Ad Here

data_list