Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#307161 - 11/02/2008 20:19 Fixing the temperature sensor!
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Well, with everything else fixed in my empegs (except for one missing cs4231a chip..), I figured I may as well fix the "broken" ds1821 temperature sensors in a couple of them.

The chip isn't really broken, it's just confused -- it thinks it is a thermostat rather than a temperature sensor. To get it back into sensor mode, it has to be re-configured.

This requires a special reprogramming sequence, whereby pin-8 is temporarily grounded while software pulses pin-2 (DQ) low 16 times, and then pin-8 is set to +5V. Software must then write the configuration register of the device to have it remember the setting for subsequent power-ons.

So I wrote a small addition to Hijack to handle the reprogramming, including a prompt for me to switch the voltage on pin-8, and then wired up a 3-pole switch to handle the hardware side. The switch and stuff get removed again once the operation has succeeded.

It worked great on my first unit. Now I just have to identify which other ones also require the fix.

Cheers


Attachments
b.jpg

Description: Pin-8, lifted and wired to the switch instead of Vcc.

a.jpg

Description: The switch, with a debounce resistor and jumpers to +5V and GND.



Top
#307165 - 11/02/2008 20:54 Re: Fixing the temperature sensor! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Another one fixed!

It takes way longer to disassemble/reassemble the player than to actually fix the sensor.

Still digging through the collection here..

Top
#307166 - 11/02/2008 21:00 Re: Fixing the temperature sensor! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: mlord
Another one fixed!

It takes way longer to disassemble/reassemble the player than to actually fix the sensor.

Still digging through the collection here..

Mmmm.. only the two. I could've sworn there was one more!

So, that was one in four with the problem here.
I wonder if that average is typical ?

(I believe we fixed the cause several years ago, so no new ones should be going bad now, at least not with a modern Hijack installed).

Top
#307167 - 11/02/2008 21:17 Re: Fixing the temperature sensor! [Re: mlord]
Robotic
pooh-bah

Registered: 06/04/2005
Posts: 2026
Loc: Seattle transplant
The man is on fire!
Go, Mark!
_________________________
10101311 (20GB- backup empeg)
10101466 (2x60GB, Eutronix/GreenLights Blue) (Stolen!)

Top
#307172 - 12/02/2008 00:47 Re: Fixing the temperature sensor! [Re: mlord]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Originally Posted By: mlord
Now I just have to identify which other ones also require the fix.
Well... mine, for one. crazy

Top
#307179 - 12/02/2008 01:56 Re: Fixing the temperature sensor! [Re: canuckInOR]
newguy1
enthusiast

Registered: 26/01/2002
Posts: 278
Loc: Massachusetts,USA
Is this a permanent fix, or will the chip get confused again?
_________________________
MIKE 80Gb RIO

Top
#307180 - 12/02/2008 02:03 Re: Fixing the temperature sensor! [Re: newguy1]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: newguy1
Is this a permanent fix, or will the chip get confused again?

"I believe we fixed the cause several years ago, so no new ones should be going bad now, at least not with a modern Hijack installed".

The story was, that while clocking commands out to read temperatures, the routine used to be interrupted once in a while by the "DMA" interrupt (moving sound bits to the DSP). This causes the ds1821 to misinterpret those pauses as phantom bits. Once in a while it would "get lucky", and those "phantom bits" would tell it to switch to thermostat mode. Permanently.

We fixed that by masking all interrupts (including the "DMA" interrupt, aka. FIRQ) during any bit-banging operations for the ds1821 chip. Problem solved.

Cheers


Edited by mlord (12/02/2008 02:06)
Edit Reason: Added explanation

Top
#307182 - 12/02/2008 02:25 Re: Fixing the temperature sensor! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Mmmm.. there may be a slightly simpler way to do this.

The SMC ethernet chip has a spare TTL-output pin (as well as a spare input), which could be wired to pin-8 of the ds1821 temperature sensor chip. Then the pull-down to GND, and subsequent pull-up to Vdd could be accomplished automatically by Hijack.

Just a simple pin-lift + jumper wire. And it could be left in place permanently.

I think I'll "kill" another temperature sensor here and try that mod on it..

Top
#307186 - 12/02/2008 03:04 Re: Fixing the temperature sensor! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: mlord
Mmmm.. there may be a slightly simpler way to do this.

