Author Topic: Car USB Charger 3-in-1  (Read 2161 times)

0 Members and 2 Guests are viewing this topic.

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Car USB Charger 3-in-1
« on: September 20, 2018, 09:29:33 pm »
Hi
I'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.














« Last Edit: September 20, 2018, 09:31:32 pm by masster »
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Car USB Charger 3-in-1
« Reply #1 on: September 20, 2018, 11:01:39 pm »
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

 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Car USB Charger 3-in-1
« Reply #2 on: September 20, 2018, 11:04:58 pm »
Interesting charlieplexed seven segment display. I was wondering where the other 33 ohm resistor was and then noticed the display has only six pins.
 

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #3 on: September 20, 2018, 11:36:55 pm »
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.
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Car USB Charger 3-in-1
« Reply #4 on: September 20, 2018, 11:39:15 pm »
It's just a guess. The STC microcontrollers are quite common in Chinese designed and manufactured products.
 

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #5 on: September 21, 2018, 12:40:25 am »
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?
« Last Edit: September 21, 2018, 12:42:06 am by masster »
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 5893
  • Country: ca
Re: Car USB Charger 3-in-1
« Reply #6 on: September 21, 2018, 02:54:54 am »
I would guess An STC controller too,  there's ton of them in may small panel voltmeters

Follow 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 ???
 

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #7 on: September 21, 2018, 06:41:34 pm »
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  :(
 

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #8 on: September 21, 2018, 11:52:30 pm »
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.3

Problem 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.
« Last Edit: September 21, 2018, 11:55:49 pm by masster »
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Car USB Charger 3-in-1
« Reply #9 on: September 22, 2018, 12:13:30 am »
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:

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

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #10 on: September 22, 2018, 01:30:12 am »
Here is a quote from my first post:
Quote
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.6 V.
That 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.
 

Offline massterTopic starter

  • Regular Contributor
  • *
  • Posts: 79
  • Country: ro
Re: Car USB Charger 3-in-1
« Reply #11 on: September 24, 2018, 01:30:51 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf