Charging and unique id through only two pins - Page 1
Forum section: electronics / projects

author: JJalling
author_rank: Unknown
timestamp: September 23, 2020, 06:14:06 pm
content: Hello,I have some rechargeable devices that I want to identify uniquely from a charging system - my problem is that I only have two wires available. Right now the two cables are +5V and GND and are supplying the charging circuit of the device. My initial idea was to connect a 1-wire device in parallel with the device, but thinking about it again, I don't think it would work, because of the current draw of the device itself (I can to some degree control the current draw (charging or not), but there will always be some current flowing (a couple of mA).Do you have any suggestions on how I can achieve this?Thanks in advance!BR Jonas

author: David Hess
author_rank: Super Contributor
timestamp: September 24, 2020, 02:34:47 am
content: If the charging circuit only draws current at a higher voltage, maybe because it has an under-voltage lockout, then a resistor or current sink could draw a specific current in parallel at a lower voltage, like 10s or 100s of microamps, as an ID method.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: September 24, 2020, 04:13:53 am
content: There are lots of solutions to this problem.If you only have a relatively small number of devices to identify you could just have them each modulate the current draw at a unique frequency (chop between 2 and 2.5 mA for example).I also think you can use your 1-wire idea by building a delay into the charge path in your device. So the sequence is plug in the device. Charger senses load and drops voltage (1 wire interrogate). Device sees power come up and delays charge mode for a few tenths of a second to let one wire communication protocol complete. Your 1 wire charger finishes reading the IDs and keeps the voltage high. Timer in remote devices connects charging load and carry on.

author: JJalling
author_rank: Unknown
timestamp: September 24, 2020, 07:33:42 am
content: Quote from: CatalinaWOW on September 24, 2020, 04:13:53 amWell small and small. I expect ~2000 devices.Quote from: CatalinaWOW on September 24, 2020, 04:13:53 amI think I will give this a try and report back - it is more or less what I had in mind in the first place.BR Jonas

author: RoGeorge
author_rank: Super Contributor
timestamp: September 24, 2020, 08:13:03 am
content: I would use the same 1 wire protocol used by the laptop power supplies. There are already 1 wire PROM's and schematics used in laptops and their brick adapters. Some random link as a starting point for searching more info:https://hackaday.com/2014/03/03/hacking-dell-laptop-charger-identification/

author: JJalling
author_rank: Unknown
timestamp: September 24, 2020, 08:19:04 am
content: Quote from: RoGeorge on September 24, 2020, 08:13:03 amThat is exactly 1-wire, but they unfortunately use three wires and not two. But thanks for your input.BR Jonas

author: RoGeorge
author_rank: Super Contributor
timestamp: September 24, 2020, 08:38:08 am
content: It can be done with exactly 2 wires. You need to add some sort of bias-tee, of course, in order to transfer both data and power over the same 2 wires.

author: JJalling
author_rank: Unknown
timestamp: September 24, 2020, 08:45:35 am
content: Quote from: RoGeorge on September 24, 2020, 08:38:08 amHehe, "some sort of bias-tee". You are right, but that wasn't what you include link was about. You link was about Dell laptop chargers, which uses 1-wire, but uses three wires - I only have two wires available unfortunately.But again, thank you for your input.BR Jonas