I am making a simple voltage divider that should output 3.2V (or close to) and it does, until I attach the wire to a pin on the teensy 3.2 at which point i get 1.6V. What am i doing wrong?
Here is the info on what I am doing...
I was trying to do a "write to EEPROM on power loss detect" sorta thing that i found here...
this is my first schematic...
it should also be noted i have a bunch of push buttons wired to a bunch of the pins each with a 10K resistor to ground and ~500ohm to pin input but i didnt draw it in the diagram. The power in to each of the buttons and the 10K to ground are Vin and Ground directly before the teensy... so meaning after ALL the other electronics (eg caps, diodes, resistors, buck converter etc)
the battery was purchased a long time ago, i do not have any purchase history for it so I cannot say for sure what it is, but it is a rechargeable 5V (i actually get 5.2V out of it) li-ion battery probably from AliExpress kinda like this one...
i may not have the right power input on the teensy3.2 component in the diagram... in real life I have it wired to the 5V pin (not using the USB connector) maybe its the same pin on the diagram.. i wasnt sure. in the diagram i put it to Vbat... maybe i should have just put it to Vin USB...
This WORKS to detect power failure... (eg when i flip the spst switch off). I write to 56 bytes (only if they differ that what is there) and it works flawless, every time.
however I then tried to detect just low battery (to make the LEDs flash when it was getting low so you knew u needed to recharge soon) and i found that the battery never drops below 5.2V... which was weird.
So I pulled open the battery and found that it is actually 3 - 4V cells in series to make 12V with what i think is a buck converter to 5.2 (which would explain why it never dropped below 5.2).
Here is the buck converter...
(i couldnt find this guy online)
So I then made my voltage divider for low battery detection before the buck converter like in this schematic..
and if i read voltage at points A and B when the wire is NOT connected to teensy's pin A0(pin 14) I read 3.1V (which is what i want) but when i connect the wire to pin A0 it reads 1.6V between points A and B and also between points C and D (i cannot read between C and D when the wire is not connected obviously).
Why would this be? are the ground lines before and after the buck converter not connected? should I connect them? Or how would i make that read close to 3.3V when the wire is connected to the teensy?
Any help is appreciated.
Thanks