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 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!

Friday, August 12, 2011

A Little Old School Display Hacking Going On!

I promise this will be my last Temperature Sensor & RTC Arduino mod post, but I love how Vacuum Fluorescent Displays (VFD) look and I had one just sitting at the bottom of my junk box waiting to get new life breathed into it.

This Noritake GU112x16G-7000 is a 16x2 Serial (RS232) Display and it just needed a little mod to get it working with my existing Arduino Uno setup. This VFD display expects a serial RS232 input, so I just added a single npn BJT inverter to the back of the display and I was able to get this working with just the Arduino's TX pin.
One thing to note is this VFD display is a bit power hungry and gives off a fair amount of heat, so mounting a DS1621 temperature senor undernieth it, probably wasn't the smartest thing I should have done.

Anyway, just a bit of Old School Display hacking... I need to get my Nixie Tube display all lit up next :P

Here is a link to my code.

Thursday, August 11, 2011

Paying my OSHW Membership Dues

The Open-Source-Hardware concept, even though it isn't a recent idea (people have been publishing "open" hardware in electronics magazines for decades), has been "repackaged" and marketed to the Hacker/Maker community just within the past few years. The Atmel AVR based Arduino and its add-on Shields are one of the largest OSHW projects existing today.

When I first heard about the Arduino Uno platform and Software IDE I loved the concept and I did what I normally do.... I jumped on ebay and looked for the cheapest Arduino Uno I could find and ordered it. When I got the Arduino Uno board I noticed right away that this wasn't one of the "Made in Italy" Arduino's from the original developers.... I had just purchased a clone.

This is one of the significant draw backs to the Creative Commons OSHW licensing... it is perfectly legal for a company to take the OSHW gerbers and AVL and make their own Arduino and sell it at a lower margin. At first it didn't really bother me that much, but as I started using example sketches and watching "free" tutorials on the Arduino I realized that I was leaching "free" resources from OSHW developers without financially supporting them by purchasing my Arduino from them. I am sure the Chinese Manufacturer that I bought my Arduino from wasn't adding to the community by posting tutorials or example sketches.

Anyway enough ranting..... I have finally paid my OSHW membership dues and purchased a new Arduino Uno from Adafruit along with a Wave Shield that I'll be playing around with in the up and coming weeks. It was an extra $15 more than the clone, but it was money well spent in my opinion.

Below is a great video from Dave Jones explaining the whole open hardware movement.

Saturday, August 6, 2011

Arduino Uno Clock and Temperature Monitor with LCD

The past month or so I've been playing with the Maxim DS1307 Real-Time-Clock and DS1621 Temperature Sensor ICs. I hooked them up to an Arduino Uno board with a Parallax Serial 16x2 Character LCD. I got both ICs working in separate sketches that I've blogged about previously, but I wanted one combined program.

Below is the result:

I cleaned up my code/sketch and you can download it here.

The hardware implementation is really simple since both ICs communicate to the Arduino via the 2-wire I2C port; only 5 connections are needed to the Arduino (+5V, GND, SCL [A5], SDA [A4], and TX [1])

I have the orange wire & LED hooked to the SDA line, just for debug.... I can see the light flicker when communication is happening to the ICs. The CR2032 battery & holder is actually soldered to the underside of the protoboard and fits nicely in between the boards when stacked.
I am pretty happy with how this project turned out; it was a great introduction to the Arduino for me.

Friday, August 5, 2011

Who is that guy?

EEweb is scrapping the bottom of the barrel for this week's featured engineer.

Seriously, it is an honor and a privilege to be recognized for something I love doing; thanks EEweb.