Voltage/Temperature Monitoring

32 views
Skip to first unread message

Fergy

unread,
Jan 6, 2010, 1:09:50 AM1/6/10
to robocontroller
A question came up over on TRC about how to protect LiPO batteries.
The current solution both Jon and I have been using, a software
cutoff. Anybody found a hardware cutoff they like?

I've uploaded a code example, of how I am monitoring voltage, and
capturing temperature outputs from each servo. The example is based on
the stock output of NUKE. You can grab it from the files section here
on the group (it's called power.pde, of course, it's also the only
file over there....)

Also, all members have access to upload files, so feel free to upload
example code you've written for your ArbotiX.

-Fergs

Fergy

unread,
Jan 6, 2010, 1:14:21 AM1/6/10
to robocontroller
Upon further consideration, that's a terrible name for a file. I've
renamed it VoltTempMonitoring.pde

-Fergs

JonHylands

unread,
Jan 6, 2010, 8:15:51 AM1/6/10
to robocontroller
So, you're doing two reads where one will do. Voltage and temperature
are beside each other in the control table.

This is how I read them:

bytes = ax12GetRegister (voltageTemperatureId, AX_PRESENT_VOLTAGE,
2);
voltageTemperatureId++;
if (voltageTemperatureId > MAX_SERVO_ID)
voltageTemperatureId = 1;
systemVoltage = lowByte (bytes);
systemTemperature = highByte (bytes);

- Jon

Reply all
Reply to author
Forward
0 new messages