The SMC ethernet chip has a spare TTL-output pin (as well as a spare input), which could be wired to pin-8 of the ds1821 temperature sensor chip. Then the pull-down to GND, and subsequent pull-up to Vdd could be accomplished automatically by Hijack.

Just a simple pin-lift + jumper wire. And it could be left in place permanently.

I think I'll "kill" another temperature sensor here and try that mod on it..


Or not. The current fix is simple enough for me.

Hijack v486 is now released, with the source code for the above fix included (but not compiled-in by default), so that I don't lose track of it here!

Cheers

Top
#307193 - 12/02/2008 11:21 Re: Fixing the temperature sensor! [Re: Robotic]
Redrum
old hand

Registered: 17/01/2003
Posts: 998
Originally Posted By: Robotic
The man is on fire!
Go, Mark!


It must be realy cold or snowy in Canada this year. smile

Top
#307196 - 12/02/2008 14:20 Spare general purpose input/output pins! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: mlord
The SMC ethernet chip has a spare TTL-output pin (as well as a spare input), which could be wired to pin-8 of the ds1821 temperature sensor chip. Then the pull-down to GND, and subsequent pull-up to Vdd could be accomplished automatically by Hijack.

Just a simple pin-lift + jumper wire. And it could be left in place permanently.

This one is still nagging at me. I'd like to make the sensor fix simple enough that just about anyone here could do it easily, with modest soldering skills. It's not bad right now, but does require the special Hijack load and a somewhat timely manual switch toggle.

If we used the spare output from the ethernet chip, then just a pin lift and jumper would be needed, and the rest could be stock and automatic. But then.. anyone who can accomplish the pin lift, could probably handle the existing procedure too.

So.. about that ethernet chip..

The SMC LAN91C96 chip actually has several spare in/out pins. They're not "GPIO", in the sense that they are fixed as either inputs or outputs. But they are there, and unused.

Pins 96,97,99 are IOS0,IOS1,IOS2 --> general purpose TTL input pins, which Patrick was kind enough to factory equip with 10K pull-ups and pads for an unpopulated pin header ("PL9" pins 1-3, plus GND on pin 4).

Pin 3 is also a general purpose TTL input pin, with an internal pull-down (floats to zero on no-connect).

Pins 2,4 are general purpose TTL outputs (capable of 2mA source, or 4mA sink).

Those are all accessible through the ethernet chip's internal registers.
So.. I wonder what other good uses they might have ?

Top
#307203 - 12/02/2008 14:58 Re: Spare general purpose input/output pins! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
..and GPIO5 of the CPU chip could be made available, I think.

It is currently wired to the DSP_OUT2 pin of the DSP (through an inverter), but I don't see it actually being used anywhere in the kernel. So we could likely disconnect it and re-use it for something else if we wanted to. This is a real GPIO pin.

Top
#307256 - 15/02/2008 00:16 Re: Spare general purpose input/output pins! [Re: mlord]
altman
carpal tunnel

Registered: 19/05/1999
Posts: 3457
Loc: Palo Alto, CA
Personally if I was soldering around there I'd just jam an LM77 in there instead.I have actually no idea why we didn't just use the LM77 at the time, I think both myself and Patrick had a severe case of datasheet blindness....

smile

Hugo

Top
#307260 - 15/02/2008 01:16 Re: Spare general purpose input/output pins! [Re: altman]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Yeah, perhaps. But we know what used to make the ds1821 go bad, and fixed it ages ago, so nowadays that chip is plenty good enough there! (even though it is dog slow to access..)

Cheers

Top
#307467 - 20/02/2008 00:57 Re: Spare general purpose input/output pins! [Re: mlord]
gbeer
carpal tunnel

Registered: 17/12/2000
Posts: 2665
Loc: Manteca, California
Quote:

So.. I wonder what other good uses they might have ?


tongue in cheek... Expanded Memory
_________________________
Glenn

Top
#307896 - 04/03/2008 21:42 Re: Spare general purpose input/output pins! [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: mlord
If we used the spare output from the ethernet chip, then just a pin lift and jumper would be needed, and the rest could be stock and automatic. But then.. anyone who can accomplish the pin lift, could probably handle the existing procedure too.

So.. about that ethernet chip..

