Hi all!
I have a mechanical toy project that I wanted to automatically turn ON /OFF as someone approaches and leaves the area.
I wanted to place the toy on a square table and anyone coming from all four angles will trigger the toy to turn on and off as they come and go.
Any recommendations?
Tks!!!
Proximity? Sensor? - on/off power
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
One way is to use a PIR sensor. https://www.adafruit.com/product/189
These have a wide fild of view - about a 120 degree cone. So if you aim it straight up, it should detect someone approaching from any side.
The IR and Ultrasonic range sensors have a narrower field of view, so you would need several of them to get 360 degree coverage.
These have a wide fild of view - about a 120 degree cone. So if you aim it straight up, it should detect someone approaching from any side.
The IR and Ultrasonic range sensors have a narrower field of view, so you would need several of them to get 360 degree coverage.
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
Super! :D
1) PLACEMENT:
Pls see attached pic. Can I place it under the table? Reason being that I thought the PIR sensor has to be close to the power supply so as to automatically switch it on/off when there is movement nearby? I can't put it on the table cause people will see it, and I can't put it on above because the light is there. Any advice? With this setup, do you think it's better to put a sensor (pir or others?) one on each side of the table?
2) POWER:
Are there instructions on how to attach the sensor to the toy and power supply so as to control the on/off automatically?
3) ADDITION TO EXISTING ORDER:
I literally put in an Order Confirmation No: 615411-0753435509 one hour ago! :( Can I please add this to the order as well? I won't buy it yet till I wait for your reply. It costs me $55 per delivery, so can I tag on to this existing order?
Will I need any other supplies to make this PIR sensor work? Or is it all inclusive?
Tks!
1) PLACEMENT:
Pls see attached pic. Can I place it under the table? Reason being that I thought the PIR sensor has to be close to the power supply so as to automatically switch it on/off when there is movement nearby? I can't put it on the table cause people will see it, and I can't put it on above because the light is there. Any advice? With this setup, do you think it's better to put a sensor (pir or others?) one on each side of the table?
2) POWER:
Are there instructions on how to attach the sensor to the toy and power supply so as to control the on/off automatically?
3) ADDITION TO EXISTING ORDER:
I literally put in an Order Confirmation No: 615411-0753435509 one hour ago! :( Can I please add this to the order as well? I won't buy it yet till I wait for your reply. It costs me $55 per delivery, so can I tag on to this existing order?
Will I need any other supplies to make this PIR sensor work? Or is it all inclusive?
Tks!
- Attachments
-
- pir sensor 1.jpg (710.49 KiB) Viewed 947 times
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
1) Mounted under the table, you would probably need to go with 3 side-facing sensors 120 degrees apart to cover the full 360 degrees.
2) We'd need to know the power requirements of your toy to answer that question. If it plugs into a wall outlet, you could use a power-switch-tail. https://www.adafruit.com/product/268 If you want the toy to run for a specific amount of time, you may need a microcontroller between the sensor and the power switch tail.
3) If you contact [email protected] with a link to this thread, they may be able to put your order on hold if has not already gone out for packing.
2) We'd need to know the power requirements of your toy to answer that question. If it plugs into a wall outlet, you could use a power-switch-tail. https://www.adafruit.com/product/268 If you want the toy to run for a specific amount of time, you may need a microcontroller between the sensor and the power switch tail.
3) If you contact [email protected] with a link to this thread, they may be able to put your order on hold if has not already gone out for packing.
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
1) MOUNT: So are the side-facing sensors another product different from the PIR sensor? No problem, I can get 3 of them and glue them under the table. Three of the same PIR sensor you mentioned below, yes?
2) POWER : The toy uses 9v Parallax homework board for movement and is powered by plugging it into the wall outlet; so it's turned on when I plug it in currently. Not ideal yet. I wanted the toy to turn on as long as someone is within the sensor range only and turn off when no one is around. I'm confused the the powerswitch...sorry, i read it and it went over my head. ;p
3) ADMIN: All ok... so I will make the additional orders.
Looking forward to your reply on the sensor. Sorry for being such a rookie! ;p
2) POWER : The toy uses 9v Parallax homework board for movement and is powered by plugging it into the wall outlet; so it's turned on when I plug it in currently. Not ideal yet. I wanted the toy to turn on as long as someone is within the sensor range only and turn off when no one is around. I'm confused the the powerswitch...sorry, i read it and it went over my head. ;p
3) ADMIN: All ok... so I will make the additional orders.
Looking forward to your reply on the sensor. Sorry for being such a rookie! ;p
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
1) Just mount of the same PIR sensors facing sideways about 120 degrees apart.
2) The powerswitch tail allows you to use a logic signal from a sensor or microcontroller to turn power on and off. If you connect the output of a PIR sensor to the control input, it will switch on whenever it detects motion. With 3 sensors, you will probably want to use a simple microcontroller to combine the input from the 3 sensors and turn on the power whenever any of the sensors detects motion. The Trinket is the smallest and lowest cost controller and will handle this task easily. The Arduino UNO is a bit more than you need, but is easier to get started with if you are new at this.
https://www.adafruit.com/product/1501
https://www.adafruit.com/product/50
The UNO is also available in a starter pack that contains other essential items like power supply, USB cable and small parts for wiring your sensors.
https://www.adafruit.com/product/68
https://www.adafruit.com/products/193
2) The powerswitch tail allows you to use a logic signal from a sensor or microcontroller to turn power on and off. If you connect the output of a PIR sensor to the control input, it will switch on whenever it detects motion. With 3 sensors, you will probably want to use a simple microcontroller to combine the input from the 3 sensors and turn on the power whenever any of the sensors detects motion. The Trinket is the smallest and lowest cost controller and will handle this task easily. The Arduino UNO is a bit more than you need, but is easier to get started with if you are new at this.
https://www.adafruit.com/product/1501
https://www.adafruit.com/product/50
The UNO is also available in a starter pack that contains other essential items like power supply, USB cable and small parts for wiring your sensors.
https://www.adafruit.com/product/68
https://www.adafruit.com/products/193
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
1) SAME PIR SENSORS: done! TQ!
2) POWERSWITCH TAIL: So basically this means that I won't need to code the parallax homework board at all since the sensors will trigger it on? Interesting! When you say 'simple microcontroller', is the parallax homework board workable? I've already bought them (ill advised perhaps) so I'd like to use them up :p BUT BUT BUT I've seen The Trinket and would love to use it (I'd be able to hide the Trinket inside the toy and avoid a bulky microcontroller), but I've read it and I'm afraid it's too complicated for me to setup. The action for the toy is just ON and OFF, so I wish I knew about the Trinket earlier but time is of essence.
3) FLEXINOL WIRE: By the way, the toy is a flower, and I'm using Flexinol Wire sewn to the petal for it to contract and relax via the ON AND OFF CYCLE action of the microcontroller. I'm going to run into a problem though: when the PIR Sensor senses someone approaching, it will trigger the microcontroller to turn ON, but the petals need to open and close, so I assume that I'll have to code it so that ON means continuing cycles of ON AND OFF so the petals will continue to contract+relax, opening + closing, untle people leave the vicinity?
:D
http://www.youtube.com/watch?v=yuYV3RrowWY
My ACTUAL flower project looks like this (but this is an old version using strings and servos, which was inconsistent and fussy):
https://vimeo.com/98442543
2) POWERSWITCH TAIL: So basically this means that I won't need to code the parallax homework board at all since the sensors will trigger it on? Interesting! When you say 'simple microcontroller', is the parallax homework board workable? I've already bought them (ill advised perhaps) so I'd like to use them up :p BUT BUT BUT I've seen The Trinket and would love to use it (I'd be able to hide the Trinket inside the toy and avoid a bulky microcontroller), but I've read it and I'm afraid it's too complicated for me to setup. The action for the toy is just ON and OFF, so I wish I knew about the Trinket earlier but time is of essence.
3) FLEXINOL WIRE: By the way, the toy is a flower, and I'm using Flexinol Wire sewn to the petal for it to contract and relax via the ON AND OFF CYCLE action of the microcontroller. I'm going to run into a problem though: when the PIR Sensor senses someone approaching, it will trigger the microcontroller to turn ON, but the petals need to open and close, so I assume that I'll have to code it so that ON means continuing cycles of ON AND OFF so the petals will continue to contract+relax, opening + closing, untle people leave the vicinity?
:D
http://www.youtube.com/watch?v=yuYV3RrowWY
My ACTUAL flower project looks like this (but this is an old version using strings and servos, which was inconsistent and fussy):
https://vimeo.com/98442543
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
Ohh... and the Flexinol Wire I'm using is 0.0006" LT. I've yet to test it out cause I just ordered it.
Is the TRINKET that simple to setup? hmmmmm..... the size is so convenient!!! :D
Thanks! :D
Is the TRINKET that simple to setup? hmmmmm..... the size is so convenient!!! :D
Thanks! :D
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
I've just reviewed the really helpful LADY ADA introduction to Trinket. I'd like to give it a try. I'm tied up at the moment, but can you recommend what supplies I'll need to set up the Trinket and make it work with my Flexinol wires? I've put the Trinket 6pack in my Cart already. I don't want to forget anything again since I'm a long ways away. Is there a starter kit for the Trinket? A one shot package that will have the basics for me to get started?
Thanks!!!
Thanks!!!
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
I'm not familiar with the Parallax board, but it looks like it could do what you need. From what you describe, you will probably need a microcontroller of some sort to control the on/off cycles of the flower.
I think the powerswitch tail may not be the best solution for you, since it will make an audible click each time it cycles on or off. Since you are using Flexinol , a better solution would be something like a MOSFET to silently switch the DC current to the wire. https://www.adafruit.com/product/355
This can be controlled with one of the pins from your microcontroller.
I think the powerswitch tail may not be the best solution for you, since it will make an audible click each time it cycles on or off. Since you are using Flexinol , a better solution would be something like a MOSFET to silently switch the DC current to the wire. https://www.adafruit.com/product/355
This can be controlled with one of the pins from your microcontroller.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
We don't have a Trinket starter pack. In addition to the PIRs and the MOSFET, You will need a USB cable with a mini-B connector.
You can power it via one of these: https://www.adafruit.com/product/501
You will also need some basic soldering and wiring tools.
You can power it via one of these: https://www.adafruit.com/product/501
You will also need some basic soldering and wiring tools.
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
1) MOSFET: perfect... I'm not exactly sure how to work it, but I'll give it a shot ;p
2) USB POWER SUPPLY: Done.
My goal is to have about 8-10 toys on the table actually. I wish there was some sort of control board that would tie them all together.
Thanks again! You've been super helpful!!!!
2) USB POWER SUPPLY: Done.
My goal is to have about 8-10 toys on the table actually. I wish there was some sort of control board that would tie them all together.
Thanks again! You've been super helpful!!!!
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
...like this :D
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Proximity? Sensor? - on/off power
Unless you want them all to be synchronized, you will probably want one MOSFET per toy so you can open and close them independently. I'm not sure how many GPIO pins are on the Homework board. The Trinket only has 5. https://learn.adafruit.com/introducing-trinket/pinouts
But the Trinket Pro has plenty: https://learn.adafruit.com/introducing-pro-trinket
But the Trinket Pro has plenty: https://learn.adafruit.com/introducing-pro-trinket
- fuichris
- Posts: 21
- Joined: Mon Oct 27, 2014 6:07 am
Re: Proximity? Sensor? - on/off power
No need to synchronize, thank goodness ;p
TRINKET / PRO: I think I need to quickly put this order through first and work with my existing Parallax homework board (see pic), which I'm using one board per toy. But I can't keep thinking the dramatic size difference of the Trinket Pro! Let me work with what I have first and I'll do more research tmrw on the Trinket / Pro and see if I've got the brains to put it together myself.
http://www.parallax.com/product/555-28188
I wish i wish ...Trinket!
Thanks!!
TRINKET / PRO: I think I need to quickly put this order through first and work with my existing Parallax homework board (see pic), which I'm using one board per toy. But I can't keep thinking the dramatic size difference of the Trinket Pro! Let me work with what I have first and I'll do more research tmrw on the Trinket / Pro and see if I've got the brains to put it together myself.
http://www.parallax.com/product/555-28188
I wish i wish ...Trinket!
Thanks!!
- Attachments
-
- box contents - cropped.jpg (83.33 KiB) Viewed 895 times
Please be positive and constructive with your questions and comments.