using arduino for an art project, need rundown

i’m looking to use my recently purchased arduino board for an art project to control a motion sensor as an input and a motor for an output. the motion sensor i orered is can i hook this directly to the arduino? would this sort of projet require a breadboard? would i need anything other than the arduino, motion sensor, and motor? could anyone direct me to tutorials containing basic, beneficial information for a project like this?

from Sparkfunwebsite:

"The alarm pin is an open collector meaning you will need a pull up resistor on the alarm pin. "

You can connect this sensor to an Arduino digital pin but need the pull up resistor

If you don’t know about pull Up resistors (just an ordinary resistor by the way) read Lady ADA’s tutorial on using switches, this is important for your sensor to work correct.

You will also need additional components for controlling the motor. Exactly what you need depends on what type of motor. The thing is that you can’t drive motors (except very very small ones) directly from Arduino, because they draw more current than Arduino can supply.

If you can tell us what type of motor you are thinking of (Dc motor / stepper motor / servo motor / ???) then we can give more specific advice

Good luck with your project

That sensor works great with the arduino, I bought one myself a few weeks ago. If you hook it up the way the sparkfun website says to it will work fine. As MikMo suggested, you might want to read ladyada’s arduino tutorials at Arduino Tutorial - Learn electronics and microcontrollers using Arduino! I read them when I bought my arduino and they were very helpful.


im not sure what motor to use yet, i havn’t figured that part out. for times sake i was thinking of just hitting up radioshack and picking one up from there. What other components would i need with a dc motor? im guessing an outside power source of some sort, but how would you make that work?

Double Thanks for the Future!

Hello. If you’re talking about a brushed DC motor, you would need a motor driver or a motor controller.

Motor drivers are the simplest modules in the sense that all they do is provide power amplification for low-level control signals (e.g. PWM and direction) supplied by the user; on the other hand, that means that the master device to which the motor driver is connected must take care of the low-level, resource-consuming signal generation.

Motor controllers are motor drivers with additional intelligence: an on-board microcontroller generates the low-level signals and presents the user with higher-level interfaces and commands. For example, our micro dual serial motor controllers allow two DC motors to be controlled by a single serial line, and the master controller simply issues commands only when the speeds of the motors should be changed. Other motor controllers are even more complex, incorporating advanced acceleration commands, current sensing, feedback-based control, and more.

The specific motor driver/controller you need will depend on the motor you get (e.g. its stall current) and the voltage at which you plan to run it.

  • Ben

if you only need to control the speed of the motor and NOT the direction you can use a simple transistor / diode setup like this :

If you need to control direction you need an H bridge IC, or a dedicated motorcontrol circuit.

By the way if you have access to “electronic waste”, old printers are a really good source for both DC motors and steppermotors, and other nice mechanical bits and pieces. I have taken a part lots of printers and have a nice pile of motors. If possible i sometimes also save the powersupply for the printer, so i have something to power the motors with.