Hello forum..!
May i ask if it is possible to create a Script that can shut down my PC when the voltage goes less than 4,5V?
confused
By sakis33
— Last update
Other robots from Synthiam community
Jstarne1's Easy Led Visual Test For Digital Ports Tutorial J...
During my last setup with a h bridge I was frustrated and wish I could see if the ports were active at the time they...
Tachyon's My Next Project
OK, check out what I scored! Its a RAD 1.0 robot toy. Someone gave this to me, new in box, never even used! Im excited...
Robotz12248's Pictures Of My Robo Jeep
Now that I know the right catagories, Ill post some pics of my Robotic jeep platform. It is a Power Wheels jeep. I...

Hi justin..,
as i write i want to create a Script that can shut down my PC when the voltage goes less than 4,5V?
i use V3 controller with a pc board. i want to know robot's voltage .
A jumber on ADC 0 between +5 & signal, like the photo?
You got it!
But, the GetADC() is gonna return an 8 bit value between 0-255 on the v3. So a little bit of math is needed to get the voltage.
255 = 5v 127 = 2.5v 0 = 0v
That means 255 / 5 = 51
So 4.5 * 51 = 229.5
Your code will actually be GetAdc(ADC0) < 229
I dont think it will work.
5v is the voltage reference, if the voltage drops to 4.5 the voltage reference will be 4.5 so the scale will be the same.
I m not familiar with ezb v3's voltage regulator does the board works with 4.5 ?
I'd recommend using a 2 resistor voltage divider to sense the voltage:
Voltage source ---VVV---ADC0---VVV-----GND
If the voltage source is 10V or lower a pair of 10kohm resistors would be fine to cut the voltage in half (5V max) and then tap the ADC0 sense line from the center connection of the resistors.
The EZ-Bv3 should work at input voltages 4.5V and a bit below but @ptp is right, as the voltage drops the analog voltage reference also gets lower the scale will stay the same so the ADC0 value won't change as you'd expect it should.
I guess we should clarify, are you using the same power supply for your ez-bv3 and your PC @sakis33?
Hello jeremie..,
yes i use the same power supply for ez-b v3 and my pc .
so you think that is not going to work ? i think that you have a point ...., i am going to try it again today and i give a reply
It'll work the way described as I have done with robots in the past. The latest version of the v3 uses a more efficient voltage regulator for the pic and Bluetooth that will operate as low as 3 volts.