Today we create a new version of our magsafe tester. New version has LCD and you can read magsafe adapter. This is important when you buy chineese cables or adapters.You can read wattage, id and serial number. As i said in my previous post in chineese cables has pic mcu instead of dallas and it is emulated. When you connect magsafe adapter it will read adapter and start blink if adapter is genuine it will blink red green and amber but if not will blink only green and red.
Finally found some spare time to find out what is difference between genuine and not genuine adapter cables and why on non genuine adapters you cannot change diodes lights and id is readed with faults. Take logic analyzer and make some captures to see where are differences. This is screenshot of communication between mac and cable..
On logic analyzer there is option to export in csv and here is csv
Time [s], Analyzer Name, Decoded Protocol Result
0.032112584000000,1-Wire,READ ROM command: [0x33]
0.032972514000000,1-Wire,FAMILY CODE section from ROM: [0x85]
0.033844892000000,1-Wire,ROM CODE section from ROM: [0x1003C085FA77]
0.039132810000000,1-Wire,CRC section from ROM: [0x9B]
0.041093412000000,1-Wire,SKIP ROM command: [0xCC]
4.806852970000000,1-Wire,SKIP ROM command: [0xCC]
After that sniff communication between arduino and magsafe adapter and find differences.First reset is 480 ms on mac it is 600 ms. It looks that emulation in chineese adapters is not flexible as ds2431 so if we wanna to make tester to read non genuine adapters we must tweak onewire library to read non genuine adapters. After some tweak of times in library finally all is done and you here can download changed arduino library that can be used to read non genuine apple adapters.
Magsafe connector how to test it and what is difference between genuine and not genuine adapter
Thanks to Ken Shirriff’s blog we found a lot of information about Magsafe connector. Two pins are power, two pins are ground, and the middle pin is a data connection to the laptop.
Inside the Magsafe connector is a tiny chip that informs the laptop of the charger’s serial number, type, and power. The laptop uses this data to determine if the charger is valid. This chip also controls the status LEDs. There is no data connection to the charger block itself; the data connection is only with the chip inside the connector.We make some pictures of genuine magsafe adapter as Ken say’s there is a DS2413 and chip is powered by parasite current thru data line.
How to read the ID number
It’s very easy to read the ID number from a Magsafe connector using an Arduino board and a single 2K pullup resistor. Our goal is to make small and simply tester that can read DS2413 1-Wire Dual Channel Addressable Switch.It is based on arduino mini and a simple pcb and when connect magsafe 1 or 2 adapter it will start blink green red and amber.Tester will change colors only if adapter is genuine if adapter is Replacement it will light just green and red. On genuine adapters there is delay before blink because adapter will start main supply after charger detects the power input has been pulled low, but not too low. (A short or a significant load will not enable the charger.) After exactly one second, the charger switches to full voltage (14.85 to 20 volts depending on model and wattage).
All this information is only for genuine power adapters we test a lot of non genuine adapters Â light green and red never seen amber. So we decided to open non genuine cable and see what’s inside.
Well there is big difference between genuine and non genuine cable as we can see there is small 6 pin chip and this is only resemblance. This chip is emulation of ds2413 it is pic10f200 they use 2.7k resistor and zener diode on 3.3 v from power supply to power it that is why you will never read it when connect and try to read as ds2413 because pic will be without power. Pin 1 is connected to one led pin 2 is gnd pin 3 is connected to other led pin 4 is communication with laptop pin 5 isÂ power.