How to make a jumping Halloween doll triggered by sensor?

Hello everyone, my first post here! I need a little help with this project I have on my hands. I want to make a Halloween scary prop. The idea is to have a small crib or bassinet sitting in the front yard. There is a doll under a sheet. It jumps up and screams when a visitor walks up the driveway.

I have been googling for the past half an hour, hoping someone must have already done this and posted about it. However I was not able to find anything exactly what I want. The dropping spider type projects are very similar, however. For example this one:

Anyway, I have a Mega 2560 kit which comes with a PIR sensor and some sample code. I was able to light up a LED the moment someone approaches. Since I host and mentor a couple of kids FTC robotics teams, I do have a lot of robotics related parts (electronics, motors, structure, etc). I could easily control the motor using the FTC robotics controllers, but that will tie up the electronics which the kids want to use for the competitions.

Hence the Arduino.
Now I need two more things to happen:

  1. Add a Motor controller
  2. Trigger a recorded sound (scream - gaggle - etc)

For #1,
I was thinking I could use a motor which turns 90 degrees and raises the doll. I could gear down/up the motor as needed. I could also add limit switches for the up and down position. But it may be easier to have a simple mechanical limit which the mechanism bangs into when the motor runs for like x seconds or so.
I could get a motor controller like this one:

But how to do PWM control? I saw this...
{link deleted] control-dc-motor-with-npn-transistor-arduino-pwm-cdaf2e

...but I guess this will not work "as-is".

For the #2 I am not sure how to do that.
Again, I see this...
[link deleted] simple-audio-player
...but this seems more complicated than what I would like to handle.

Any advice on how to make this happen?
I wanna keep it as simple as possible so this can be done quickly (Halloween is almost here)!

Thank you!
-Raj

The Arduino and sensor are the least of your problems… the mechanical is the bit you have to get right, then we can scale the control to suit.

You need a beefy motor or flywheel mech to give rapid torque & acceleration to the prop, or it will look like a garage door going up and down slowly…

With that, we’ll then understand what voltage and current (power) are needed for the motor assembly.to work properly.
That’s just an Arduino and motor driver.to match.

The sensor is relatively low stress, you can use IR, PIR, microwave or switches… all suitable in different applications.

It sounds like calling 911, or 112 is close.

Every year at this time people want to make Halloween things. Sadly the questions are poorly specified, lots of words, no any real experience in electronics nor in programming.
Forum is not creating the project specification giving You a simple list of what to do.
Sorry but tidy up Your post using facts, requirements. Also tell about Your background, education and experience.
Know that many helpers are highly experienced, seriously interested in assisting, but not mothering.

Well, the mechanical part I have totally under control :slight_smile:

For example, take a look at arm mechanism of the robot my kids team made last year (left lower corner 15167) See how fast that arm goes up and down. So I know it is doable.

As for the motor driver, I have posted that above. Here is it again

All I need is some code so that Arduino can send PWM to that motor controller. I can understand mechanics, but code is not my forte :slight_smile:

Are we having a bad day today :wink: ??

I already specified my background above.... I have robotics and mechanical knowledge. I do NOT need your "mothering". As for my education, although I have studied electronics engineering decades ago.........I am not sure why would you ask about my background. There are plenty of people without formal education in electronics which enjoy this hobby. I am NOT telling you a list of things to do.

Looks like you took ONE line out of my whole post and started criticizing that!
Did you bother to read the rest?
I did my research, I posted links to what I saw is already out there (although this forum does not let me post more than 2 links).

Look if you do not want to help, simply do not reply. But please do not diss on me. Not going to take this lying down. Is there a mod here who can take notice please?

Ok, the magic you need is there…
It can also be plugged into a servo controller or an Arduino (via jumper wires) or anything that can produce a PWM signal. It responds proportionally to a signal between 1050 - 1950 microseconds.”

With that knowledge, analogWrite() will get you most of the way to getting your project up.
If you play with the SERVO examples in the IDE, and on this forum, you’ll have a strong starting point.

Just some hints:
Avoid delay() like it’s your cousin, and work through the fundamentals in the IDE examples.

This project’s not too hard, and is a great learning space for your future projects.

Know that forum is not giving You any "some code". That request gave bad vibrations. Shown Your best attempt and forum will give tips.

Due to Your presentation the question is relevant. On what level should the replies be? Your post/description is flying all over the place. Too many words and too little of "engineering facts". Yes, one link to a motor controller...

I will leave the question thinking @lastchancename will keep on.

Thank you very much for your guidance :slight_smile:

I did not realize that servo examples in the IDE would be outputting PWM which can also be used to control a motor using that motor controller. That makes it easier. The examples talk about a motor controller IC - a ULN2003. I guess I will be not using that IC and connecting Arduino's output straight to the GoBilda motor controller (linked earlier).

But I am a little confused about connections.
The servo example in the IDE has 4 pins going to the motor controller but the GoBilda motor controller has a 3 pin input.

How do I interface Arduino to that GoBilda motor controller over 3 wires?

Your drawing suggests a stepper motor, rather than a servo

We need to understand what you’re trying to do before making any suggestions.

oh THANK you :slight_smile:
See, that is why a second set of eyes and/or second opinion helps!

The correct one is this... and this means I should be able to control that motor using the GoBilda motor controller. Sweet thank you again. (Ordering the GoBilda controller now).

DF player mini MP3 module.

s-l400 (26)

It can drive a small mono speaker directly and is quite loud. If you need really loud, it has line level outputs to connect to an amp & speakers. Easy to control via an available hardware serial port of your mega.

You can't power a servo motor from the 5V pin of an Arduino.

Thank you very much, Paul :slight_smile: That is EXACTLY what I was looking for and was not aware of that such a thing exists. I just ordered it from Amazon for $15, the genuine DFplayer. I read that the cheaper clones on Amazon have firmware issues.

Oh I love the power of these forums.

True, but I am going to use a motor controller. BTW I just ordered this one instead of the rather expensive GoBilda motor controller I was looking at earlier:

Thanks again!

Doesn't look suitable for driving a servo motor.

You don't need a driver for a servo motor, they have built-in drivers so you can control them with just an Arduino pin. My point was you can't power any kind of motor, even with a driver, from the 5V pin of an Arduino.

Thanks for pointing that out....you are correct, the Arduino pins cannot provide much current. Since I will be using a regular DC motor (not a servo), I will feed PWM from Arduino to that motor controller. The controller itself will have a large battery supply for the motor.

Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.