Pages: [1] 2   Go Down
Author Topic: Interactive Art Object Using Arduino+PIR sensors, hardware and code questions  (Read 3912 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I'm a 25 year old art student form Holland, recenty i discovered the fantastic little kit called arduino. For a few years now i am creating moving kenetic sculptures, to take my art to the next level i wanted to use the arduino for a more interactive approach.

Before I purchase anything i would like to ask u guys some questions. First of all I'm a complete newby concerning the arduino hardware and sofware. I'm already reading allot of guides that will help me further. What do i want to create?

I would like to create an artwork which reacts on the visitors, using 5 PIR sensors, that control 5 , 12 volt (max 10ah load ) whiper motors salvaged from old car parts.

Questions:
My first basic question is which arduino board will i need to purchase? (i would like te use it more in the future controling different arts objects). It has to control a few PIR sensors that in return control the whiper motors back and forth

Because the arduinoboard cannot provide the amount of current to control all the whiper motors, do i need some kind of relais of motor control unit?  I suppose that every motor needs 1 control unit? do you guys have some links for me with an example of the parts?



« Last Edit: June 01, 2011, 05:42:06 am by doerack » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
My first basic question is which arduino board will i need to purchase? ... It has to control a few PIR sensors
First off, you can't control a PIR sensor. It reacts to the presence of infrared, and turns on or off its output based on the presence/absence of infrared data. The Arduino can read the output from the PIR, but it can't control the PIR, in the sense of making it DO anything.

Any of the Arduinos is capable of reading 5 PIR sensors.

Quote
that in return control the whiper motors back and forth
Semantics, perhaps, but the PIR does not control the motor. The Arduino does, based on the output from the PIR sensor.

Again, any Arduino is capable of writing to 5 output pins, to control the 5 motors. You can get solid state relays that the Arduino can directly control, or mechanical relays (like http://www.sparkfun.com/products/10636) that the Arduino controls using a transistor (using this board, http://www.sparkfun.com/products/9096, with related parts is easy)
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Paul, great input. thanks!

I'm really not formiliar with the arduino, apologies for somewhat newbie questions of reply's, but i have to start somewhere. I understand that the PIR does not control the motor, but only reads input.
I would like to make a list (whith your help) of parts that i would need. I would like to control five dc whiper motors in two diections)

Because lack of knowledge concerning the arduino. i will ask someone in my country to help me. Having said that, i'm also reading a lot of tutorials en books about the arduino. Great stuff!

1x arduino, uno or Duemilanove (which do you guys recommend?)
5x whiper motor, car salvagejard
5x PIR sensor (http://www.samenkopen.net/action_product/927767/105314
5x solid state relays (i would like to buy an totally assembled board, ready to use, where can i find that? )

Thanks so far
« Last Edit: May 26, 2011, 07:37:25 am by doerack » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48556
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1x arduino, uno or Duemilanove (which do you guys recommend?)
The UNO and Duemilanove use the same ATMega328 "brain". The UNO uses a different USB chip. It's also easier to spell. For your project, either one will work.

The solid state relays will work to turn the power on to the motors. They can not control which way the motor turns. For that, you need a dual H-bridge which is designed for just that purpose. Or, you need two relays for each motor that provide power for each direction. The problem with this approach is that you must be very careful to never activate both relays at the same time. The dual H-bridge manages this possibility for you.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great, that's exactly the problem i had to solve, i have been surfing the web and found this website about controlling the motor.

I found out that i indeed need an dual H-bridge . this article could help me i think: it depends on the prices, and the current the H-bridge can supply whether i pick the H-bridge or two relays for each motor.
http://itp.nyu.edu/physcomp/Labs/DCMotorControl

All input is welcome, thanks so far.
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...
1x arduino, uno or Duemilanove (which do you guys recommend?)
5x whiper motor, car salvagejard
5x PIR sensor (http://www.samenkopen.net/action_product/927767/105314
5x solid state relays (link: http://www.sparkfun.com/products/10636)
Hi @Doerack,

First, I'm showing things from my own shop.. but that's the things I know best.

The list is good.

- Either version of Arduino with 328 chip will be OK.. 

- Wiper motors: do you know how much starting and running current they draw?? AND: What do you mean "2 directions?? Wiper motors rotate a crank inside and wipes move back and forth. If you reversed the motor the wipers would still move back and forth !!

- PIR sensors are good. Here are some at about =$6 US:  http://arduino-direct.com/sunshop/index.php?l=product_detail&p=173 These have 3 pins: +5V, Gnd, and a Digital output.

- Relays or Drivers to run the Wiper motors: This is more of a possible problem. Need to know the current to be handled. (The Solid State Relays shown above are for AC power and will not work with the wiper motors)... You need either relays or Power Transistor drivers.

Here are relays:  http://➡.ws/YD-relay

Here are Power FETs which can be used to both switch and change the speed of DC motors like the wipers... :
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=60

BUT: If you can get these things in Nederland without Customs that is probably better...

Your art installation sounds great...    Make sure you post photos of it working!

Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Terry thanks for your input. i would like to say that i like the way how this forum treats newbies. In holland the forums are not always kind to you.

To provide u guys with more input:

- I already have the Pir sensors, the ones from here: http://www.samenkopen.net/action_product/927767/105314

- About the Wiper motors: you have different ones, 1 type rotes a krank inside, but some others don't , they can rotate back or forth by reversing the motor.

Starting current: around 2 ah
running current they draw depends on the type, mine worked perfecty on a 7ah 12 battery, i will test tomorrow but i think 6 ah should be enough.

Here are some examples of other art projects (movies on youtube):
http://youtu.be/PP8wLhDlK_4
http://youtu.be/yjVZ8ycHULs
http://youtu.be/jCILljkp2PY
http://youtu.be/jwngFfZcrlk
http://youtu.be/2P8W7kgOpLE
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
- About the Wiper motors: you have different ones, 1 type rotes a krank inside, but some others don't , they can rotate back or forth by reversing the motor.

So how do those reversible ones work?
How are they wired?
What do you need to do to control them? 
Do the have "limit switches" at the end of their movement??
Can you point to any online information about them?

Seems like they could be used for many things....

Window up/down motors are very useful also....

Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm trying to find the datasheet, but still no luck. it's an wiper motor from an hyundai exel (front window, the mechnics outside the motor created the back and forth motion)

i do know it operates between 12-13,8 volt, it uses max 7ah and starts up at 2 ah( but then with little torque).

The motor has 3 wires. 1= ground 2= gear 1 (slow), 3 = gear 2 (fast),  two and three rotate in the same direction. I thought ik would turn foward and reverse, but that only works when i switch the wires. thy don't have an inbuilt limit switch. But that is not a problem, but at some time the motor has to stop turning. Maybe by creating some code, or else an limit switch.

Does an window motor also turn in one direction?

I'll explain my idea: The motors hang on the ceiling, each with a string attached with a little pointed steel weight. In startmode the strings hangs totally on the ground. When visitors of the artwork approaches, the sensor picks up the signal, the motor starts turning, the string and weight roll up into the sky. It's stops at the top (near the motor), when the visitor walks allong the motor rolls down the string and go back to it's starting point (just above the ground). This progress has to repeat itself over and over again for each motor seperately.


That's the concept!  Now i just have to figure out how to create this. I already created a big useless machine that did more or less the same, but this one worked purely on mechanics, no arduino or other controlers involved. This one: http://youtu.be/jCILljkp2PY

« Last Edit: May 26, 2011, 02:10:50 pm by doerack » Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, So what I think I understand:

- You want motors to be able to act as a "winch" or "Crane", rolling a cable or string up, and rolling it back down again.

- So you need to be able to reverse the motors, right?

- You have some windshield wiper motors but you do not want to use the back-and-forth movement, and you will remove that part??

- You will have to attach some "drum" or "Spool" to wind the cable on.

- You need to know when the weight is at the top, and stop the motor.

- You need to know when the weight is at the bottom, and stop the motor. 

More questions:
?? How heavy is the weight
?? How long do you want it to take to go from bottom to top / back

OK, I see the Video and idea... 

- So the weight does not need to stop at the bottom??

Details!   That's what Engineering is about  smiley-grin
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Doerack!

I'm a 20 year old Megatronics student also from Holland, nice to see I'm not the only one here.
I discovered Arduino just this morning and, though I'm still totally new to Arduino in particular my education does cover these fine electronics and scripting so as I get to know the Arduino systems better I may be able to help you out as a fellow Dutchman.

Groeten van Rik!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, So what I think I understand:

- You want motors to be able to act as a "winch" or "Crane", rolling a cable or string up, and rolling it back down again.
totally right i have the knowledge to create that, no problem i did it before.

- So you need to be able to reverse the motors, right?
Jesssss! an up and down motion.

- You have some windshield wiper motors but you do not want to use the back-and-forth movement, and you will remove that part??
the motors i have chosen have no back and forth movement in them. They move just in 1 direction all the time, only when i switch the wires it goes the other way.Just like a normal dc motor.

- You will have to attach some "drum" or "Spool" to wind the cable on.
i already created the spool.

- You need to know when the weight is at the top, and stop the motor.
yes i think this is able to program?

- You need to know when the weight is at the bottom, and stop the motor. 
right!

More questions:
?? How heavy is the weight the weight is about 1 kg
?? How long do you want it to take to go from bottom to top / not fast, just the top speed of the motor 80 rpm

OK, I see the Video and idea... 

- So the weight does not need to stop at the bottom?? No this time it has to stop on his own! that's why i want to use the arduino and not the switch i used in the video.

Details!   That's what Engineering is about  smiley-grin i understand, you give me the questions that are relevant, very helpfull! thanks

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Doerack!

I'm a 20 year old Megatronics student also from Holland, nice to see I'm not the only one here.
I discovered Arduino just this morning and, though I'm still totally new to Arduino in particular my education does cover these fine electronics and scripting so as I get to know the Arduino systems better I may be able to help you out as a fellow Dutchman.

Groeten van Rik!

Great i will contact u later on!
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

OK, I have a few opinions  smiley-surprise

This can certainly be done with Arduino.. It is an interesting idea.  I don't want to tell you exactly how to do it, and I think you can experiment and get an example working first, and there is more than one way to do this, like most Engineering things.

- You need to stop, run and reverse the motors.  Two Single-pole Double-Throw relays can do that.  When one relay is activated the motor would run in one direction, the other relay activated and it runs the other direction. No or both relays activated and motor stops. 

- You most probably need limit switches at the top and bottom of travel. 
  - Just time will not be accurate enough.
  - Counting turns could work, but you still need a known starting point
  - You need limit switches for safety
  - Limit switches should shut off the active relay and signal Arduino. Then Arduino can turn that relay off and later activate the other relay for the other direction. 

- The cable could run through a hole in an arm on a "microswitch" with a "bump" in the cable that catches the switch and switches it.

- Safety: you should probably measure the usual start/run current on each motor and connect a fuse that will blow if the motor is stalled because something failed and the motor is trying to wind the weight around the drum. 

So, you might use a pair of relays for each motor like these:
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=171 DISCLAIMER: I mentioned stuff from my own Shop...! But you can buy these other places too.    They already have transistor drivers for the relays so Arduino can run them directly.    Or you can build your own.. (The schematic diagram is on the Relay page).. 

I suggest you prototype one part of this at a time.. 

You can obviously build good things.. this is just a different set of tools and materials...

Make sense??
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hee Terry again great ideas, I suppose you like to educate others? Great help indeed!

- You need to stop, run and reverse the motors.  Two Single-pole Double-Throw relays can do that.  When one relay is activated the motor would run in one direction, the other relay activated and it runs the other direction. No or both relays activated and motor stops.  I already thought of that, i think it's the best way to go.

- You most probably need limit switches at the top and bottom of travel.  I already made an limit switch on the other project from the movie, it worked fine
  - Just time will not be accurate enough.
  - Counting turns could work, but you still need a known starting point
  - You need limit switches for safety
  - Limit switches should shut off the active relay and signal Arduino. Then Arduino can turn that relay off and later activate the other relay for the other direction.  

- The cable could run through a hole in an arm on a "microswitch" with a "bump" in the cable that catches the switch and switches it.

- Safety: you should probably measure the usual start/run current on each motor and connect a fuse that will blow if the motor is stalled because something failed and the motor is trying to wind the weight around the drum.  

So, you might use a pair of relays for each motor like these:
http://arduino-direct.com/sunshop/index.php?l=product_detail&p=171 DISCLAIMER: I mentioned stuff from my own Shop...! But you can buy these other places too.    They already have transistor drivers for the relays so Arduino can run them directly.    Or you can build your own.. (The schematic diagram is on the Relay page)..  

I suggest you prototype one part of this at a time..  

You can obviously build good things.. this is just a different set of tools and materials...

Make sense??
Makes allot of sense, first i will order all the materials, then just starting to figure out how i can make 1 of part work. (dc motor, 2 relays, PIRsensor, and an Arduino)
I'll keep you posted!


Last question so far: Do you know how to incorporate the PIR sensor? Do I need a sensor shield? (i'm working with 5 PIR sensors, each has to work seperately from the others)

I've send you a personal message concerning ordering parts from your website

« Last Edit: May 27, 2011, 12:35:53 pm by doerack » Logged

Pages: [1] 2   Go Up
Jump to: