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.

 

Stellaris LM4F120 LaunchPad Thoughts

I just received my Stellaris LaunchPad in the mail! It shipped on the 25th and arrived at my house today on the 27th. I put in the order within a few minutes of getting TI’s email announcing the pre-order. Looking at TI’s store they are now estimating 2-8 weeks for orders placed before prior to the 25th. I remember it taking them a while to get the MSP430 launchpad shipped when that was first announced, and I would say the LM4F120 is a much better deal for $5. It just goes to show the LaunchPad’s are being shipping.

The demo application on the board shows off the basic hardware on the board. The RGB LED is fades between different colors when left alone and the buttons cycle between the different colors. Holding both buttons down enters hibernation mode.

Not shown in the video the demo application also features serial control over the color, light intensity, and hibernation. The serial drivers do need to be installed for this to work, although I had no issues getting everything up and running on Windows 7 per TI’s included instructions.

Running the demo application draws around 22mA, switching to hibernation reduces this to an average of 850µA. In both cases the LEDs draw the most current. I figured because they included the hibernation feature I might as well test it.

The biggest draw to getting the Stellaris LaunchPad was that it is a Cortex-M4 ARM core which is very capable when it comes to doing DSP. That coupled with the dual on-chip 1MSPS Analog to Digital Converter means that some very interesting mixed signal projects should be possible with this dev board. An interesting feature of the LM4F120’s ADCs are that they can be phase shifted relative to each other (around 20-30°), and they can also be shifted by 180° to get an effective 2MSPS sampling rate. Considering most entry-level MCU’s have ADCs with a 200kSPS or lower sample rate this is fantastic.

Unlike the MSP430 LaunchPad the programmer cannot be separated from the without cutting through and destroying the programming section. The headers are also pre-soldered instead of being included in the box.

An interesting thing to note is that the programmer is exactly the same LM4F120 microcontroller which handles all of the USB serial communications and debugging interface.

I do wish that the board had a more interesting peripheral than an RGB LED, but for 5$ I can’t complain. The LM4F120 MCU has plenty of on-chip features and I am excited to see what people come up with using this development board.