PIR Sensor Triggers Dc Motor

New to the world of Arduino.

Can anyone tell me if its possible to control a dc motor with a Arduino Nano & PIR sensor ?

Project details:

  1. Arduino nano
  2. PiR sensor
  3. 12vdc mini gear motor

Function:

PiR triggers the gear motor to move forward 0-60 seconds - stop
PiR triggers the gear motor to move in reverse 0-60 seconds - stop
0-60 second pause between each trigger.

Essentially, the PiR loops the motor back & forth, (forward-reverse) after each trigger.

If this is possible, can someone share their knowledge of the code ?

This is very simple, analogRead the PIR sensor then if the value is greater than a programmed threshold, change the motor direction (forward/reverse) and activate it. Modify the "Button" example in the Arduino IDE to use analogRead / motor control.

Thnx for the reply.

As a beginner, the Arduino is mostly greek to me.
I'm not really sure what your saying. Sound great, It's good to know it can be done.

The best I can do CUT/COPY/PASTE & download the code to the arduino. Test it. I'm not a programmer.

If someone can write the code i'm more than HAPPY to paypal them some fast $CASH$

Maybe someone knows somebody that can ?

danielmario:
This is very simple, analogRead the PIR sensor then if the value is greater than a programmed threshold, change the motor direction (forward/reverse) and activate it. Modify the "Button" example in the Arduino IDE to use analogRead / motor control.

The PIR sensors I know all have digital outputs, so no analogRead and no threshold.
Just digitalRead the sensor, and act upon that.

Bingoo:
As a beginner, the Arduino is mostly greek to me.

Hi, and welcome to the forum.
Start with the examples that come with the IDE.
Flash a LED, connect a button.
Once you understand the structure/syntax of the examples, then you can start writing your own code.
Then it's a small step to a PIR and motor.
Leo..

Thnx for the words of encouragement.

I'm not really interested in learning how to program the arduino. Am sure its not rocket science. I actually built a transistor radio & a bread board from brass tacks for my 9th grade school project. Surprise it worked. That was a 100yrs ago.

I'm here for someone who already know how to.

Post in the Gigs & Collaborations section to hire a programmer, or better, your local newspaper.

Thnx for the info. Will do.

Cheer's.