I have to apologize for the lack of posts for the past few months. I have been collecting a good chunk of content but haven’t uploaded it. Expect more in future weeks, I have more time on weekends now to write posts!


Non-destructively testing a heart rate monitor strap.

Polar HR strap


The polar heart rate monitor straps are completely sealed. This is the easiest way to see the output on a scope while still being able to wear the strap at a desk. Of course if the number of turns was optimized the output would be better, but for something quick this worked just fine.

Micromouse 5/2012

I recently added my documentation for my Micromouse project to my Projects page. Check it out:

Micromouse 2012

More of my projects will be added to my Projects page soon, stick around!


Repair of an Agilent E3640A DC Power Supply

I recently bought a used Agilent power supply in a very sad condition. It was covered in marker, quite dirty, and apparently didn’t work. After doing a little research I found that it was a known issue for the rotary encoders in these power supplies to fail. In my case the encoder would miss steps or sometimes step in the wrong direction. Because the knob is the main method of user input (other than RS232 or HPIB), it made the power supply almost impossible to use.

After cleaning the grime off the front panel and removing the marker from the case I coerced the E3640 into running a self test which it passed without hesitation. I checked the outputs in both constant current and constant voltage with my multimeter, both of which read correctly on the power supply’s screen. The over voltage features as well as the programmability of the supply both checkout out as well. This lead me to believe that the only issue with this power supply was that the rotary encoder was on its last legs. Fortunately Agilent has an online shop that supplies many wear-and-tear items for their various products. A couple days later I had a new rotary encoder ready to be installed. Now to actually get it installed.

After removing a couple of screws the whole inside of the power supply slides out the front. Inside a large transformer takes up 1/3 of the space, and there is not much underneath it. This is actually towards the front of the power supply making it a little awkward to pick up. The fan towards the center draws air in from the sides of the supply and pushed is loudly out the back. It does have two speeds (loud-ish and louder?), but it would have been nicer to have it shut off when there was very little load.

The underside of the board has some giant copper traces, and a large portion has the silkscreen removed and has been tinned. Other than that there are a lot of passive components and a MOV soldered on near the output.

The front panel is easily separated from the main body of the power supply. After the knob is pulled off the front the dark cover needs to be removed. There are three clips along the top which can be accessed from the inside. I had to use a small screw driver and a pair of tweezers to loosen two and push it out far enough that it didn’t pop back into place when I went to unclip the third tab. After it is loose the cover tilts forward and is easily removed.

The next step is to remove the nut and washer from the rotary encoder, I used a pair of needle-nose pliers. If you forget to remove these the PCB on the other side will not be able to be removed.

Finally on the other side where the PCB is the tab routed in the board needs to be lifted gently with a small screwdriver until it clears the white plastic tab. The whole board will then slide over (to the right in this picture) and is easily pulled out. If the nut and washer aren’t removed the PCB will move a little but can’t be pushed far enough over to be removed.

Finally the board is out and the rotary encoder can be replaced! The picture above is the new encoder from Agilent.

After a little trouble the I un-soldered the encoder and was ready to begin re-assemble the whole thing. Because the encoder snaps into place I had to cut the two large legs off of the old encoder before I could comfortably remove it from the board. I made sure the holes had minimal solder before pressing the new encoder into place and soldering. I cleaned up the flux left over with a little rubbing alcohol and put everything back together.

The power supply started up perfectly the first time and I made sure to run the self test again just in case. The new encoder worked perfectly and made the supply work like new. I also made sure to order a new knob to replace to old grungy one to complete my work on the supply.

Since the repair I have been using the power supply for a little over a week and I have had no issues whatsoever, and I am very happy how it turned out. I hope my repair can help someone else out if they are having similar issues with their supply.

Update: A reader pointed out that I hadn’t included the part number for the encoder, oops! The Agilent part number is 0960-2545 and it is readily available from their online store. It is also the same encoder used in many different Agilent products. Useful!


7400 Contest Entry: i2s DAC with class D output

This is my entry for the 7400 Logic Competition. A little bit last minute, and hopefully I can get everything finished before the cutoff tonight.

I’m using a SN74HC132 hex NAND gate, a CD4094BE 8 bit shift register, two CD4585BE 4 bit comparators, a SN74HC590 8 bit counter, and a SN74HCU04 hex inverter.

The basic operation is as follows:

A 3MHz master clock signal is input from the i2s master into the 74590 counter which when divided by 256 is equal to 11,718kHz which I used for my word clock(wclk). This is also going to be the sample rate of my audio signal. I then use the wclk as a gate (utilizing the 74132 NAND chip) for the data clock (clk) to the shift register as well as to clear the counter. After the data is shifted into the 4094 shift register it is then compared against the counter which is continuously incrementing from 0 to 255. The output of the comparator is then fed into a 7404 inverter to buffer the output which drives an N-channel and P-channel MOSFET creating a half-H bridge and driving the speaker through an LC lowpass filter.

This ended up being more of a proof of concept as I ran out of time to debug everything. There are some bugs that need to be worked out, but I didn’t have any logic analyzer to debug the 8 bit bus. However, the frequency sweep shows everything working for the most part!
Thank you for taking a look!
The demo code I used on the LPC1769 is available on my GitHub repository.