Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LIPO Battery Warning/Shutdown
06-19-2015, 05:07 AM
Post: #1
LIPO Battery Warning/Shutdown
I'm using a LiPo battery, and I'd like to use the code that warns and shuts down when low voltage is measured. I think I understand the necessary changes in the code, but I'd like to be very sure since it's a safety issue. Could someone provide a list of the changes needed?

Congratulations to Jose and Juan. B-Robot is a real achievement; the smoothness and stability are amazing.
Find all posts by this user
Quote this message in a reply
06-19-2015, 06:07 AM
Post: #2
RE: LIPO Battery Warning/Shutdown
It is hard to advise you without knowing the parameters of your battery.
Find all posts by this user
Quote this message in a reply
06-19-2015, 09:16 PM
Post: #3
RE: LIPO Battery Warning/Shutdown
I am using a 1000mAh 3S 25C Lipo.
Find all posts by this user
Quote this message in a reply
06-20-2015, 07:38 AM
Post: #4
RE: LIPO Battery Warning/Shutdown
Very good! Now we have to tell the voltage of the battery pack.
Find all posts by this user
Quote this message in a reply
06-21-2015, 01:30 PM
Post: #5
RE: LIPO Battery Warning/Shutdown
You can solder pot and adjust voltage for shutdown at 10.5v
Find all posts by this user
Quote this message in a reply
06-22-2015, 06:51 PM
Post: #6
RE: LIPO Battery Warning/Shutdown
I was looking for definitive information on how to adjust the Arduino code so that the warning and shutdown are in effect.

For example, I'm assuming that this section of the code needs some minor changes, as follows:

// Battery management [optional]. This is not needed for alkaline or Ni-Mh batteries but usefull for if you use lipo batteries
#define BATTERY_WARNING 110 // (11 volts) aprox
#define BATTERY_SHUTDOWN 104 // (10.4 volts)
#define BATTERY_CHECK 1 // 0: No check, 1: check
#define SHUTDOWN_WHEN_BATTERY_OFF 1 // 0: Not used, 1: Robot will shutdown when is off (_CHECK SHOULD BE 1)

Note that I've made these changes:
BATTERY_CHECK is set to 1
SHUTDOWN_WHEN_BATTERY_OFF is set to 1

Are any other changes needed?

Also, it looks like the battery warning feature has not been implemented. See this code at the very end of the sketch:

else if (BROBOT.battery < BATTERY_WARNING)
{
// Battery warning
// What to do here???
Serial.print("LOW BAT!! ");
Serial.println(BROBOT.battery);
//moveServo(SERVO_AUX_NEUTRO+300); // Move arm?
}
Find all posts by this user
Quote this message in a reply
06-22-2015, 07:21 PM
Post: #7
RE: LIPO Battery Warning/Shutdown
It's good that you do the sketch code, but ... If you need help with more demanding operating conditions LiPO batteries, give at least a link where you bought the battery, if you do not want to specify the voltage of the battery Smile
Find all posts by this user
Quote this message in a reply
06-23-2015, 09:38 AM (This post was last modified: 06-23-2015 09:43 AM by sasa999.)
Post: #8
RE: LIPO Battery Warning/Shutdown
(06-22-2015 07:21 PM)KomX Wrote:  if you do not want to specify the voltage of the battery Smile
3S
.
Not less than 3.2V for cell, but I recommend 3.5V for safe usage and battery life. So for 3S that will be 10.5V.
Find all posts by this user
Quote this message in a reply
06-23-2015, 12:10 PM (This post was last modified: 06-23-2015 12:11 PM by KomX.)
Post: #9
RE: LIPO Battery Warning/Shutdown
That true. You can safely discharge a lipo till 10.5V.
But it is better to leave the battery in 10-20% of capacity (11.1-11.4V).
You should also store the battery with 60-70% capacity (11.9-12.1V).
Never store the lipo fully charged. You should only fully charge it before using.

So,
#define BATTERY_WARNING 111 // or 114
#define BATTERY_SHUTDOWN 105

Hope this helps.

P.S. for sasa999.
Куда глядели мои глаза!
Find all posts by this user
Quote this message in a reply
06-25-2015, 03:44 AM
Post: #10
RE: LIPO Battery Warning/Shutdown
I tried to use the battery management code and ran into a problem. If I try to turn the battery mana like this:
#define BATTERY_CHECK 1 // 0: No check, 1: check
#define SHUTDOWN_WHEN_BATTERY_OFF 1 // 0: Not used, 1: Robot will shutdown when is off (_CHECK SHOULD BE 1)

I get these compile errors:
D:\Users\Bill\Documents\Arduino\libraries\JJROBOTS_BROBOT/JJROBOTS_BROBOT.h: In function 'void loop()':
D:\Users\Bill\Documents\Arduino\libraries\JJROBOTS_BROBOT/JJROBOTS_BROBOT.h:9: error: 'int BROBOT_Class::battery' is private
BROBOTReverseServoBatteryCheck:775: error: within this context
D:\Users\Bill\Documents\Arduino\libraries\JJROBOTS_BROBOT/JJROBOTS_BROBOT.h:9: error: 'int BROBOT_Class::battery' is private
BROBOTReverseServoBatteryCheck:785: error: within this context
D:\Users\Bill\Documents\Arduino\libraries\JJROBOTS_BROBOT/JJROBOTS_BROBOT.h:9: error: 'int BROBOT_Class::battery' is private
BROBOTReverseServoBatteryCheck:790: error: within this context
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)