Arduino Motion Sensor

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
HSISEAST
 
Posts: 6
Joined: Tue May 10, 2016 11:50 am

Arduino Motion Sensor

Post by HSISEAST »

Hi, my name is Baylee Lyles I am working on a project called The Flashing Stop Sign. I came up with an idea to do something about people not stopping at stop signs because this is a very big problem around the world. The Flashing Stop Sign is when a person comes up to the stop sign it will sense with a motion sensor that something is there, so it tells the person to stop. I am working with two of my classmates Dennis and Ben. We need help on which motion sensor we need and what size. Also, We need help on figuring out for example if the motion sensor, solar panels and LED is 5 volts each or do we add them up to see how many volts total we need? We have the code written for the arduino. Right now we are trying to figure out the size of the motion sensor we need. I noticed you have a motion sensor available for about $10 and it senses people and humans from 20 feet away. Do you think this would do the trick? We are also trying to get some suggestions on which led lights to purchase for this project. Would you have any suggestions? We will also need to add in a way to store the energy in a battery bank from the solar panels so they will still flash if it is cloudy. As much details as you can provide with parts suggestions and help would be great. This is my first arduino project and I am working with the city of Hot Springs to to get this done.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Motion Sensor

Post by adafruit_support_bill »

The Maxbotix ultrasonic rangefinder would probably be the best sensor for this application. It is not really a 'motion' sensor. It is a 'distance' sensor. But by comparing the sensed distance over time, you can tell if the detected object is moving or stationary.
We need help on figuring out for example if the motion sensor, solar panels and LED is 5 volts each or do we add them up to see how many volts total we need?
If they are all 5v devices, you can run them from one 5v source.
I noticed you have a motion sensor available for about $10 and it senses people and humans from 20 feet away.
The PIR sensor is good for detecting humans. It would not work well for automobiles. It also has a very long cycle time, so it would not work for detecting a brief 'stop'.
We will also need to add in a way to store the energy in a battery bank from the solar panels so they will still flash if it is cloudy.
We have a solar charger, as well as a variety of panels and LiPo batteries. Once you have designed your circuitry, you can estimate the power requirements and select a solar panel and battery with adequate capacity.

User avatar
HSISEAST
 
Posts: 6
Joined: Tue May 10, 2016 11:50 am

Re: Arduino Motion Sensor

Post by HSISEAST »

Thank you for replying. It helped our project a lot. We were wondering what type of LED's do we need? Does each color of a LED need a different amount of voltage?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Motion Sensor

Post by adafruit_support_bill »

You can use discrete leds. Each color has a different forward voltage. But you can run them all from your 5v source using appropriate current limiting resistors:
This guide describes how to calculate that: https://learn.adafruit.com/all-about-leds/overview

Another option is to use digital leds like Neopixels. These come in a variety of configurations ranging from individual LEDs to rings, matrices, strips etc.
https://www.adafruit.com/category/168
These can be programmed to display any color, and you can control all of them with a single pin on an Arduino or similar microcontroller.
https://learn.adafruit.com/adafruit-neo ... e/overview

User avatar
Hakugin
 
Posts: 119
Joined: Tue Oct 13, 2015 1:18 pm

Re: Arduino Motion Sensor

Post by Hakugin »

When I think Flashing Stop Sign my mind recalls a stop sign near my area that has about 2-4 LEDs on each of the 8 outer edges. Sadly I still see people running the stop sign regularly, however I feel one that only activates when it detects a car may prove to be more effective. You may have already taken some of this into consideration but I'd recommend considering some of the following points...

Enclosure:
How will you protect the electronics from any environmental damages?

LED placement:
Where will the LEDs be placed on the sign?
- Along the Edge?
- Within the word "Stop"?
- Maybe both?
This will help determine the number of LEDs desired.

LED Colors:
What color should the LEDs be? Which colors are most likely to be noticed?
Maybe have the LEDs change color patterns based on sensor input?

Allows you to calculate how much power will be required. Single color LEDs use less power than color-changing (RGB) LEDs.


Maintenance:
How easy will it be to replace any faulty components?
How will firmware/coding updates be applied?

This will make things easier later if something break or an upgrade is made.


Solar Panels:
Maximize the amount of time they receive direct sunlight
- Placing the panel in an area free of obstructions
- Keeping the panel clean
- Finding the right direction to point the panel when mounting (IE: North, South, etc)

I learned my lessons about solar panel placement the hard way thanks to a security light I installed on my garage. In short I was glad I bought a solar power security light that had a detachable solar panel.

User avatar
HSISEAST
 
Posts: 6
Joined: Tue May 10, 2016 11:50 am

Re: Arduino Motion Sensor

Post by HSISEAST »

Thank you for giving me questions to think about.

