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

Hstud's Hunters1st Robot Sam
My name is Hunter, I am 8 yrs. old, and wanted to build my own robot. S.A.M. Synthetically Advanced Machine is the...

Orwnic82's Ez-B Processor Quadrotor
I been working on this quad for awhile, back before the EZ-B kits started. I only have the stabibility to work out...

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...
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.