Tuesday, July 20, 2010

My EE Portfolio

A compilation of various Electrical Engineering projects I have worked on.

Sunday, June 6, 2010

PID Controller


I have been working on a PID controller with an Atmel AVR Atmega8 microcontroller and 1.53:1 Gearbox Motor for several weeks now. The goal is to implement a PID controller in C code using the AVR microcontroller. The motor provides a quadrature encoder scheme for feedback. The AVR is setup with a Phase and Frequency PWM signal with a 2kHz period for motor speed control. The Duty Cycle for this signal is controlled by a trimpot which is sampled by the on-board A/D Converter. The direction of the motor is controlled by a Port Pin in code.

Monday, March 15, 2010

My USBee Logic Analyzer

I purchased a USB based logic analyzer from http://www.usbee.com/ called USBee SX for about $150 and then later purchased the professional software for it. It is was one of the neatest gadgets I have used lately.
I have utilized the logic analyzer on several projects recently, involving VGA, USART, SPI, and even DCC signals. The professional suite software allows for the decoding of custom protocols not included in the program. Hence the tinkering with DCC signals.




This picture demonstrates the logic analyzer with DCC signals on Channels 0 and 1.




This picture demonstrates decoding of VGA signals from my Spartan 3 FPGA board. If you look closely at one of the timing parameters at the bottom, it reads close to 59.9 Hz.





These SPI signals were decoded from a recent project I am working involving a Resistive Touch Screen. I have utilized the Analog Devices IC AD7843.

Tuesday, May 26, 2009

RF Transmitter/Receiver and my new AVR

I have just picked up a new AVR microcontroller, the AT90USB647 AVR. This one has a built in USB controller, very neat. Its much larger than the previous AVRs I have used (Atmega8, Atmega48, Attiny13). One of the reasons I purchased this microcontroller was because my AVR-ISP programmer is compatible with it and the other is that it has USB functionality.

For a while now, I have wanted to make use of my RF transmitter and receiver. As I have stated before, I am rather cheap at this time, and I purchased a basic transmitter and a basic receiver. They are seperate modules, the transceivers are a bit too fancy for me right now.

As I put this circuit together, my goal was to implement a basic loopback system to test RF and USART functionality. The USART is handling the hardware protocol for RF transmission. The program I wrote sends data via the RF transmitter to the RF receiver and displays data received on Port A through 8 LEDs.



Everything in my circuit built and program being executed. The red wires sticking straight up are acting as my RF antennaes and surprisingly enough make quite a difference.

Gyroscope - Angular Rate Sensor

So I was looking for a new sensor to tinker with and I really wanted an Accelerometer. However, I am cheap and don't have a whole lot of money and so I bought a Gyroscope instead. This sensor measure the angular rate of movement. So here it is.


The Angular Rate Sensor XV-3500CB Gyroscope

Of course I did my usualy thing, build a test circuit to utilize this sensor. Using an Atmel Atmega48 AVR microcontroller I interfaced this sensor to it and used an LED light bar to indicate the rate of movement. To be honest, I was rather dissappointed with this sensor, it was well kind of boring. Its circuit is already designed and built onto this chip, using I2C bus or an A/D Converter, so no external hardware is needed.

And the last thing about Gyroscopes, they are not widely used. They don't give position, only angular movement. So one can use an Accelerometer instead, poll it periodically, and compare those positions with respect to time and calculate angular movement with some Physics.


Thursday, March 26, 2009

Flex Sensor and a Servo

My next project begins with a flex sensor. A strip of material that when flexed varies the resistance of the sensor. At a straight or 180 deg "flex" it gives a resistance of 9k Ohms, roughly. It can give up to 18k Ohms at about 90 deg or fully flexed. Now to interface the sensor to my AVR's A/D converter and measure that resistance.

Now to add a basic hobby servo to the system, a Futaba S3003 Servo. It has three wires Red, White, and Black meaning Voltage supply, Signal, and Ground, respectively. A while back I had developed some basic C code to control a servo and now is the time to test it.

What I want to do is control the servo via the flex sensor. Basically, the flex of the sensor controls the position of the servo motor. Hmmm, interesting applications with this concept. Here are a couple of pictures from my circuit in the works.


Some Flex:


More Flex:




Thursday, March 5, 2009

Breakout Board For My AVR

Now with my ISP device, I need a breakout board for my AVR processor. A breadboard works well from time to time but something more permanent is needed. So looking through my inventory on hand I found a protoboard that would work well.



The first thing I started with was the positioning of the processor and sockets for Port Pins. Then I moved on to adding IC sockets for EEPROM, a Real Time Clock, and a D/A Converter. After that I soldered on two pin terminals for easy interfacing to the chip's onboard A/D Convert Channels. The last things I have added are a LCD contrast pot and a system reset button. Now to wire everything up so the breakout board actually works.