The SMC LAN91C96 chip actually has several spare in/out pins. They're not "GPIO", in the sense that they are fixed as either inputs or outputs. But they are there, and unused.

Pins 96,97,99 are IOS0,IOS1,IOS2 --> general purpose TTL input pins, which Patrick was kind enough to factory equip with 10K pull-ups and pads for an unpopulated pin header ("PL9" pins 1-3, plus GND on pin 4).

Pin 3 is also a general purpose TTL input pin, with an internal pull-down (floats to zero on no-connect).

Pins 2,4 are general purpose TTL outputs (capable of 2mA source, or 4mA sink).


I tried fiddling with this stuff today.. it worked fine for automatically repairing the temperature sensor, but..

But.. the ethernet driver performs gratuitous resets of the ethernet chip periodically, including twice at boot. And every time it does this, it messes up the ds1821 temperature sensor.

So, these ouput lines are pretty useless.

Cheers

Top
#307918 - 05/03/2008 07:13 Re: Spare general purpose input/output pins! [Re: mlord]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
Originally Posted By: mlord

But.. the ethernet driver performs gratuitous resets of the ethernet chip periodically, including twice at boot. And every time it does this, it messes up the ds1821 temperature sensor.

If only we had the source... wink
?



Or are they closer to required than gratuitous?
_________________________
LittleBlueThing Running twin 30's

Top
#307924 - 05/03/2008 12:28 Re: Spare general purpose input/output pins! [Re: LittleBlueThing]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: LittleBlueThing
Originally Posted By: mlord

But.. the ethernet driver performs gratuitous resets of the ethernet chip periodically, including twice at boot. And every time it does this, it messes up the ds1821 temperature sensor.

If only we had the source... wink

Heh.. if only we understood the source! smile

Quote:
Or are they closer to required than gratuitous?


Exactly.

Top
#307960 - 06/03/2008 03:16 Fixing your own temperature sensor [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
A couple of people have expressed interest privately in attempting this fix on their own. It's not too difficult, so here are more detailed instructions for those with soldering skills.

First, install this special version of Hijack on your player. After rebooting, you should see a new Hijack menu item, Fix Temperature Sensor, but don't use it yet.

