Electronics Advise - Halloween Build

Ok, I need some advise. I’m trying to get a head start about a scary Halloween build. I have a motion activated MP3 player and I want to have a timed light to come on and a timed motion servo (or 2).

I’m guessing I need to bite the bullet and learn to program something like an Arduino. What kind basic of programable board would be good for what I’m doing? An Uno 3?
Thanks

What programming languages are you already comfortable with?

2 Likes

Don’t laugh, but C++. I know there will be a learning curve which is why I’m staring early. :grin:

2 Likes

Well that would be a reason to use Arduino; it’s a language you are familiar with. If you need 5V then Arduino Uno is a great choice. A lot of the other boards out there run on 3.3V.

3 Likes

Yeah 5V will be a common voltage for most of the other components so that works. Thanks, I was looking at the Uno but wasn’t completely sure .

3 Likes

Very much agree with you and @mcdanlj , the UNO (aka ATMega328P) based boards are ideal for this.

5V with plenty of hardware IO and the default ecosystem for them is C/CPP, with a somewhat overwhelming selection of libraries/guides/docs to help.

My ‘gut reaction’ is 'oooh. perfect for a micropython project, but I’m a) biased and b) inclined to overcomplicate stuff

1 Like

Nothing wrong with C++ :).

Uno is a good choice also because it can run on 12v and has 3.3 and 5v outputs.

You can also plug a proto shield for the I/O and there are lots of cases available.

Adafruit has some easy-to-use event-driven audio players and RC servo drivers.

1 Like

The ESP 32 family is also a good choice. You can program it with the Arduino IDE or visual studio.

1 Like

An esp32 with tasmota installed might be a good choice. I am doing something similar to what you want.

beside an esp32 you’ll need a

https://www.wemos.cc/en/latest/c3/c3_mini.html

  1. MP3 playback board

https://www.aliexpress.us/item/3256806858919808.html

  1. Human presence sensor

all three are available at ALIexpress to if you don’t mind the cost at Amazon.

If you install tasmota you can control the playback board based on triggering the human presence sensor. For a simple case you might get away with not programming. Otherwise tasmota has a scripting language called berry which is WAY easier to learn/use than compiling C++ in platformio/arduino. Your script might simply play a round robin of the mp3’s each time the sensor is tripped (with say a delay). Anyway I am going to be doing exactly this (and using a servo motor to open/close and skeleton mouth as well) so I could share anything I code up.

Sorry but I can’t post more than two links since I am new.

1 Like

here are the two I could not post

https://www.aliexpress.us/item/3256806122905636.html

I would look at Adafruit.com and see what they have which might get you all the parts you need. Like MP3 player, servo and LED(RGB, pixel ring, etc). And when you find them look at the Learning links on the product pages. Those will include specific instructions on loading libraries and software examples along with wiring schematics.
Even if you don’t purchase the parts from the site, the online docs are fantastic.

2 Likes

Yeah Adafruit has been great.

I ended up getting an UNO R3 from ELEGOO off amazon.

For sound and motion detection I got this from Aliexpress.

https://www.aliexpress.us/item/3256805378118652.html

Plus some better speakers

https://www.aliexpress.us/item/3256806813830694.html

1 Like

The PIR seems to be running off the 3.3V but as long as you have your pull-ups correct you might be able to use the UNO to read the PIR output to then start your timers for controlling the light and servo. Otherwise I didn’t see that MP3 player providing and digital controls.

3 Likes