Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Canada
Asked
Resolved Resolved by DJ Sures!

Monitor PC Voltage

Anyone know of a good way to monitor power of the battery and feed voltage into ARC so I know when PC Is about to die?  I monitor Power of EZB but I can't monitor power PC has.  I share the same 12v battery for PC, Servo's EZB etc  but I keep voltage at 7.5v for EZB with a voltage regulator and for the PC I use a step up converter.  Step up converter starts to fail around 10.5v but EZB is still happy and doesn't record a voltage drop.  End Result is PC on robot dies without making it back to dock on time to recharge battery.

Note: I used prevent PC sleep as question but really it is pc shutdown due to no power.  I selected Rock PI X but using NUC but assume relevant.


Related Hardware Rock Pi X
Related Control Prevent PC Sleep
PRO
Synthiam
#1  
I don’t think you need to set up. The rock pi x only requires 5 volts. 

The ezb adc port can monitor the voltage of you decide to continue using the step up. You’ll need a voltage divider circuit and voila:)
PRO
Canada
#2  
I only had choice to select Rock PI (yes maybe a bad selection)  but as per comment I am using a NUC and that is 19v
PRO
Synthiam
#3  
Oh and the nuc needs 11v? Won’t run off 5?

then voltage divider to ARC it is
#5  
Not my area of expertise, but don't voltage dividers lose a lot of power to waste heat compared to a buck converter?  I imagine for a micro computer you don't need to worry too much about not being able to pull enough amps.

Alan
PRO
Canada
#6   — Edited
Today I have the following 12 volt battery driving the EZB with a voltage regulator that reduces voltage to 7.5v because my servo's run at 7.5v.  I have a Boost converter to PC that increases voltage to 19v because the NUC prefers 19v.  The NUC will die when voltage drops below 14v especially when using Cameras etc.  So what I need is a way to measure the voltage coming into the PC to know when it drops below say 16 volts so the Robot knows to go back to the charger. 

User-inserted image
PRO
Synthiam
#7   — Edited
You need a voltage divider LOL

no current is being consumed. Make a voltage divider with the link I found and pasted for you. Connect it to ezb adc
PRO
Canada
#9  
OK Now I get it thanks. @DJ  I didn't realize you were proposing divide the voltage so it is less than 5vDC so the ADC could read it. @Proteusy thanks for the link to the Arduino code. that could work if it gets stuck and can't make it home in time.

Keeping a robot alive 24/7 is certainly an interesting problem.
PRO
Canada
#10  
Thanks Question Closed.  Appreciate the help.
PRO
Synthiam
#11  
lol thank goodness. I was feeling like a broken record:D  

while ironically listen to vinyl records as I type this...
PRO
Canada
#12  
It worked well, I can even tell when I have docked correctly now as occasionally the magnets I put on the roomba and side of roomba charger don't contact in order to charge.  Sorry about the misunderstanding, I completely missed the read input voltage with ADC and was wondering why you kept wanting me to add a  voltage devider.   I will try the Arduino build later for a graceful shut down next.
PRO
Synthiam
#13   — Edited
There's a JavaScript call to shut down: https://synthiam.com/Support/javascript-api/Utility/shutdownPC

or hibernate: https://synthiam.com/Support/javascript-api/Utility/sleepPCHibernate <- Requires a lot of HD space and energy

or suspend: https://synthiam.com/Support/javascript-api/Utility/sleepPCSuspend  <- Requires battery still

But I think you'd want to use ShutDown. Because Hibernate should be disabled in your NUC for performance, energy consumption, and HD space. It's documented in the Storage and Performance tips: https://synthiam.com/Support/Install/free-space-with-windows-10
PRO
Canada
#14  
Thanks. 

I am adding a relay board to turn off with an ESP at the moment including cutting Roomba battery for emergency stop (need a big red button) and also clear up roomba when it gets stuck in program mode and won’t talk to EZB.  The JavaScript shutdown should work on PC. thank you then I can power off EZB say 5 minutes later. 

still not quite at the point I am prepared to let it roam free yet but with the sealed lead acid battery, navigator, roomba dock, voltage monitor, object avoidance and auto charge, getting closer.
PRO
Synthiam
#15  
haha yah it's super awesome watching the progress! Wish I had time to build robots like you guys - I'll live vicariously through you!