User avatar
HSISEAST
 
Posts: 6
Joined: Tue May 10, 2016 11:50 am

Re: Arduino Motion Sensor

Post by HSISEAST »

We are about to order the neopixles and are trying to decide which range finder would be appropriate for detecting a car from 40 feet away?

If that is not an option maybe it could detect a smaller distance of say 25 feet in all directions (360) so it could blink if a person is in the cross walk?

Also, we are a school so I noticed there is an education part to your site that offers a discount on some products. Would this be one of them?

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Motion Sensor

Post by adafruit_support_bill »

The Maxbotix ultrasonic sensors we carry have a range of about 20 feet. Infrared rangefinders have an even more limited range. To detect cars at 40 feet or more, you probably will need something like a laser rangefinder. There are more expensive than the ultrasonic options. But there are a few lower-cost units available these days - including the Lidar Lite:
http://www.robotshop.com/en/lidar-lite- ... =RB-Pli-01

For educational discounts, have your teacher contact [email protected] to set up an educational account.

User avatar
Hakugin
 
Posts: 119
Joined: Tue Oct 13, 2015 1:18 pm

Re: Arduino Motion Sensor

Post by Hakugin »

HSISEAST wrote:We are about to order the neopixles and are trying to decide which range finder would be appropriate for detecting a car from 40 feet away?

If that is not an option maybe it could detect a smaller distance of say 25 feet in all directions (360) so it could blink if a person is in the cross walk?

Also, we are a school so I noticed there is an education part to your site that offers a discount on some products. Would this be one of them?
I'd recommend making a new topic, if you haven't already, for better visibility and assistance.

User avatar
HSISEAST
 
Posts: 6
Joined: Tue May 10, 2016 11:50 am

Re: Arduino Motion Sensor

Post by HSISEAST »

Thanks for the information. If we went with one that would detect at 20 feet. What would you recommend?

Also, I am looking at parts in order for it to be solar powered and I want to make sure I purchase the correct parts. Looking at:
Colossal 6V 9W Solar Panel - 9.0 Watt PID: 2747
Neopixles pid: 1376
2pin JST SM PID: 2880

Confused on what type of battery we would need and what other circuitry we need in order to set it up so the panel will store to the battery and auto detect that if there is not enough sun then to use the battery as a back up.

Thanks for your help. My students are super smart, but they are only 5th and 6th graders so we need a little guidance.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Motion Sensor

Post by adafruit_support_bill »

We carry a number of ultrasonic sensors from Maxbotix: https://www.adafruit.com/categories/57?q=maxbotix&
For long-term outdoor use, I would recommend this one: https://www.adafruit.com/products/1137
For a proof-of concept type application, the non-weatherproof versions can work as long as you protect them from getting rained on.
The main difference between the different models is the beam pattern and the resolution. You can see the beam patterns here.
http://www.maxbotix.com/pictures/LV/LV- ... tterns.gif
Since cars will be approaching from a known direction, a fairly narrow beam pattern like the EZ3 or EZ4
https://www.adafruit.com/products/982

To control the sensor and neopixel, you will need an Arduino or something similar; https://www.adafruit.com/products/2488
And In addition to your solar panel, you will need a solar charger: https://www.adafruit.com/products/390
And a LiPo battery. It is hard to predict what kind of capacity will be required. It is probably better to estimate on the high-side.


Assuming that you have 30 pixels flashing red for 10 seconds out of every minute with a 50% duty cycle. That is 10 minutes of flashing per hour at about 300mA of current draw. Over 24 hours, that is a total of 4 hours of flashing or 4h x 300mA = 1200mAh.

You will also need about 720mAh per day to run the Arduino and other circuitry. That brings the total to about 1920mAh

Assuming that it will spend 1/3 of the day charging up and the rest running from the battery, a 2200mAh cell should give you a bit of a safety margin.
https://www.adafruit.com/products/1781

If you think that it will spend more time flashing than my estimate, you may want to select a larger capacity battery.
https://www.adafruit.com/categories/574

User avatar
gowthamram
 
Posts: 2
Joined: Mon Sep 24, 2018 7:12 am

Re: Arduino Motion Sensor

Post by gowthamram »

We Have Maxbotix Ultrasonic Rangefinder - LV-EZ1 - LV-EZ1. This sensor does not give exact values ​​after some cycles and The values ​​do not increase or decrease.There is no change in values, even if the distance is increased or decreased.Please give me the solution to how to fix this issue.

User avatar
adafruit_support_bill
 
Posts: 88088
Joined: Sat Feb 07, 2009 10:11 am

Re: Arduino Motion Sensor

Post by adafruit_support_bill »

@gowthamram - please post some details and or photos of your application. As well as the code you are using and samples of the output.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”