Sunday, December 25, 2011

Merry Christmas 80's style!

I loved Kings Quest & Space Quest as a kid. Great old school games!

You can download updated versions of these old school games here.

Saturday, December 17, 2011

Rudolph the Red (555 Timer based LED) Nosed Reindeer

It is Sat. afternoon, mom is in Kentucky visiting family and I have the girls....... what should we do? A 555 timer based Rudolph the Red-Nosed Reindeer of course!

I grabbed some scrap double sided PCB material and cut out a cookie cutter like reindeer shape. Then I had my 4-year old daughter sand the edges and buff the surface with some steel wool.

We then soldered the 1Hz Astable 555-Timer circuit dead bug style (with a lot of Daddy supervision). My girls were pretty pumped to see the nose blink when we turned on the power supply for the first time.
I then soldered on a 9V battery clip, so the battery acts as the stand.


We had a fun afternoon without mommy.... maybe my nerdyness will rub off on them and I'll have two very pretty engineer daughters!

ITead Studio Surprise Xmas Gift

A couple weeks ago I got an email from ITead Studio saying since I signed up to follow them on Twitter they were going to send me a free Mystery Xmas gift.... pretty cool huh!

Just this past week I received a small envelope from ITead Studio. Inside was a coupon for 5% off my next order, a business card, 5 prototyping jumper wires, and a PCB showing ITead's capabilities.

I thought this was a pretty cool way to advertise. I think I'll have to give them a try with my next project pcb. Thanks ITead for the gift!

Happy Holidays - XY Scope Fun!

Last week I saw a neat post from Johngineer where he took an Arduino and a couple RC filters and made a Xmas Tree on his scope.
I thought this would be a fun project to replicate with my 2 and 4 year old daughters, but I wanted to make a small tweak and display a picture of Frosty the Snowman. My two year old discovered the old Frosty the Snowman cartoons this year and is constantly asking to "watch a frosty".

I downloaded John's Arduino sketch and took a look at it to see what I'd have to do to change the picture displayed on the scope. His code is very well laid out and the picture is defined by the number of points and the X Y coordinates stored as two arrays.

Now how do I draw a picture of a snowman and get X Y coordinates out of it? I tried GIMP and Paint, but ended up using Scilab...... yes a fancy math program to draw a snowman! The nice thing about Scilab is you can plot pictures using the same X & Y arrays needed for the Arduino sketch.

I could have gotten all fancy and used sin & cos equations to get a nice smooth circle, but a line segment circle gets the job done too, and is equally impressive to a two year old :)

Once I got the X Y coordinates figured out I cut and paste them in to John's sketch and loaded it into my ProtoStack Arduino Clone from a previous post.
Here is John's sketch with my added X1 & Y1 coordinates for the snowman pic. link


We grabbed a bread board and I let my 4 year old insert the 10K Ohm and 0.1uF caps and hook up the scope probes.
With a few tweaks to the scope's settings we got a nice picture of Frosty the Snowman.

My daughters had fun making him taller and shorter and skinny and fat all with a few button presses. Thanks John for the great idea; my girls and I had a lot of fun!

Wednesday, November 30, 2011

Happy (belated) Thanksgiving!

Thanksgiving was just last weekend and it is a neat USA holiday where we get together as a family, eat way too much and reflect on what we are thankful for. I am thankful for many things: family, friends, health.... the usual stuff, but I am also thankful for my Blogs readers. I started this Blog over a year ago and since June it has just taken off.

In June I was pumped to have a couple hundred hits on my blog a month.... I mean how many people want to read about some guy in Minnesota, USA Rant about his Electronics endeavors. I was surprised that over just a few months time it has grown to over 2,000 hits a month and keeps growing. This is a huge incentive and mental push to get me off my butt and working on fun side projects in my home lab. This is also a huge testimony to the true power of the Internet connecting people all over the world. I love and appreciate all the connections and contacts I have made all over the world through this blog.


Thank you all for your support! I have many cool project ideas for the coming year and thanks to you all I have the drive to get them moving!

Happy (belated) Thanksgiving!

Saturday, November 26, 2011

ProtoStack ATmega328 Kit Review (Arduino Clone Build)

Back in October I managed to get my 7400 Logic PLL Based Switcher in the third place category of the Dangerous Prototypes Open 7400/4000 Series Logic Contest. Dangerous Prototypes had the neat idea to let the winners pick their own prizes from the many sponsor donated kits & parts; that way everyone gets something they want. I picked out one of the 3x ProtoStack ATmega328 Developments Kits they donated. I've been messing around with my Arduino Uno for a while and was looking to expand my Atmel AVR knowledge a bit and thought building up this kit and turning it into an Arduino clone would be a fun project. I figured I'd give a little review of the kit as I went along as well.

