Author Topic: Laptop AC adapter tester -WiP / design tips needed-  (Read 7994 times)

0 Members and 1 Guest are viewing this topic.

Offline Eliminateur

  • Regular Contributor
  • *
  • Posts: 173
  • Country: ar
  • Electronic's Technician
Laptop AC adapter tester -WiP / design tips needed-
« on: January 21, 2011, 05:44:16 am »
Hello guys, i figured this would be the best forum(or maybe not) to ask/share my questions as the audience is quite knowledgeable in all sort of electronics matters, without further ado, let's begin...

My need is to build an "automated" notebook power adapter tester, for the moment only for Dell AC adaptors(rest could be added later with some tweaking), let's call it "revision a" to start with something.

Data i have:
*) Dell -modern- AC bricks come in 65W, 90W and the rare 150W variants, they're all 19.5V and vary current, 4.6A for the 90W(89.7W eff) model and so on(it's in the label), models vary ~PA-10, PA-12
They use a circular jack with center pin, power is delivered through outer and inner jack walls, center pin is ID info supplied by a Dallas DS2501 512bit ID chip(just like the one Dave posted in episode #134

), this chip is a custom-made version AFAIK because it's not available(or deprectaed), smallest right now is DS2502.
the DS2501 is powered by ghost power supplied by the notebook itself!(you'd think that with all the power available inside the brick they could've used that as source) and -for all intents and purposes- it's isolated from the brick other than ground part.

Chip has 2 x 32byte banks, i need to start reading at address 0 for 10 bytes(9+MSB of 10th) and compare the string: DELL00AC for general ID and next the watt id which is 090, 065, 150, etc (following is the rated voltage and current rating which i can safely ignore given the wattage).

*) One of the normal failure modes in Dell bricks is related to this ID part, the notebook does not recognize the brick thus disabling the battery charge circuitry(notebook is still powered by the brick, but does not charge battery) and returns "unrecognized AC adapter plugged" errors on boot screen.
since the cable is floating and long, it's normal that it either picks up ESD and burns the DS2502 or -most of the time- the cable cuts due to bending(the ID cable is fairly thin compared to the power delivery ones).
there's also other problems as intermittent output(anecdotal evidence of one bugger that at random intervals drops the output to ~10V for 60~mS -couldn't mesure it on the analog ORC as it's too random, too short and to see it triggered i need to use a big timebase so cursor is impossible to folllow- causing havoc on the notebook, the backlight switches from batt to AC, battery charges/discharges due to Ac connected stabilization timeouts, etc) unable to maintain load, etc

some resources:

Specs on "revision a":

1) Simple LED output: Type of charger plugged: 65W/90W/Other. Fault leds: ID Error, Vout out of range, Fail under load, Unstable output. Pass OK led

2) Be able to test at rated power for X minutes (up to the 90W one, 150W is fairly rare in the shop) and check that Vout is stable and rated(test for microdrops, be inmune to small ripple) and a simple pass/fail led.
Power test to be controlled by a simple start/stop button, if ID chip fails, then test only at safe power of 65W

further improvs for future revs: Use an LCD/7-seg LED display for status output: adapter type, minutes in testing, Vout, fault results(i.e: Vout out of spec, unstable output, ID chip failed, etc), even ID string dump for unknowns, ripple detection, etc.

Testing flowchart

Uploaded with

1) Check for connected adapter ;D
    At any point "abort" button is pressed, skip to the end(i forgot to add this on the flowchart)

2) Determine ID and pass/fail LED
   If fail, lit up ID error LED then proceed to Vtest and 65W load test.
   If OK read ID to determine resistor bank and lit up corresponding power LED.

3) Voltage tests -if any step fail, abort all others and stop further tests-
   Window comparison for Voh and Vol, if fail lit up Vout out of range
   Spike detection for 30 seconds, if fail lit up unstable output.

4) Load tests -whilst performing load tests, also do step 4 at the same time-
   65W switch appropiate resistors for 65W
   90W, same as above
   If Voltage test fails whilst under load test loop, then also lit the "Fail under Load" LED.

Design details and where i need help now

1)  PIC Based(is what i know and can get with *relative* ease here), need help with selecting one based on your feedback guys, based on local supply i think the PIC16F616 could do -2K words flash, 128bytes sram, 1 ECCP, 2/1 timer, 11 I/O, 2 comparators, 8ch 10b ADC but i can't find it on my country :S...., maybe free samples...
¿maybe arduino?, dunno..., i'm not a big fan of C...