Now disassemble your player, almost completely. Remove the front fascia, buttons, and lens, and the hard drive tray. Remove the front display completely, by undoing the four little screws (two on each side of the player), similar to the screws for the drive tray. There is no need to remove the main board, but the display has to come completely out (it's in the way).

Now locate the ds1821 chip, using the photos from earlier in this thread.. the chip is normally hidden under the display cable.

Examine the photos from earlier in this thread again, and identify pin-8 -- the one I have lifted and attached the blue wire to.

Desolder and lift pin-8 of the ds1821 chip in your player. This is the only difficult part of this repair. If you screw up, the worst that can happen is you will break the pin, and have to replace the entire chip (about $6 from digikey.com, plus S&H).

Fortunately, pin-8 is a corner pin, so access to it is much easier than for most other pins. There's no perfect way to accomplish this, but what I do is:
  • use a 650 degree fahrenheit (343 Celsius) soldering iron.
  • use a 1/32" tip (or finer).
  • apply flux to pin-8 of the chip.
  • put a tiny bead of solder on the iron tip.
  • apply the iron to the pad on the board for pin-8.
  • grab/lever pin-8 up and out with fine tweezers or an Xacto knife.
  • do not take too long here, or you may overheat the board and ruin the pad permanently.
  • remove soldering iron, and use tweezers to gently straighten the pin and bend it up to at least horizontal.

Whew.. that's the tough bit done. Now get a DPST (or DPDT) switch of any kind, and a pair of alligator clip jumper wires.

Solder a very slender 6"/15cm (or longer) wire onto the center contact of the switch, and lightly solder the other end of the wire to pin-8 of the chip. This temporary joint doesn't need to be strong, but the wire does have to make some contact with the pin. If you have very small test clips, use those instead of soldering.

Connect alligator clips between one side contact of the switch and the case of the empeg. Just like the green clips in my earlier photo. Easy.

Locate the pair of blue jumpers near the back/center of the empeg mainboard. Remove (either) one of those jumpers to expose the two pins under it. These pins are at +5V when the empeg is powered. Verify this with a volt meter if you are at all uncertain.

Use a second set of alligator clips to connect the other side of the switch to those +5V pins on the empeg mainboard (see the yellow connections I used in the photo).

The resistor I used (in photo above) is probably not necessary, but if you want, you can add one: it goes between the +5V and center contacts of the switch. Anything from 1K to 10K is fine. This keeps pin-8 from floating randomly for a brief instant when the switch position is being changed.

Now set the switch to the +5V position, and reconnect the empeg display to the mainboard. Be *very* careful that the display connector is properly aligned and the right way around, or you'll blow some SMT fuses and maybe other stuff!!

Power on the empeg, no hard drives are needed.

Now move the switch to the grounded position.

Push and hold the knob until the Hijack menu appears.

Select Fix Temperature Sensor from the menu. It will then prompt you to move the switch to the +5V position. Do so, and then give the front-panel knob a gentle twist to the right.

The Hijack High Temperature Warning screen should then appear. Wait 5 seconds or so, and then verify that the temperature reading (the "Currently" line) shows a realistic value near room temperature, plus or minus 10 degrees. If not, then move the switch back to Ground, and repeat the Fix Temperature Sensor procedure again until it works.

Once you see valid temperature readings, power off the empeg, remove all of your jumpers/wires, and prepare to resolder pin-8 of the chip:
  • Reinstall the blue +5V jumper you removed earlier!
  • Apply more flux to pin-8 and the pad to which it will be resoldered.
  • Push the pin-8 down onto the pad.
  • Apply the soldering iron tip to the pin, and push it onto the pad firmly but not abusively. It should stick and stay.
  • Remove the soldering iron from the pin.

Use a magnifier to inspect the chip, and see if solder has bridged onto the adjacent pin. Hopefully not. If it has, then apply more flux, and use some fine copper de-soldering braid (with the soldering iron) to remove the excess solder -- this works extremely well when done gently.

Check again for a bridged solder joint. Use an ohm-meter if possible, to ensure that pins 7 and 8 are not connected. Actually, this doesn't really matter, since pin-7 is a "no connect" pin, so don't fuss over it too much if things are being stubborn.

Clean the flux from around/on the chip using a Q-tip swab and some alcohol (100 proof or better; consume any excess! smile ).

Reattach the display board and verify that everything still works. Then re-install the latest version of Hijack, replacing the special one you installed for this procedure.

Cheers


Attachments
1.jpg

Description: The new menu item from the special copy of Hijack. NOT for normal use.

2.jpg

Description: The next step

3.jpg

Description: It works!




Edited by mlord (06/03/2008 18:32)

Top
#307983 - 06/03/2008 18:06 Re: Fixing your own temperature sensor [Re: mlord]
woops
journeyman

Registered: 24/04/2002
Posts: 78
mlord,

Once again you've really done an A+++ job! Thank you so very much.

Your procedure was written perfectly. I did have to try a few times, but when i started the switch at 5+ instead of ground, shut it off, then did the right procdure, the sensor was awoken!

Thanks mlord.

Top
#307985 - 06/03/2008 18:15 Re: Fixing your own temperature sensor [Re: woops]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: woops
mlord,

Once again you've really done an A+++ job! Thank you so very much.

Your procedure was written perfectly. I did have to try a few times, but when i started the switch at 5+ instead of ground, shut it off, then did the right procdure, the sensor was awoken!


Okay, just in case that sequence also works better for others, I've updated the lengthy-sounding procedure above to match.

Cheers

Top
#308013 - 07/03/2008 12:14 Re: Fixing your own temperature sensor [Re: mlord]
woops
journeyman

Registered: 24/04/2002
Posts: 78
mlord,

please mention:

once you solder the small wire to the #8 leg of the chip and you are ready to reattach the display cable note:

the display cable goes right over the wire you just soldered to #8 and may push this wire down, THEREFORE, don't cut a large lead for this end and put some cardboard under the solder joint so there is no chance this joint/wire will touch other components. just be careful about this issue.

Top
#308015 - 07/03/2008 12:29 Re: Fixing your own temperature sensor [Re: woops]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: woops
mlord,

please mention:

once you solder the small wire to the #8 leg of the chip and you are ready to reattach the display cable note:

the display cable goes right over the wire you just soldered to #8 and may push this wire down, THEREFORE, don't cut a large lead for this end and put some cardboard under the solder joint so there is no chance this joint/wire will touch other components. just be careful about this issue.


I used a small enough wire here that this wasn't a problem, though it could be if pin-8 were bent too high up.

Note that the adjacent pin-7 is a no connect pin, though, so it doesn't harm anything if it accidently contacts the modified pin-8.

Thanks for helping me help others here!

Cheers

Top
#308016 - 07/03/2008 13:25 Re: Fixing your own temperature sensor [Re: mlord]
Waterman981
old hand

Registered: 14/02/2002
Posts: 804
Loc: Salt Lake City, UT
Well after lifting pin 8 I broke it. I think my small alligator clips I was using moved it. So just to confirm, this is the correct part right? So with replacing the sensor I don't need to do the fix procedure again correct? It should "just work."
_________________________
-Michael

#040103696 on a shelf
Mk2a - 90 GB - Red - Illuminated buttons

Top
#308018 - 07/03/2008 13:51 Re: Fixing your own temperature sensor [Re: Waterman981]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: Waterman981
Well after lifting pin 8 I broke it. I think my small alligator clips I was using moved it. So just to confirm, this is the correct part right? So with replacing the sensor I don't need to do the fix procedure again correct? It should "just work."


Yes, and yes.

Cheers

Top
#308226 - 14/03/2008 21:33 Re: Fixing your own temperature sensor [Re: mlord]
woops
journeyman

Registered: 24/04/2002
Posts: 78
Mark,

After the "journey to the deep abyss" and back - ie. diagnosing ethernet problems which involved reformatting both drives, trying v3, v2 individually and in combinations, I have discovered the temperature sensor has gone dead again.

Is it your opinion that the leg of the chip can be bent up again without breaking? If it breaks, how bad off would I be? Can i just leave it broken?

I definitely want to fix it again. What could have caused it to go dead again?

Thanks

Top
#308227 - 14/03/2008 21:47 Re: Fixing your own temperature sensor [Re: woops]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
Originally Posted By: woops
If it breaks, how bad off would I be? Can i just leave it broken?

The chip would be dead. Pin 8 is Vdd.

Originally Posted By: woops
I definitely want to fix it again. What could have caused it to go dead again?

The problem is only fixed in Mark's kernel I believe. If you used the stock ones then there is a chance that it would screw it up again.

Top
#308233 - 15/03/2008 00:40 Re: Fixing your own temperature sensor [Re: woops]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: woops
Mark,

After the "journey to the deep abyss" and back - ie. diagnosing ethernet problems which involved reformatting both drives, trying v3, v2 individually and in combinations, I have discovered the temperature sensor has gone dead again.

Yeah, the non-Hijack kernels can do that -- Hijack has the necessary fixes (we think) to prevent it.

Quote:

Is it your opinion that the leg of the chip can be bent up again without breaking? If it breaks, how bad off would I be? Can i just leave it broken?

Just be nice to it, and not bend it more than needed. I've done it four times now to beater here, as part of my experiments, and the pin is still alive. If it breaks though, no big deal -- the chip would simply be dead and not affect anything else.[/quote]

If you (or anyone else) sees one go dead while running a modern Hijack kernel, we want to know about it.

EDIT: Actually, I suppose it's possible in theory to maybe corrupt the chip just from reboot accidents, if done while software is in the midst of talking to the chip. Very unlikely, but remotely possible. Power-offs shouldn't be able to do it, but reboots.. maybe. The power pin of that chip really should have been wired to the !RESET signal instead of to Vcc3.

Cheers


Edited by mlord (15/03/2008 00:47)

Top
#308234 - 15/03/2008 00:46 Re: Fixing your own temperature sensor [Re: mlord]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Originally Posted By: mlord
Just be nice to it, and not bend it more than needed.

You can move the odds more in your favour by only bending the pin from the midpoint, rather than from where it disappears into the chip.. That way, if it ever does snap off, you've still got half a pin left to work with. And that top half doesn't need to be bent because it's already lifted! smile

Cheers

Top
#308247 - 15/03/2008 11:47 Re: Fixing your own temperature sensor [Re: mlord]
woops
journeyman

Registered: 24/04/2002
Posts: 78
Mark,

Is it possible to go ahead and wire it to the reset signal?

Top
Page 1 of 2 1 2 >