Page 1 of 1

reading the current before it goes to - on the battery pack

Posted: 23 Mar 2012, 15:35
by finneykris
Hi,

Can the NXT read the voltage before it goes to - terminal on the battery pack?

This is to see if the motor load (on the axle) is too high, if it is then the current or voltage should increase (not sure if its current or voltage, probably current)
if it does then I would need the program to somehow stop the motor spinning.

The motor does not have a feedback encoder on it and I don't think it uses pins 5 and 5 on the NXT port with official lego cables.

Re: reading the current before it goes to - on the battery pack

Posted: 23 Mar 2012, 18:47
by mattallen37
In NXC you can read the NXT battery voltage in mv, using BatteryLevel.

The higher the load on an unregulated supply, the lower the voltage. The higher the load on a motor, the higher the current it will draw.

The NXT battery voltage will be effected by more than just motor load. When the batteries are running low, the voltage will be down (obviously). Having the BT radio turned on/paired adds extra current to the load on the battery as well (IIRC, it's about 60ma).

Reading the NXT voltage is probably not the best indication of motor load, because of all the factors involved.

Re: reading the current before it goes to - on the battery pack

Posted: 23 Mar 2012, 18:59
by mcsummation
However, if you are reading the battery voltage every 250 ms (or so), you can get an idea of the load. If the only difference is the motor load, then the battery voltage is directly related to the motor load. I have a car robot that is feeding the battery level back to its remote. If the motor is running at 50% and I stall the drive motor, the battery voltage will drop about 1500 mv. If it is running at 100%, the voltage drops about 2500 mv.

Re: reading the current before it goes to - on the battery pack

Posted: 23 Mar 2012, 20:40
by finneykris
how do I know if it is the motor that is taking up a too much voltage when there is other stuff connected to the NXT too that will take up voltage

Re: reading the current before it goes to - on the battery pack

Posted: 23 Mar 2012, 20:44
by mcsummation
Of the things that I have, only the motors are variable in real time. The sensors draw a relatively constant current. You could test your set up and see if any of the other things draw variable amounts.