The ProtoStack ATmega328 Development Kit came in a well packaged antistatic bag that had individual heat sealed sections for the PCB and components. I also got a free USBasp programmer which I was not expecting (Thanks ProtoStack!). I did have an Atmel JTAG ICE mk-II that I was planning on using to program the ATmegga328, but the USBasp is a bit more compact and I thought I'd use that instead.
The ProtoStack User's Guide for the ATmega328 kit is very well laid out and is easy to follow. They have put a lot of effort documenting different build configurations to easily change how the board is powered or programmed. They clearly document how to power the board with a DC Jack, USB Device, Coincell CR2032 Battery, or Terminal Block. They also show how to add board stacking connectors.
It took less than 30mins to solder up the kit. I did make a few small tweaks to my build. The kit comes with a 20MHz Xtal, but I wanted my board to be Arduino sketch compatible so I installed a 16MHz Xtal instead. I also added a ST Micro ST232CN RS232 level converter (connected to D0 [Rx] and D1 [Tx] and a DB-9 female connector. This RS232 connection allows me to use a USB-to-RS232 dongle to connect this kit to my computer and download sketches from the Arduino IDE. I love that the standard Arduino's come with the USB Device interface built in, but having a native RS232 interface on this kit helps me connect to all my legacy peripherals that still use RS232. I also connected up a Parallax 16x2 Serial LCD by hooking up the RX pin of the LCD display to the D1 [Tx] pin of the micro and hooking up 5V and GND of the display to the boards power rails.
For kicks I added one of Adafruit's cool ATmega 168/328 labels on the micro, so I don't have to grab the schematic or datasheet when doing a quick measurement or mod.
Overall I was extremely happy with how quickly the ProtoStack ATmega328 kit went together; my one complaint is that ProtoStack provides very little programming tutorial help other than pointing to several third party USBasp compatible websites/software. The struggle I had was all of these websites assumed the user had a basic understanding of programming Atmel AVR's which I didn't. All I had done before is used the Arduino IDE to program parts that already had the Arduino bootloader installed.... so that was my first step, I needed to use the USBasp to program in the Arduino bootloader then I should be able to use the RS232 interface to load sketches onto this board.

The first thing I did was download Atmel's AVR Studio for Windows. I got that installed and was surprised to find that even though the USBasp programmer had a windows driver it was not compatible with AVR Studio.... fail. So I grabbed my mk-II programmer I had gotten from a friend and was surprised to find that I could not get that to work either..... double fail. It turned out that the mk-II programmers USB Device interface was broken and it worked fine if I used its RS232 connection instead. This worked, but I wanted to get the USBasp programmer working, so I downloaded a few other free Windows AVR programs.

I downloaded  WinAVR which is compatible with the USBasp, but it kept crashing and locking up on my Vista laptop. So I downloaded eXtremeBurner-AVR which ran fine, but it didn't have the ATmega328 in it's list of parts it was compatible with. At this point I gave up on finding a Windows compatible AVR program that worked with the USBasp and rebooted my laptop and started up my Ubuntu 11.04 Linux distribution.

I loaded AVRdude and started searching for tutorials on how to load the Arduino bootloader into blank parts with AVRdude. This wasn't too hard to find; Adafruit's LadyAda and Sparkfun all had well written tutorials to walk me through the process.

First thing I did was look in my Arduino IDE directory for the \arduino-0022\hardware\arduino\boards.txt file. This text file told me that for an Arduino Uno with an ATmega328 I needed to use the \arduino-0022\hardware\arduino\bootloaders\optiboot\optiboot_atmega328.hex bootloader file with the low fuses set to 0xFF, high fuses set to 0xDE, extended fuses set to 0x05, and the lock bits set to 0x0F. Cool, now I had all the info I needed to program the Arduino bootload into my board.

Next I needed to figure out how to use the USBasp with AVRdude. After plugging the USBasp into my laptops USB port I struggled a bit to get AVRdude to recognize that the USBasp was plugged in.

avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc 

After Google searching for clues as to why I couldn't get it to work I found many posts stating that the Linux permissions for the USBasp required AVRdude be run by the super-user (su) or root. I tried that and still wasn't having any luck. Using the lsusb command I could see that the USBasp programmer was being recognized but it looked like there was a PID & VID ID conflict error with libusb.

ID 16c0:05dc VOTI shared ID for use with libusb 

After trying to read the AVR forums for several hours to try and find a solution I remembered that some of my USB flash drives wouldn't work with Ubuntu when plugged directly into my laptop's USB ports, but worked fine when plugged into a 4-1 USB hub that was plugged into my laptop. So I tried plugging the USBasp into my 4-1 USB hub and once I got the permissions setup right it worked great!!!!! (Yeah now I was cooking!)

I loaded up the command shell and moved to the folder that had the optiboot_atmega328.hex file in it and typed in the following command into AVRdude:

avrdude -b 19200 -c usbasp -p m328p -F -v -e -U flash:w:optiboot_atmega328.hex -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m

  • "avrdude" runs the program
  • "-b 19200" is the baud rate avrdude sends the data to the programmer
  • "-p m328p -F" sets the device to ATmega328p... the -F kills the warning i kept getting because I had a ATmega328 - no "F", but AVRdude doesn't have a non-F part in it's list of supported devices.
  • "-v -e" erase and verify the Flash of the part
  • "-U flash:w:optiboot_atmega328.hex" is the file we want to load into the device
  • "-U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m -U lock:w:0x0F:m" sets all the fuse and lock bits. These bits configure the devices boot, xtal and configuration settings
Below is the output of AVRdude as the part is being programmed.

 A complete text file of the output is available here for download.

Now that I had the Arduino Uno bootloader loaded into the micro I loaded up the Arduino IDE and wrote a small sketch to display a message on the Parallax Serial LCD.
The one quirk with this Arduino clone implementation is I have to press and release the reset button at just the right time when downloading a sketch. As soon as the "Binary sketchsize......" message shows up I quickly press and release the reset button and 8 out of 10 times I can successfully download the sketch into my board. It is a timing thing, the Ardunio IDE only waits so long to receive confirmation from the bootloader running on the micro before it errors out on the IDE. If it fails to download it is no big deal I just try again and press and release the reset button. I have gotten pretty good and timing it just right.


Overall I am pretty happy with the ProtoStack ATmega328 Development Kit and would highly recommend anyone getting one. I am excited to build up a few new projects with this board; having the extra prototyping space without having to stack a proto shield is a huge plus. Thanks ProtoStack for sponsoring the 7400 contest and getting me this kit and USBasp programmer!
Also Thank You Dangerous Prototypes for putting on the contest! It was a lot of fun seeing all the cool project ideas.

Monday, November 21, 2011

An Analog Life - Remembering Jim Williams

I recently came across this video from the Computer History Museum describing Jim Williams - An Analog Life exhibit. YouTube Video Link


The video is a bit long (1hr 18mins), but worth watching. I clipped out 4 mins of the video and have that below. This is part of the actual video playing at the exhibit.


I also just got copies of two books Jim wrote. I am looking forward to reading these on my 30 hour+ plane ride to China and back in Dec.


My review of these books to come......

Friday, November 18, 2011

Altoids Fume Extractor

Lately I've been soldering quite a bit at home and thought a fan based fume extractor would be a good investment. I came across this MAKE video recently that describes how to build one that fits in an Altoids box.

I dug around in my junk box and found a 24VDC fan. This fan was a bit too deep to fit in a single Altoids box and still have room for a carbon filter, so I had the idea to solder two Altoids boxes together. One would house a 9V battery, the Switch and the Fan. The other box would house 1/2 a Pet Co. Aquarium Carbon Filter and one more 9V battery.

Below is what I came up with:




The two 9V batteries in series get me 18V which is a bit low for the 24V fan, but it still works well and uses parts I just had lying around. The two boxes soldered together solution worked out well because it stands up better and won't tip over as easily as the single Altoids box version would.

Now I can solder away all day and not get a sore throat from all the flux fumes!

Wednesday, November 2, 2011

Open 7400 Logic Contest Winners!

The winners of Dangerous Prototypes Open 7400/4000 Logic Series Design Contest were announced today. Check out the Link.

Congrats to all the winners! My project even managed a spot in the Third place group, very cool!

Thanks Dangerous Prototypes & Sponsors and thanks to all the Judges!

Monday, October 31, 2011

Halloween Hacks!!!

I haven't had much time this month to work on my fun pending side projects: repairing and calibrating my Analogic AN3100 Voltage Standard, Repairing my Tektronix Type 491 Spectrum Analyzer, and cleaning up my Arduino based Function Generator code. My day job is getting in the way..... but my day job pays the bills so that is ok!

Below are some really cool Halloween Hacks I found on YouTube.


Happy Halloween!

Friday, October 21, 2011

Cool Design Idea of the Week - Power Selection Switch!

I was flipping through the latest issue of Electronic Design while flying back from Austin, TX and I came across a not obvious neat idea. On one of Parallax's Basic Stamp boards they intentionally placed the DC Power Jack in a location that would be blocked if a 9V Battery was installed.... thus preventing the 9V battery from getting reverse current if the DC Power Jack was plugged in as well. Brilliant!
It must be the EE in me but I would always think of adding a diode "OR", some FET, or a terribly complex circuit that disconnects power to the 9V battery when the DC Jack is plugged in. This approach, though not practical in all cases, is elegant and wins my Cool Design Idea of the Week award!!!

Thursday, October 20, 2011

7400 Series Logic PLL Based Switch-Mode PSU

While building up a simple Seven-Segment LED Up-Counter Circuit a few weeks ago as a brain storming exercise, I thought a cool 7400 Series project would be to build up a "Buck" Switch-Mode Controller out of Logic Gates.

I had built up a few Analog & Digital PLL's before and I thought that might make a neat starting point for a switch-mode controller. Essentially a Digital PLL requires a Reference Frequency (Square Wave), a Digital Voltage-Controlled Oscillator, a Phase Detector (XOR Gate) and a Low Pass Filter. The Reference Frequency and the VCO outputs are the inputs to the XOR Gate (Phase Detector). The output of the XOR Gate is then feed into the Low Pass Filter which creates a DC error voltage. This error voltage is then feed into the VCO input; creating a feedback connection. As this circuit runs the error voltage will settle and the output of the VCO will become the same frequency as the Reference Frequency. What if the Low Pass filter was a typical Buck - Transistor, Diode, Inducator, and Output Cap. and the error voltage was the Output of the Buck Regulator? ..... that was my starting point anyway.

Below is what I came up with:


I built up a 90KHz reference Ring Oscillator using two 74HC04's. Then I built up a XOR Gate using 5 NAND 74HC00 gates. The VCO is based off the same 90KHz reference Ring Oscillator, but I added a capacitivly coupled MV2109 Varactor to vary the frequency when a DC voltage was applied through the 100K pot adjustment. The 5.1V zener diode was a vain attempt to prevent the Vout overshoot from affecting the VCO's output.... I'll explain this more later.

I used a TIP106 PNP transistor, a B321 Shottkey Diode, a 38uH 3A Inductor, and 3x47uF electrolytic caps as the "Buck" (filter) circuit. Since my XOR gate output was referenced to ground and the PNP transistor needed a Vinput based reference I used a 2N3904 NPN to couple the XOR output to the PNP.

Results:
I was able to get the basic converting circuit working. I used 16VDC as my input voltage and then adjusted the 100K pot to bring the VCO frequency closer to the Reference Frequency of 90KHz and I got 5VDC on the output.
 Below are the waveforms:

Issues:
With the feedback disconnected  (Vout to the input of the VCO) I was able to get the circuit to convert a 16VDC input voltage down to 5V reliably. With the feedback disconnected though any change on the input voltage will be seen on the output voltage and any load fluctuations will effect the output voltage as well. I wasn't able to get the VCO's output to stay stable enough when connected to Vout for regulation to work. The XOR Gate is a phase detector not a frequency compare; this means the output of the XOR gate when the VCO is 88KHz is pretty much the same as 92KHz. This is the overshoot problem I was hoping my Zener diode would take care of, but my VCO wasn't stable enough to not have the frequency overshoot and dialing in 5V was nearly impossible with the feedback hooked up.

Someone wise told me that "Experience is what you get when you didn't get what you wanted"... I got a lot of experience on this project. The XOR Phase Detector is probably not the right component to be used in this circuit since the phase polarity can not be distinguished and thus overshoot and run away is a problem when the feedback is hooked up. I ran out of time before the 7400 Series Logic Contest deadline, but I am still entering the "non-regulating converter" since I was able to get the 16VDC to convert down to 5VDC reliably (as long as the input voltage and load are constant).

Maybe I'll have an epiphany or  kind reader will give me some hints as to how to prevent the XOR Gate Output from switching when the frequency of the VCO is greater than 90KHz in the coming weeks.

Tuesday, October 11, 2011

EEweb Pulse Magazine Cover... Who is that guy!

Very Cool, I just had the neat opportunity to be on this month's EEweb's Pulse Magazine Cover. In the article I got the opportunity to discuss some generality's of my day job as a Design Engineer for a Weigh Scale company.... sorry no specifics about my latest and greatest project, our competitors probably read this magazine too. I also got to talk about some of my side projects and my Touchstone Semi. opamp design contest entry. Check it out!
Thanks EEweb for the opportunity!

Wednesday, October 5, 2011

The Benefits of Ancient Logic

I was catching up on reading my trade rag magazines from when I was in China the past week and a half and I came across this article on the benefits of 4000 Series CMOS Logic in today's designs. I thought it was ironic timing considering Dangerous Prototypes 7400 Series Logic Design Contest deadline is coming up..... I need to work on my entry. (I got all the pieces now I just have to build it and get it to work... the easy part!)

Enjoy!
The Benefits of Ancient Logic (Analog Devices: James Bryant)

Back from under China's Iron Curtain

Sorry, it has been a few weeks since my last post. I had the neat opportunity to travel to Shanghai & Suzhou China for work and China's government must not like Blogspot, YouTube, LinkedIn, Twitter, or Facebook because these websites were all blocked. I could have used a VPN to get to those sites, but I thought it would be more fun to take in the local scenery vs sit at my computer.

Shanghai is a typical busy city with a ton of people. Some parts were reminiscent of New York's Times Square with huge displays and flashing lights. The water front in Shanghai was just beautiful at night.
Suzhou is the Garden City full of neatly trimmed trees and bushes and many canals. Suzhou is where my companies factory is. It is also home to Fairchild Semiconductor, Renesas, Panasonic, Samsung, Flextronix and many more.... it is like a Chinese Silicon Valley.
I even got to try a lot of the local food..... Chicken feet anyone!

Friday, September 23, 2011

A Year in the Making!

Today is the one year anniversary of the start of my little experiment.... the "Rants from the Embedded Hardware Guy" blog.
It has been so much fun building up projects and taking pictures to meet my "imaginary" personal deadlines, so I can share them on this blog. I would encourage anyone who likes too, or wants too, tinker at home to start a Blog and post your projects. Creating an account on BlogSpot and posting videos on YouTube is free, it just takes a little bit of time.

This Blog has reignited my "Hacker/Maker" drive and has connected me with Engineers all over the world. I have appreciated all the feedback I have received about my posts and love being a part of the Open Hardware sharing community.


Like most Bloggers I am obsessed with my blogs stats (page views, traffic sources, and audience), but one of the neat side benefits is getting to see what web browsers and operating systems are being used to view the blog:

 (Microsoft is in control, but I thought it was interesting that Linux and Mac are both about the same usage in the Engineering community.)


Thank you for a great year and I hope for many more to come!

Thursday, September 22, 2011

Free Beer..... Today at Arrowfest!

I just got back from my yearly trek up to Minneapolis, MN USA to attend Arrowfest. For those of you not familiar with Arrowfest, Arrow is one of the top 3 Electronic Component Distributors in the world and once a year they put on a large event called Arrowfest. The event consists of 24 different technical seminars during the day (you pick 4 you are interested in) and a tent exhibition with vendor booths, free swag giveaways, drawings for prizes, free food, and yes free beer (And a handy Arrowfest Glass Mug to put it in.)

My wife gives me a bit a grief for continuing to fill our kitchen cabinets with Arrowfest mugs (I think I am up to 10 or 11 now). They make great beer & coffee mugs though!
I am a pretty firm believer in you get what you pay for when it comes to technical training seminars. If you attend a 2-day seminar and it costs you $1,500 to attend it is probably going to be a lot more in depth and worth wild than a free 1.5 hour seminar.... that being said, I do enjoy the Arrowfest technical seminars, and appreciate that they hand out the slides (on a CD) so I can check out the other 20 classes that I had to miss.

The Exhibition Tent is worth wild as well; there were booths from more than 85 different electronic component manufacturers and sales representatives all showing off there latest and greatest products. The big guys Texas Instruments, National Semiconductor (aka Texas Instruments), Linear Tech, Analog Devices, Altera, Freescale, Atmel were there along with many other manufactures. They were also handing out a ton of SWAG!

My Daughters love it when I go to these things, because it is like Christmas when I get home. My favorite swag had to be the Analog Devices Tape Measure, the Atmel pocket knife, and the Kemet Vertical Phone holder (that blue and white thing on the right). I also collected 3 or 4 aluminum tins of mints.... more project hacks coming up I guess :)

I don't make it up to too many training seminars  nowadays, but I always try and make it up to Arrowfest. It is great getting all the reps and manufacturers under one roof and I always run into old coworkers or friends in the industry. Plus a few years ago I got to meet Bob Pease at my local Arrowfest (Very Cool!) ...... I met Dave Van Ess at Texas Instruments Tech Days a few years ago too (a very close second, Very Cool!)


And just in case my Boss is reading this blog post... Yes I did find some cool stuff we could use on future products and I got a few pending questions answered... Thanks for paying for my gas :)