Car USB Charger 3-in-1 - Page 1
Forum section: electronics / repair

author: masster
author_rank: Regular Contributor
timestamp: September 20, 2018, 09:29:33 pm
content: HiI've got this Chinese car dual port USB charger that also shows the battery voltage and the charging current on a 3-digit display with blue 7-segments LEDs. When the charger is inserted into the car socket, it shows the voltage on battery. When a load is attached to any USB port, it shows briefly the output voltage (5.1 V) then the charging current stays on. So the charger is a bit 'smart'.Now, the problem is that the true voltage on battery (identical with the voltage inside the car socket) is 300 mV higher than what the charger shows. For instance, if 12.3 is displayed by the charger, the voltage on battery is in fact 12.6V. Annoyed by having to add mentally 0.3 to whatever value shown, I decided to open the charger and see what part value I have to tweak to calibrate the voltmeter. I fell short because there are no markings on ICs inside that would have allowed me to reverse engineer the schematic.So I uploaded 5 photos hoping you can help me identify the ICs. The charging/USB ports board is connected to display board via a 4-wire cable.Thank you.

author: oPossum
author_rank: Super Contributor
timestamp: September 20, 2018, 11:01:39 pm
content: Some guesses....The 180k (R10) and 12k (R9) resistors are the divider for the 12V scale.The 30k (303) and 10k (01C) resistors are the divider for the 5V scale.U1 is a STC microcontroller.https://www.stcmicro.com/cp.html

author: oPossum
author_rank: Super Contributor
timestamp: September 20, 2018, 11:04:58 pm
content: Interesting charlieplexed seven segment display. I was wondering where the other 33 ohm resistor was and then noticed the display has only six pins.

author: masster
author_rank: Regular Contributor
timestamp: September 20, 2018, 11:36:55 pm
content: Thank you for the reply, oPossum. Very good hints.I'm curious how did you recognize it is a STC microcontroller and not, let's say, a Microchip one.

author: oPossum
author_rank: Super Contributor
timestamp: September 20, 2018, 11:39:15 pm
content: It's just a guess. The STC microcontrollers are quite common in Chinese designed and manufactured products.

author: masster
author_rank: Regular Contributor
timestamp: September 21, 2018, 12:40:25 am
content: I couldn't find any 14 pin STC microcontroller.The closest I could find is a PIC16F526 (SOIC packaging)Do you think it is a good find?

author: coromonadalix
author_rank: Super Contributor
timestamp: September 21, 2018, 02:54:54 am
content: I would guess An STC controller too, there's ton of them in may small panel voltmetersFollow the 12 volt path you'll find the resistor divider network going into the chip, you'll be able to fiddle the voltage a little, maybe adding some parallel resistors values

author: masster
author_rank: Regular Contributor
timestamp: September 21, 2018, 06:41:34 pm
content: I've measured voltages on connector CN1. See photo below. The problem is that changing the divider value will not offset up all previous displayed Vbat values by 0.3. Considering displayed Vbat value a linear function of Vbat (y=ax+b), changing the divider value will modify the slope of the function, not the offset. The offset will be correct (+0.3) only for a certain value of Vbat

author: masster
author_rank: Regular Contributor
timestamp: September 21, 2018, 11:52:30 pm
content: In case the description of the problem in my previous post was not clear enough, I will rephrase.For a given value of battery voltage (Vbat) divided by the resistive divider, the program inside microcontroller outputs a voltage display value (Vdis).The function Vdis(Vbat) is most probably a linear one like so:Vdis=a*Vbat + b, where 'a' is the divider factor and 'b' is an offset.Since right now Vdis is constantly 0.3 V lower than Vbat, meaning it has a negative offset, the correct function should be:Vdis=a*Vbat + b + 0.3Problem is I don't have access to firmware to modify the offset of the function. I only have access to 'a' value. Sadly that would only change the slope of the function, not the offset like I would want to. See graphs attached.

author: oPossum
author_rank: Super Contributor
timestamp: September 22, 2018, 12:13:30 am
content: Quote from: masster on September 21, 2018, 11:52:30 pmIt is certainly possible there is an offset, but quite unlikely. Connect it to an adjustable power supply and see what it displays for 12.0, 13.0, and 14.0 volts.

author: masster
author_rank: Regular Contributor
timestamp: September 22, 2018, 01:30:12 am
content: Here is a quote from my first post:QuoteThat is the whole point of this topic. EVERY voltage displayed is exactly 0.3 V lower than battery voltage, from 10 V to 15 V. Same goes for a variable DC source. I call that 0.3 V a voltage calibration offset, or voltage error.

author: masster
author_rank: Regular Contributor
timestamp: September 24, 2018, 01:30:51 pm
content: I'm thinking inserting a Schottky diode in series with one resistor from the divider like in attached photo. I'm hoping a 0.2V drop on the Schottky diode will be enough to offset the displayed value to a more accurate reading. If you think that my idea is good, please help me choose the right diode.