Tuesday, July 20, 2010
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
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
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
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
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
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.