How to go about doing.....this:

New to Arduino.. and am wantign to replicate an effect I saw on a little McDonalds Avatar toy.

where the PCb has some sort of 'flat' sensor..that either using audio or vibration and transmits it back to the PCB >> to light an LED in 'time' with the audio/vibration around it.. (I believe it also uses PWM as the brightness varies on loudness)

Link to see PCB vid:

picture:

seems like a voltage to PWM type conversion..

anybody wanna give me some ideas on where to start with this?

although Im new and havent ever tried any of this code or its functions before....the research I'll be doing/looking into using will be this approach:

1.) using either polling method (probably in MAIN LOOP for first tests.. then maybe an internal timer?...thoughts on this?) to check the pin.

2.) I would be sing an analogRead() to read this 'sensor'..and get the voltage from the 'connection/conversion' of the audio/vibration

3.) use this 'value' in setting the brightness (PWM) on a pin that has the LED connected to it?

What kind of sensor is that?

Am I on the right track on how to go about getting this type of project/effect working?

feedback/suggestions appreciated.

Thanks

Could you post a better image of the sensor? I suspect it is a piezo disk, though, from the video...?

piezo disk sounds right.

maybe these will help:

am I on the right 'track' to try and duplicate this effect/project?
with the above outlined function/path I outlined above?

thanks

The flat disc connected to the board is a piezo sensor, which turns knocks into a small voltage that can then be measured. They are commonly used in cheap electronic drum kits etc

The black circle on the PCB is actually a chip, which is created on the board itself ( a very cheap way of mass producing these items ).

The method you suggest of reading the value from the ADC in a loop, and setting the brightness of the LED accordingly should work.

It's not the most accurate way of doing things, but for a simple device it should work just fine.

thanks for the reply..

although I havent even begun to research how to do the steps I outlined..

Im glad it will work.

You mentioned not the most ACCURATE way of doing it?

out of curiosity..what IS the best/better way of doing this then?

And how would you guess this 'toy' was done?

Thanks

And how would you guess this 'toy' was done?

My guess is that there are no micro controllers involved and it simply amplifies the pulse from the sensor and triggers the light with a transistor.