Monday, September 12, 2011

Simpson Multimeter Clock

Lauro posted a link to this awesome project on the blog and it is so cool I needed to share it. It is a Simpson Multimeter Based Clock.

Overview:

The Multimeter Clock consists of three multimeters, the first meter displays hours, the second displays minutes and the last displays seconds. A 16F628A PIC microcontroller keeps track of time and outputs a calculated current to each meter to display the current time.


Here is a link to the Project Page.
 This is a very cool project and a neat twist on making a clock!

Sunday, September 11, 2011

Fun with Filters!

A couple weeks ago I built a simple 1KHz 6Vpp Sine Wave Generator from a handful of opamps and passives I had laying around. You can check out that project here.

I thought it would be fun to quantify just how good of a Sine Wave this circuit was; after all it was just a wave-shaped triangle wave, so I wasn't expecting  too much. But if I quantify how good of a sine wave it is I can tweak the circuit to try and make if better.

Since my Sine Wave is at 1KHz I thought I'd measure its quality using an audio Total Harmonic Distortion (THD) technique.
Essentially, a perfect sine wave should only have a single frequency component at the fundamental frequency, but real sine waves have harmonic distortion. This harmonic distortion is the part of the sine wave that we really don't want; a poor sine wave has lots of harmonic content and a good sine wave has little to no harmonic content. So if we measure the amplitude of the harmonics we can quantify how good our sine wave is!

What we need to do is design a Notch filter at 1KHz. This will remove the fundamental frequency and leave the Harmonic content. Below is an LTSPICE schematic of Sine Wave Generator and Notch Filter.
The next picture is the frequency response of the notch filter; you can see it is centered at 1KHz.
When the 1KHz signal is passed through the 1KHz centered notch filter the fundemental frequency is removed and what is left is the Harmonic content. You can see the 3rd harmonic at ~3KHz is what is left.
(The blue is the signal coming out of the Filter)
Below is the FFT of the input Sine Wave and the Output of the Notch Filter; you can see the fundamental frequency amplitude is lower with minimal effect on the harmonic content.

Now that I had a base line simulation working I grabbed my soldering iron and built up the 1KHz Notch Filter dead bug style in an Altoids box. I wish I had a Network Analyzer or at minimum a Spectrum Analyzer with a tracking output to measure my filters frequency response, but all I had was a function generator and a scope.  I swept the function generator's output frequency from 10Hz to 100KHz and could see that my filter worked well at filtering out 1KHz signals.


(Channel A = Input Signal, Channel B = Output of Notch Filter)
The output of the Sine Wave generator measured 2.25Vrms and the output of the Notch filter was 139mVrms. This gives me a THD of (139mV/2.25V) = 6%

I wanted a second opinion, so I grabbed a HP 331A Distortion Analyzer and set it up. I hadn't used one of these since I interned at an RF Radio Manufacturer back in 2002. I used it to measure receiver sensitivity performance.

I had to dig up a manual to remember how to setup the HP 331A. It is a bit confusing because you have to setup the meter to 100% full scale based on your input, then adjust the frequency & balance adjustments until you get the lowest % THD reading. I monitored the Output of the 331A with a scope to see that I had fully removed the 1KHz fundamental and all that was left was a dirty looking 3KHz waveform (3rd harmonic).

The HP 331A measured a THD of 7.4%; pretty close to my homemade notch filter 6% reading. It makes sense that my filter's THD measurement would be lower, because it probably attenuated the 3rd harmonic a bit more than the much more precise HP 331A's notch filter would do.

Below is a scope screen shot of the output of my notch filter (top) and the output of the HP 331A (bottom).
Both filters did a nice job removing the fundamental and the 3rd harmonic is defiantly the most dominate remaining frequency. This was a fun project and cool to see that my Notch Filter implementation's THD readings weren't that far off from a HP331A's measurements.

Update: Sept. 13th, 2011
 
I thought I would do one last test to see the performance of the Notch Filter on a much cleaner sine wave. I used a BK Precision 3011B to generate an identical (but much cleaner) 1KHz 6Vp-p Sine Wave and used the Notch Filter to measure its THD.
The center frequency of my notch filter looks to be ~1074Hz; that is where I got the best filter performance.
(Top = Input Sine Wave, Bottom = Output of Notch Filter)
The THD measured was (19.5mVrms / 2.25Vrms) = 0.86%, a much cleaner Sine Wave than my home brewed one at 6%.


Here are Links to my LTSPICE files: Sine_&_Filter, Filter, and Filter_ac.

Link to HP 331A Manual.

References:
Distortion Analyzer by Rod Elliott
HP Journal: Distortion Analyzer
Texas Instruments Notch Filter AppNote

Wednesday, September 7, 2011

Getting my Nerd On!

Check out my cool (EEVblog) 555 T-Shirt my wife got me for my Birthday! She is a keeper!

If I changed the 5K resistors to 560K and put TS1001 next to the comparators, I'd have my contest entry all documented :)

Monday, September 5, 2011

Mounting my Arduino Clock

Alright I lied about not posting about my Arduino Uno based Clock/Temperature Sensor again, but this post is more about the enclosure than the guts. If you are interested in the guts check out my older post: Arduino-Uno-Clock-and-Temperature

If you haven't figured it out by now, I am addicted to mounting electronics in Altoids boxes. They are handy shielded enclosures that are the perfect size for most of my projects and are easy to modify with some sheet metal shears and a few drill bits. Also using these cases feeds my other addiction...... eating mints!


I made a small Dead Bug style PCB for the DS1307 & DS1621 that I soldered to the case; an easy way to keep it from moving around. I thought about putting a CR2032 battery holder in the box, but the battery backup should last greater than 5 years.... so I just soldered a couple wires to it and hot glued it to the lid. In 5 years I'll peel it off and solder up another one.

