How to get PIR sensor activating 12v DC motot forward and reverse?

Dear community,

An absolute newbie here with ZERO experience in electronics and need your help.

I am building an art installation which gets activated with a PIR; which starts a 200rmp 12v DC motor (pulling up a 4 meter light weight cotton fabric and LEDs) for 3 seconds; stops for 5 seconds, and then reverses for 3 seconds (going back to starting point). and then Loops everytime PIR gets activated.

Now, I understand I need a TIP120 Darlington transistor, 1UF capacitor, 12v SPDT Relay, external battery. Do I also need a H-bridge or should I get a shield or would the relay be sufficient?

Also, there are 4 different points (4 different DC motors, PIRs and LEDs) where this placed; so I am keeping 4 separate boards. How do I connect them together to same battery system?

How do I assemble this? I understood the PIR circuit and the DC motor circuit from tutorials, but the above things, relays and H-bridge and the reverse bit are confusing me.

Please help.

One relay won't drive one motor in two directions. It's best to get an H-bridge shield. Then you can control the motor speed too. (You probably want to drive much less current for the "down" motion as gravity is helping.)

4 boards can share one power supply. Just watch out for the last one in the chain, on the longest wires, will get less voltage than the first one. Once you get to 20ft or so, then the voltage drop on thin wires can be significant.

Thank you for that, I can split it in half the; 2 on left and 2 on right and i will keep in mind the 20ft tip.

Can I use a L293D Motor Driver instead?

Yes an L293D is an H-bridge inside a single chip. It's an older technology but still useful if you don't need maximum performance or larger motors.

MorganS: One relay won't drive one motor in two directions.

DPDT?

OK...

One relay won't drive one motor in two directions and stop. The OP did ask for it to stop at several points in the cycle

Thank you for your feedback

Interesting point about DPDT.

So, if i let go of the option of stop; i.e. Pir senses and activated the motor forward, and then reverses, pulling up the fabric and then immediately down, I can do that with a relay alone?

This is what I have made so far (simulator pic attached)

I am using L293D as well as L293 motor drivers (there was some mistake with the products they sent.)

I am confused as to how would the power be supplied to the arduino? There needs to be 2 different power source (plug points for them?

I have a feeling there’s something lacking here. Please let me know if there’s a mistake.

WARNING TO ALL WHO ARE TEMPTED TO FOLLOW THE ABOVE LINK: that's a fr**ing diagram.

Please, aksbonsra, either use the "schematic" view in Fr**ing or just draw a sketch on a piece of paper and photograph it with your phone. Those breadboard views are worse than useless.

ok.. what happened.. why a "WARNING"?

Sorry I didn't get back to this one faster.

F*ing is an abomination. It makes good-looking diagrams when you're just hooking up a 9V battery and an LED and it's good for teaching about breadboards. But 99% of the Fing diagrams we get here are either unreadable because all the lines cross each other at the same point or the designer has to say "Actually, my battery is 7,6V but I couldn't find one in the F*ing library, so I had to use this 9V one" and then 40% of the replies get derailed into explaining why a 9V battery won't work in that circuit.

Seriously, a hand-drawn sketch photographed with a phone is better than a F**ing breadboard diagram.

Strangely, F**ing does have a good schematic view, but very few people even discover that button.

If you're able to give us the schematic, then we'll be able to get back to answering the original question.

Thank you so much for getting back on that and explaining, I was worried I did something terrible.

I figured out a solution, attaching the pic, (cant seem to get the pic pasted) in case you see a problem, or if it's correct than for whoever would want that later on (a newbie like me that is).

this setup needs to work for 12 hours continuous.

One of the sub-forums here has a sticky post explaining how to post images here. Google can probably find it. Unfortunately it's a two-step process.

MorganS: (You probably want to drive much less current for the "down" motion as gravity is helping.)

I think I am getting this issue, but since I havent yet been able to source the right part for reeling in the cord, I am unable to know for sure. (looking for something like the inner wheel of a bobbin pin)

about the error in timing due to gravity working on it too should i reduce the time in the reverse part

 if(digitalRead(pirPin1) == HIGH){
        digitalWrite(ledPin1, HIGH);   //the led visualizes the sensors output pin state
        digitalWrite(in1Pin, HIGH);   // Motor turns forward
        delay(2000);                 // motor runs for 2 seconds
        digitalWrite(in1Pin, LOW);   //  stops the motor
        digitalWrite(in2Pin, HIGH);  // runs in reverse
        delay(1700);
        digitalWrite (in2Pin,LOW);    //  stops motor