Introduction
It is Halloween, or at least it was when I made this pumpkin, and I had to make something scary otherwise.
The pumpkin needed to have sound, flashing lights and sensor to trigger when people were walking past, and everything powered with 9V.
Code is available here
Items
I ordered a simple MP3 serial player to connect to the Arduino, one small amplifier to pump the sound, two speakers, PIR sensor and a lot of leds.
MP3 Serial player
Amplifier
Speakers
PIR sensor
But remember, dont buy always cheap stuff otherwise you will end up to fine tune your installation without any clue, read more about below.
Why you need to spend that pound more
I tried to make the whole project as cheap as possible due to the pieces that I wasnt going to re-use anymore. But this came with a price to pay, having sensor which dont have any labels on the PCB and you have no clue what each pin do and how to tune it.
It is Halloween, or at least it was when I made this pumpkin, and I had to make something scary otherwise.
The pumpkin needed to have sound, flashing lights and sensor to trigger when people were walking past, and everything powered with 9V.
Code is available here
Items
I ordered a simple MP3 serial player to connect to the Arduino, one small amplifier to pump the sound, two speakers, PIR sensor and a lot of leds.
MP3 Serial player
Amplifier
Speakers
PIR sensor
But remember, dont buy always cheap stuff otherwise you will end up to fine tune your installation without any clue, read more about below.
Why you need to spend that pound more
I tried to make the whole project as cheap as possible due to the pieces that I wasnt going to re-use anymore. But this came with a price to pay, having sensor which dont have any labels on the PCB and you have no clue what each pin do and how to tune it.
After few investigation and comparing the good PIR sensor to this cheap one, I find out what are the pins to connect and the two potentiometers.
From the picture above you can see no labels are on the board and I pointed each one pin where should be connected to get it working.
The potentiometers was a bit tricky as different boards on the internet were showing different functionality.
This board has the first potentiometer which set the sensitivity of the sensor, turning to the left it will make less sensible and to the right more sensible.
The second is setting the timing but it is very sensible as the position on the picture would be 65 seconds of wait and twisted all the way to the left is 2 seconds, so I would assume that all the way to the right might be 260 seconds.
I hope these information might help someone having the same issue as I had in this installation.
Wiring
You can see from the picture below that is a total mess! Sorry, I didnt have time to clean it up as it was a one day project and it needed to work the day after.
I have used some stick to help to position some leds in the eyes, position the PIR in the nose, place the speakers on the back, some leds inside to make a nice light reflection and the arduino.
The MP3 player was connected over Serial and then amplifier on the output and then to the speakers, make sure you use 5V, otherwise the module might reset and make a horrible noise.
I had 4 strip of leds which had 4 light on each one, I have connected them to 4 pwm pins to make sure I can play with flashing and fading.
I found an old case for the battery which will provide 9V to the arduino and the PIR sensor connected to one of the digital pins.
How it works
Probably you already understood what I have done if you read the lines above, but my idea was to scary people by walking pass to a glowing pumpkin and make them think that it was alive.
The Arduino has two modes, one that glow all the lights with a different timing, and one flashing and triggering the sound. The PIR sensor was the device that was triggering the different mode and some delay to make sure the pumpkin wouldnt go crazy.
No comments:
Post a Comment