AVR options for Piezo activated LEDs

Discussion in 'The Projects Forum' started by Interitus, Aug 14, 2010.

  1. Interitus

    Thread Starter Member

    Nov 8, 2009
    I made a piezo-activated LED project a little while ago, using an arduino-clone. But I ran into a lot of problems (mostly due to my inexperience), but I think a few problems were based on the shortcomings of the atmega328 chip, in combination with what I was trying to do with it. You can read all about it in my old thread: http://forum.allaboutcircuits.com/showthread.php?p=257602 Ultimately I'm wondering if I should stick with an arduino, or if there are other options out there that I should pursue.

    I'm looking to redo my project, in a way that adds more flexibility, and eliminates the problems I had in the previous build. I would like to have atleast 5 strings of RGB leds, individually controlled. One of the limiations of the atmega328, was that it only had 6 PWM outputs. A guy in IRC suggested this product: http://macetech.com/store/index.php?main_page=product_info&products_id=22 , which he said has " 8 channels of RGB and you can put a bunch of LEDs in series up to 30V per channel, so up to 10 normal LEDs on each pin" Which sounds about what I need to do for outputs. But, his example code is based on the arduino, so I dont know if I'd be able to translate it to work with another AVR or something, or if I even need to switch.

    The other problem I had, the biggest one I'd say, is that I'm trying to control the kit with piezos. And either the arduino analog inputs are just insufficient, or I wasn't hooking things up right, but I kept having problems with them, which you can read about in the previous thread linked above. In the end, I put a 5V zener diode, a capacitor and a resistor (can't remember the values) in parallel with the piezos to protect the inputs from high voltages. And then grounding the 6th unused input directly to ground, seemed to help the floating input values enough that the project worked. But I'm convinced there has got to be a better way to do this.

    So should I stick with the arduino clone? Or are there other AVRs or controllers that will allow me to do what I want? Of course I'd like to keep the cost down as low as possible, which also means I hope to be able to program any new chip with the FTDI adapter I have already. Is there perhaps an input module that could help me? Or do I just need a better designed circuit to handle the piezo inputs?
    I'm still in planning stages and looking for options and costs. I'm also looking at better ways of connecting the LEDs, as my current method is a PITA. I'm thinking of making small pieces of PCB, where I can just solder the LEDs into the board and connect wires to the board, make less connections, and still have flexibility to install the LEDs wherever I need them, as I don't have a concrete plan on led placement yet.