2) [whatever ucontroller here] would need to interface via 1-wire protocol to DS2502 and read the ID/compare/chose testing method(with arduino there are some libraries apparently, there's also a Dallas interface chip that converts to normal" serial but i'd rather not have to search for it in local shops, and it uses the 2 serial ports of the arduino), with MPASM i'd probably destroy my brains trying to program it, maybe MP C...)

3) Load testing: i'm thinking regular old resistor banks for load test, MOSFET controlled(i have a ton of power mosfets from computer PSUs that i could use) or relay(quite the high current ones and i'd need 2, or a mosfet and a relay with 2 toggled outputs), doing a little math, i'd need a 4.24 ohm(i can combine it with 1R+3.3R) 87W resistor :D, i have no idea how to get such an extreme power resistor, even if i parallel hihger values to share power, Those 20/30W resistors can get pricey very fast....., ¿how do programmable loads deal with this matter?, ¿any hints?
Addendum 21/01: It seems programmable current sink is the "pro" way of doing this, as it guarantees an exact-desired current consumption whilst a resistor bank is a best-guess approach, i'm researching high current sink circuits...(offities bout mosfets and linearity abound...)

4) Voltage low/high, i'm thinking of using the 2 comparators on the PIC in window mode, what do i do to condition the signal for this?, a discrete opamp?(as the voltage far exceeds the ucontroller Vcc)
   an alternative would be using a divider network and the ADC, to sample and calculate the high/low in software, what would be best?, if i where to expand the design in the future to display Voltage, i'd need to ADC it anyway so it would be more future proof.

5) ¿How do i "capture" the spikes?, if it where a DSO i'd set the trigger for out of range and wait for it...., but on a ucontroller, how?, do i use the CCP/ECCP unit in the PIC?, do i do it in software using the ADC?(taking in mind that the divider network will lower the dynamic range of the signal, plus the sample speed and ADc -low- precision), i've been racking my brains on this one but so far found no elegant solution.
   Maybe a comparator(int/ext) set for 2 or 3 v less than nominal voltage(use Vout as reference) and triggering an interrupt(again, how do i deal with the wildly differing voltages without affecting accuracy, optos?)  

6) for load test time, i'd say... arbitrarely, 10 to 15 minutes. One thing i have in mind is what to do with the spike test timeout whilst load test is functioning, should i lower it, bypass it?(a Vout drop would also be registered as a spike after all....)

Random notes, caveats, future revisions:

1) EVEN if ID fails there could be compound problems hence the failsafe 65W route, it could also work for non-Dell bricks that use same pinout(HP has a line of bricks that share the same conector and voltages, but different ID)

2) A serial LCD would simplify things a lot for future revisions and require far less output pins, it would be good to leave revision a future-proof to allow "drop-in" upgrades, or do you guys recommend another LCD type?, i was thinking of something like 128x64, or 2 lines by 32 chars, something like that...
I'd also need to add some "mode" button to scroll/chose what to display

3) I'll be posting progress and schematics/sourcecode for whoever finds this interesting to build, since i'm asking for help it would be rude not to share the results.

4) Ripple, i have no idea what's the allowed max ripple on these adapters and for all intents i'm ignoring it in this test device(i think it would add unneeded complexity, and i really have no idea how to measure ripple "electronically"), i'll need to be careful not to trigger spike detection with ripple...
Add. 21/01: Precision rectifier+peak detector=instant ripple detector, future feature maybe rev b, i'll still need to be careful on the spike detector

I've taken the liberty of numbering the points inside the sections so that you can reference them in subsequent posts to help maintain order.

Regards and sorry for the long post(i've been writing it for hours and it's gotten quite late here)  :), i'll be adding a log on bottom here to update the notes and keep a sanity check(added notes in blue):

20/01: Initial post
21/01: Seems like i need to concentrate on the analog parts first, looks like the "programmable load" could be tricky as using a current sink would be the best way fo ensure specifie current consumption.
saw a nice thread on the forum about 19v ripple detection for the same use as this device, i'll add it to the list of things to improve in future(it would fit nicely in the Voltage tests group), but i don't want to get feature creep!, so it's best to start with the basics and build from there!
« Last Edit: January 21, 2011, 01:54:41 pm by Eliminateur »

Offline tronxkid

  • Newbie
  • Posts: 3
Re: Laptop AC adapter tester -WiP / design tips needed-
« Reply #1 on: June 22, 2013, 10:56:51 pm »
any update mate?

Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo