Motion sensor activated lamp

Project was built as a gift for Mothers day. But it seems so practical that can find many places to be used. Lamp is based on Atmega328p which is loaded with Arduino bootloader and operates at 1MHz. For sensing motion sensor there is a TLC1079 op amp used which chews as little as 150 microwats per channel. The whole effort was put to prolong battery life otherwise lamp will find a peaceful dusty place to rest.

Lamp is also equipped with CDS light sensor which ensures that lamp works at night time. Lamp light source consists of pair of RGB LEDs that are switched using p-channel FETs. Lamp takes about 0.08mA of current in a sleep mode what ensures it to work for about 3 years when running from 3 AA batteries.

Echo machine on atmega32

We hear echo effects in most of music records. It is common effect that evolved from analog in to digital methods. Earlier this was done using magnetic tape loop where sound effect was recorded once and played back with some delay multiple times that gave desired effect. Now it is all digital and echo can be implemented using simple DSP method. Vinod constructed simple echo circuit around atmega32 microcontroller that illustrates this effect.

He achieved this effect by using circular buffer where samples from ADC are written in one place and played back from another point what leads to delay. The biggest problem here is that Atmega32 has very limited amount of RAM (2KB) if you want to achieve better sound quality use bigger microcontroller with more RAM. As always vinod’s C code is short and easy.

Audio spectrum analyzer using Atmega32

When speaking about spectrum we know that there is a Fourier transform involved. Probably this is the trickiest part of the business. Vinod felt like he needed to refresh his Fourier transform knowledge and made a small spectrum analyzer that displays frequencies from 0 to 10kHz. His choice was Atmega32 microcontroller running at 16MHz, text LCD and audio input circuit that adjusts incoming voltage to fit AVR’s ADC input.

He programmed spectrum bars as custom characters on LCD and was able to display 16 points. His choice was to use DFT which is actually slower than FFT but easier to implement especially when you are just stepping in to spectrum area. Speed is critical here as in order to calculate 32 points it needs to calculate 512 sines and cosines. Obviously this would kill avr if not using look-up tables. With some tricks he was able to calculate 120 32-point DFT operations per second. With such speed vinod had no problem displaying spectrum at 30 frames/sec speed. Source code is written in C and is easy to follow.

Making capacitive sensor in a sec

Capacitive sensors are popular in many input devices where we want to avoid moving mechanical parts. Moving parts tend to wear out and especially are not welcome in dirty environments. Different talk is with capacitive sensors where input can be read by touching surface which even may be covered with non conductive material. Lots of modern microcontrollers have capacitive touch sensor input support. If you just want to play with it with no effort you may follow this instructable where alan offers to try pencil drawn button.

Graphite is common component in standard pencils and is conductive. So you can draw anything on a paper sheet and make it input device by connecting to Arduino digital input via 1MOhm pull-up resistor. By measuring charging time it is possible to decide when finger is near. Well, this doesn’t seem very durable, but for testing and demonstrating things out this is perfect.

Next Page »