Congratulations Steve G, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

My Battery Is Low

Assistance Requested

Help Smarty with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

Smarty claims to have checked these sources:

hi there,
Im working with the EZB-4 and 21x servos + a lot leds, camera and sensors..
the robot needs a lot power in action.
in the same second If my robot says: "my battery is low", he collapse..
I have no time for a reaction. its not good for the optical look.. I dont want scratches.. or a broken arm.. you know.
So I need to find a way to programming a better "battery is low warning". or a optical LED.. the best and coolest way is a live status inside the EZ-Robot Software..


I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.

Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


EZ Builder has a "live status" on-screen battery monitor that displays the voltage of the battery connected to your EZ-B.

Press the Project tab from the top menu bar of EZ-Builder.

Press Add Control from the button ribbon bar.

Press the General category tab and then press the EZ-B v4 Info icon to add the control to your project.

You can also write a script using the $GetVoltage variable to give you battery voltage warnings and program what you want your robot to do (such as a verbal warning only, or power down gracefully, and not collapse) by setting the minimum voltage slightly higher than the main warning, or disable the main warning all together and use your battery warning script.

Returns the EZ-B v4 Battery Voltage
Example: $x = GetVoltage()

Hope that helps. Smile


hi guys

you can set the batt warning higher.insteadt the normal 6.6 volt.
set it at excample 7.5 volts.on the web page.


If you set the low voltage warning higher it wont stop the EZ-B going to low power mode and shutting down servos etc. connected. That solution will not work and will not avoid the robot going limp.

Follow Steve's advice and use the variable for the battery voltage and monitor it, when it drops below a set voltage, high enough to move things still, have the robot move to a safe position where going limp will not cause any damage.



dont you get a warning when the batt is at 7.5 volts then?



What Rich is saying is that changing the voltage setting (in your example, to 7.5v), will be no different to what is being experienced now and won't help @Smarty out, as it will still cause the robot to go limp when the low voltage warning fires off, weather it be 6.6v or 7.5v.


thank you guys :-)
I will try it today.


steve g

thanks for explaining.


@Steve G

can you post a script to go into auto-position if the battery is low?
it would be easier for me and saves time.

because I dont understand:

Returns the EZ-B v4 Battery Voltage
Example: $x = GetVoltage()

What kind of data should I enter there ?

thank you :-)



IF($GetVoltage() < 7.0)
ControlCommand() # Replace with the ControlCommand() for the frame or auto position you want.
Sleep(1000) # Lower value will check more often but use more resources.