gauravkothari23
Advanced Member level 2
Hi all...
i am trying to build a small battery indicator (image attached), and trying to pull the micro controller pin high when the battery voltage goes low.
initial circuit was something different. instead of PC-817 anode and cathode, i was using a led. so when the battery voltage drops below 3.4v the LED lights up.
but now i have made a small alterations. i need to low battery indication to be sent to the controller by pulling the port pin high.
so i connected the pin 4 of PC817 to controller pin. but the thing is, the pin 4 of PC817 does not go low. it always stays high. when battery voltage is above 3.4v the output from pin 4 should be 0, but it stays high.
i am trying to build a small battery indicator (image attached), and trying to pull the micro controller pin high when the battery voltage goes low.
initial circuit was something different. instead of PC-817 anode and cathode, i was using a led. so when the battery voltage drops below 3.4v the LED lights up.
but now i have made a small alterations. i need to low battery indication to be sent to the controller by pulling the port pin high.
so i connected the pin 4 of PC817 to controller pin. but the thing is, the pin 4 of PC817 does not go low. it always stays high. when battery voltage is above 3.4v the output from pin 4 should be 0, but it stays high.