Projects update

Hey guys,

I wanted to create a quick note on projects that I’m currently working on:

-digital low-pass filter – based on AVR microcontroller. This semester I’m taking Digital Signal Processing course and I asked the proffesor if I could make a project instead of writing an exam at the end of the semester. She agreed and that’s how this project begun. Right now I’m using ATmega328p @16MHZ with its internal ADC and an external DAC8571. For first tests I chose first order Butterworth filter designed with impulse invariant method. Communication with DAC is via I2C @ 400kHz, although I’ll may need to increase the bus speed (sending 16+2 bits to update the DAC takes 45us, which results in 22kHz update frequency, so in theory I should double the bus speed. In practice that speed should do as attenuation for 11kHz input signal is around 36dB).

Software is pretty simple: ADC is configured in Free Running Mode, triggered by Timer1 Compare Match B (Timer 1 runs in CTC mode @ 44kHz). ISR for interrupt generated on conversion finished calculates filter output. DAC is updated in main loop all the time – right now I use blocking while-loops, but I’ll probably switch to interrupt-driven control.

Now the most important thing: proof that it actually works. I assembled the test circuit on breadboard, hooked up audio output from my PC to circuit input and generated a few sine waves (maybe I’ll buy proper function generator someday). FFT on the output. Cut-off frequency is 200Hz.

f=50Hz (yellow signal is output):


f=200Hz (you can see slight attenuation, around 2.5dB):


f=400Hz (spot-on -6dB):


f=1600Hz (perfect -18dB, everything according to the plan: 1st order Butterworth filter has -6 dB/octave slope)


-second project I’m working on is electronics helping in setting up launch rail for rockets (I do it for Students Astronautical Association, Rocketry Section).

Quick spec:

-AVR based (again…)

-MPU6050 to measure rail angle

-HMC5883L – orientation

-BMP180 – pressure

-TMP102 – temperature

-NRF24L01 with amplifier – communication with base

-anemometer and wind vane – wind parameters measurement

-Li-Ion powered

I’ll create separate post on that project in near future (hopefully 😉 ).


Leave a Reply

Your email address will not be published. Required fields are marked *