measuring amps and volts with propeller
Hi all,
I do build some rover with 4 HB-25 and 4 Parallax-Wheelkit motors (12 volt 1.5 to ~10 amp)
I also have a car-battery for them and a different power-supply (~6v) for my propellers on board both with common ground.
what I am seeking now is some advice how to measure current voltage and amps for both supplys thru the propeller to decide when to "come home",
My "base"-propeller-board has still some pins left but I am running out of cogs - so I am looking for some solution where I can either run some spin to read those values or run a pasm-cog and kill it after reading.
I already use I2C for eeprom in spin so a I2C device might be handy but I also could devote some pins for rctime/dac usage.
alas, I am lacking the wisdom on how to do this.
for the voltages I was thinking of a voltage-divider to reduce them from ~13,5 to below 3.3 and the same for the other battery - but how to measure amps ? I feel helpless there.
I just recently started soldering (smart move, losing my eyesight faster then my hair...) and am new to electronics.
So my digital-io-board was a challenge, but I am getting there.
Any advice welcome
enjoy!
Mike
I do build some rover with 4 HB-25 and 4 Parallax-Wheelkit motors (12 volt 1.5 to ~10 amp)
I also have a car-battery for them and a different power-supply (~6v) for my propellers on board both with common ground.
what I am seeking now is some advice how to measure current voltage and amps for both supplys thru the propeller to decide when to "come home",
My "base"-propeller-board has still some pins left but I am running out of cogs - so I am looking for some solution where I can either run some spin to read those values or run a pasm-cog and kill it after reading.
I already use I2C for eeprom in spin so a I2C device might be handy but I also could devote some pins for rctime/dac usage.
alas, I am lacking the wisdom on how to do this.
for the voltages I was thinking of a voltage-divider to reduce them from ~13,5 to below 3.3 and the same for the other battery - but how to measure amps ? I feel helpless there.
I just recently started soldering (smart move, losing my eyesight faster then my hair...) and am new to electronics.
So my digital-io-board was a challenge, but I am getting there.
Any advice welcome
enjoy!
Mike
Comments
They also have a 90A and 180A versions that you could use for all four motors together.
After looking thru the datasheet this looks nice to me.
even if five of them is a bit on the expensive side - having the current current for each motor-driver (HB-25) might be useful for detecting slipping of one wheel ?
somewhere I have a 8?channel ADC from parallax sitting around - I need to look for it.
enjoy!
Mike
going thru the datasheet again hitting this:
[FONT=Arial,Bold]The I [/FONT][FONT=Arial,Bold][/FONT]analog output contains a 0.1uF bypass capacitor, but no series resistor. To complete an RC
filter into the ADC inputs, you may place a low value resistor between the ADC inputs and
[FONT=Arial,Bold]I [/FONT][FONT=Arial,Bold][/FONT]output.
[FONT=Arial,Bold]The V [/FONT][FONT=Arial,Bold][/FONT]output has a resistance of 14.7k between the sensed drain and analog output with 0.1 uF
bypass capacitor for an approximate bandwidth of 108 Hz, via the equation 1/(2
πRC
what does low value resistor should say to me ? 300 Ohm ? 1K ?
enjoy!
Mike
R1/R2 ratio = 5.05 (R1 being the one attached to 12V)
If you feel that is not enough, i just came across this chip in another post http://www.digikey.com/scripts/dksearch/dksus.dll?vendor=0&keywords=SENSOR+CURRENT+200A+5V+BI+5-CB+
Texas Instruments have a rather nice part, the INA226, somewhat hidden in their "Current Shunt Monitor" subsection.
http://www.ti.com/product/ina226
This is a i2c ADC, but with a twist : it has
82mV full scale (LSB 2.5μV) on Current Pins, and
36V full-scale (LSB is 1.25 mV) on Voltage.
At $1.30/1K that's quite good value for a 16b ADC - comes in a small MSOP10, and allows 16 Addresses.
If you want your 10A to be appx 50% fullscale , that's 4milli Ohms of shunt you need to find.
* Edited to fix typo : 10A * 4m Ohms = 40mV ~ 50% of full scale. (40mohms * 10A = 400mV )
@jmg this is a very nice find. I have to study the datasheet. I am fine with programming but at the basics with soldering and wireing stuff. So how did you calculated those 40mill Ohms shunt ? I need more reading...
enjoy!
Mike
enoy!
Mike