Now I have a very handy desk clock all mounted up and minty fresh!

How the Transistor Got its Name

I saw this post today from adafruit and it was so cool I needed to republish it.
(Click on the above image to zoom in)

They voted on the name! Pretty cool, if you were on the wining side of the vote..... just to say you got to name the Transistor!

Friday, September 2, 2011

7400 Logic Series Design Contest

I just found this 7400 series Design Contest.

http://dangerousprototypes.com/open-7400-logic-competition/

Entries must be received by October 21, 2011, 6AM GMT. Winners will be announced on November 1, 2011.

Judging criteria and categories
Entries will be judged for:
  • Originality. A smart new design that inspires
  • Documentation. Schematics, theory, pictures and/or video
  • (Mis)use of 7400 logic. Show us what 7400 logic was (never) meant to do
  • Technical prowess
  • Build quality
  • Imagination and creativity

Looks like a lot of fun! Get your solding irons heated up! Below is a link to an ebay sellar that is selling 74HC00 Series Logic kits; a great place to get a bunch of parts for cheap.
http://www.ebay.com/itm/74HC00-02-04-08-32-Assorted-Logic-IC-Kit-fcbusa-/360141624609?pt=LH_DefaultDomain_0&hash=item53da1d1521
Update: Sept. 7, 2011: Just got my 74HC parts, let the project building begin!

Wednesday, August 31, 2011

Check Engine Light, the Automobile Industries Blue Screen of Death!

Recently I had to replace the transmission in my 2002 Chevy Impala; it has 170,000 miles on it, but I wanted to keep it running for at least another couple years. Within 2 days of the having the new transmission..... which I had to sell a kidney to pay for, the Check Engine light came on...... Frustrating!
This whole experience made me think of my Masters project I did at University almost 10 years ago. I took an Altera FPGA development board loaded with a Nios 16-bit softcore CPU and had that communicate to my car's On Board Diagnostics Port (OBDII) and relay engine sensor data and fault codes to an Ericsson TDMA cell phone. The cell phone would send an SMS message to the local Wireless carrier's server which would parse the data, see my header and relay that SMS message to the University's server which was running an ASP script I wrote. That ASP script then posted all the data on a secure website, so all I had to do was login to a computer (smart phones weren't around back then) and I could see my vehicles diagnostic data. This was before OnStar did anything this useful.

It was a fun project. The Nios softcore CPU was way overkill, but it was fun playing with the latest and greatest techology circa 2002.

I used an Elm323 dev. board to communicate to the OBDII port on my car using RS232 AT like commands. They still make a very similar board; Sparkfun also sells one too.

Below is a copy of my Thesis that describes the project and has all the source code listed at the end. The appendices have a lot of information on how On Board Diagnostics works in vehicles, but this information is almost ten years old now... still it is a good starting point for someone interested in learning about it.
Link to Thesis
Link to PowerPoint

Saturday, August 27, 2011

Remembering Jim Williams .... Dead Bug Style!

I just finished reading Jim's last EDN article he wrote before he past away in June.

It is a great article that describes how to design a 2KHz Sine Wave Generator with less than 3ppm distortion that could be used as a signal source for ADC benchmarking. After reading I thought, man it would be fun to build this circuit up. I just didn't have many of the precision components just lying around in my junk box, so I settled for building up a less impressive 1KHz Sine Wave Generator with a whole lot more than 3ppm distortion.

While surfing the internet I came across a project on filear.com where he built up a function generator based around a LM324N. This looked like a great starting point for my project.

I jumped in and started up LTSPICE and got a circuit simulating based around the LT1001 opamp from Linear Tech. Jim worked at Linear Tech and I had a bunch of LT1001's lying around, so it seemed like a good part to base the circuit around.


R1 & R2 set the common mode voltage at 1/2 the supply. U1 is used as a threshold comparator and generates a square wave. U2 integrates the square wave and creates a triangle wave form with a period set by C1 & R4. D1-D4 provide some non-linear wave shaping to turn the triangle wave in to a pseudo sine wave.  U3 amplifies the sine wave and U4 provides a bit of buffering/drive.

I wanted to fit the 1KHz Sine Wave Generator in an Altoids box and run it off a 9V battery, so I carved up a piece of FR-4 and started soldering up the circuit using a "Dead Bug" style that Jim Williams used often. This style of prototyping is actually pretty quick; the base PCB is gnd and the ICs are flipped upside-down and glued in place. The wiring goes really fast and I had this built up in about an hour.

This circuit won't win any awards for being a super clean Sine Wave, but it will work perfectly good for a nice audio test signal or base band signal source for an RF project.

There is something just satisfying with soldering up a circuit and seeing it do what it is suppose to do without a single line of Assembly or C code being written.... R.I.P. Jim Williams!

Monday, August 22, 2011

Great EE Business Card Idea!

This is a neat Business Card idea I found on youtube. Wouldn't this be a great way to send your resume to potential employers.... too bad the HR dept would screen you out before your card ever made it to the Engineering Manager :(  ....non-techies!

Thursday, August 18, 2011

Thanks Touchstone Semi & Future Electronics!

Pretty Cool, that my low power 555 timer was the TS1001 Coolest Op Amp’ Design Competition Winner!


I was kicking myself for not entering Chris Gammell & Jeri Ellsworth's 555 Timer Design Contest a few months ago. They had some awesome entry's..... so I had 555 timers on the brain when I heard about the Touchstone Semi TS1001 opamp design competition.


Thanks again Touchstone Semiconductor & Future Electronics for putting on the competition, and to my wife for video tapping. I owe you a night on the town and a meal at Fogo de Chao for this one!