element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Arduino (attiny 85) sensor triggered carnival-style light bar question
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 15 replies
  • Subscribers 403 subscribers
  • Views 1413 views
  • Users 0 members are here
  • lighting
  • led
  • arduino_development_environment
  • arduino
  • atmel
Related

Arduino (attiny 85) sensor triggered carnival-style light bar question

Former Member
Former Member over 12 years ago

Hi everybody, I'm very much a "maker", and I know electroinics and have some familarity with Arduino, and have a general question and would like to dip my toe in the water per-se to see if what I would like to accomplish is can be done with relatively low cost.

 

I run my dogs as part of an agility troup here in Michigan in the United States. For those unfamilary with the sport, we find ways to burn off our dogs energy while getting them and ourselves some exercize. Pictured below is one of my Welsh Pembroke Corgi's jumping a hurdle.We perform our shows for charity at both indoor arenas as well as outside fairgrounds.

 

Our group consists of small dogs (like Ben, pictured) that generally clear the hurdle with only an inch or two of distance, to much larger dogs, where their feet still clear the hurdle by a bit, but the dog's body goes over the hurdle by perhaps a foot. (so a fairly large distribution of hurdle clearance differece)

 

So here is what I could like to accomplish:

 

When a dog clears the jump, I would like to have one strip of addressable LEDs on mounted to each side of the hurdle light up in a way similar to the old carnival "he-man" attractions where a person swings a mallet hitting a target pad, which usually sending up a weight upwards to hit a bell, but in later versions just had lights that sequentially and additively lit up a bar of lights to indicate success.

 

A couple ways I'd like to consider approaching it:

 

#1: I could use an ultrasonic sensor mounted to the base and when a dog passes over the hurdle, the sensor measures the distance and lights a number of the LEDs light up in sort of a sine wave up-and-down look (greater height more leds are light up and then down). The problem I see with this approach is the width of these jumps is about 3 feet and I wonder if a dog jumping the hurdle close to one end will trigger the sensor. Maybe two sensors? Ideas?

 

#2: I was thinking about using some PIR sensors like shown here on ebay They are cheaper, but I wonder if they can be used in direct outdoor light. They don't need much sensing accuracy, and it is possible to mount the sensor about half way up one of the sides, again triggering when any size dog passes over the hurdle.

 

Ideally, I'd like to be able to get a day's worth of jump time out of a 9-volt battery, or maybe put in a 3S 12v rechargeable Li-Po battery. In any given day, there is going to be much more idle time than actual time where the LEDs are going to be on.

 

Finally, to conserve costs, do you think this project can be ported to an ATTINY 85, then the cost per hurdle would be significantly reduced.

 

Probably my biggest concern is being able to sense something under lots of direct sunlight, then next battery life.

 

General thoughts or ideas?

 

Roger

 

 

image

  • Sign in to reply
  • Cancel
  • billpenner
    0 billpenner over 12 years ago

    Just a couple of thoughts; Consider putting a series of Infrared LEDs and corresponding IR sensors on the oposite post to detect the highest point. Use Ir filters on the sensors to minimize the ambient light effect. The  display LEDs could be driven by an Arduino or logic gates & transistors for a simple design.

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to billpenner

    Roger

     

    Yes its possible, and Bills suggestion would work better than a PIR.

     

    The Digispark is the device you may wish to use, since it uses the Arduino IDE, but you can also remove all the extra bringing it doen to a simple ATtiny85.

    The firums are also very helpful and specific to the ATtiny85.

     

    www.digistump.com

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago

    Thanks Bill and Mark. I was really hoping for a single mount solution. Running a series of IR transmitters and receivers up the side walls wouldn't be as practical a solution as an all-in-one, where I could have the battery, sensor, and circuit all in one box. I suppose I could do some tests with mounting. As second thought, perhaps mount at the side on a 45 degree angle?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to Former Member

    Bill

    The height detection is the issue.

    You'll need sensors to detect the height, but they could be fitted into PVC pipe that attaches each side..

     

     

    A ping sensor mounted above might work, and can be set for the maximum distance to be just short of the box.

    You can store the shortest reading, and then do the calculation afterwards, since the animal is moving relatively fast.

     

    You'd need to check on the angle of the send and receive (approx 15 deg), to ensure proper coverage.

     

    This could allow it to be single sided, albeit with an arm over the top.

     

    You could also have one pointing at the oncoming animal, and when it gets to within x the leds come on.

    Using a low powered 433MHz tx, you could have the 2nd, 3rd, etc triggered on from the first jump, rather than each having an oncoming ping sender.

     

    They are low cost http://yourduino.com/sunshop2/index.php?l=product_detail&p=182

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago in reply to mcb1

    You know what Mark, that may be the answer. The dogs move so quickly, that if the distance is set very short (maybe an inch or two), I could program in a delay of 500ms before lighting the LEDs. Frankly, by the time the dog gets that close, he's committed to the jump anyway, so he's going over. The spectators eyes won't notice the difference. I do like that idea better.

     

    So, on to the code for the leds in a "carnival style light bar", I assume the HL1606 is the ones to use -- they have the 5050 leds which are the brightest?. I poked arround and there is arduino code out there -- I'll have to play around a bit I'm sure to make it work the way I want... something like (within a 3 foot lengh) light 1 foot of leds green, then also light another foot this time make them yellow, then finally light the last foot worth and make them RED. all lit in about a second for effect....

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to Former Member

    Rodger

     

    A video looking at the side might help decide what speed/delay to use.

    At least its repeatable, unlike the 4 legged jumper.

     

    Sorry never played with led strips, so couldn't advise on that.

    You might want to experiment, as sometimes there is very little increased light for the extra current drawn.

     

    You may also want to consider the background colour, as the white will tend to hide a yellow coloured led.

     

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billpenner
    0 billpenner over 12 years ago

    Ultrasonic sensors would certainly be a less complex solution. Consider using at least three of them though. Since the dogs are not confinev to the center of tthe hurdle, the angle of the ultrasonic beam between the sensor and the anamil will affect the accuracy of the reading. Also use the greatest height practical to improve the accuracy..

    The lowest sensor reading would indicate the highest jump. The idea of using the sensor to indicate the approach of the jumpper is a great..Tthe ramp of the display LEDs could be adusted easily using a counter/decoder IC such as the CD4017 or other counter.For a LED driver a up/down counter could create a ramp up/down with a simple 555 counter and some simple logic or programming via the Arduino.

    If this doesn't make sense, I can elaborate.

    best luck on this project.

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to billpenner

    Bill

     

    You might want to look at using these, instead of 4017, etc.

    http://digistump.com/products/1

    You will need a processor to deal with the ping sensor anyway, so you may as well include it.

     

    I did realise the higher the animal jumps the closer it gets, but given the pictured animal I don't think thats extremely high before it gets vertigo.

     

    The limited play I had with a SR04 (the basic) it detected 1cm/04 inches.

     

    It could be possible to use two at an angle and do some math on the result to work out the final height.

    Do't ping them at the same time as they'll interfere.

    The formulas state how long it takes for the ping to travel AND return, and how long the tx 'rings' for (which determines the shortest detection time) I just can't recall them.

     

    One issue you'll need to sort out is the measurement will be the highest point which is likely to be the head.

    You can average to eliminate, but the shorter and faster the dog, the more error may creep in.

     

    One possibility may be a sideways looking one that once its triggered then the height reading is taken.

    I would think this would be consistant.

     

    Using some RF on the first or last jump, you could also detect the time to complete the jumps.

     

     

    Cheers

    Mark

     

     

    However I think a video taken looking across the jump while a range of animals jump, might be your best research tool, .... before looking at possible solutions.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • billpenner
    0 billpenner over 12 years ago in reply to mcb1

    Mark:

    You can tell how long I have been out of the mainstream of the business since i recommended old TTL logic instesd of current devices. Thanks for the DIGISTUMP reference.

    Much better Idea!

     

    Roger

    :Do you want to monitor ALL hurdles or just one? also do you need to record/print each jump for comparison orjust display the height of each jump with the led display?

    Will the display reach the top on every jump or just go up an relative amount to indicate the height jumped?

    You might also consider a 7 segment numerical display for the results. Some quite large ones are available.

     

    Also for consideration: From the spec sheet......

     

    The HC-SR04 ultrasonic sensor uses sonar to determine distance to an object like bats or dolphins do. It offers excellent non-contact range detection with high accuracy and stable readings in an easy-to-use package. From 2cm to 400 cm or 1” to 13 feet. It operation is not affected by sunlight or black material like Sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module.


    Features:

    • Power Supply :+5V DC
    • Quiescent Current : <2mA
    • Working Currnt: 15mA
    • Effectual Angle: <15°
    • Ranging Distance : 2cm – 400 cm/1" - 13ft
    • Resolution : 0.3 cm
    • Measuring Angle: 30 degree
    • Trigger Input Pulse width: 10uS
    • Dimension: 45mm x 20mm x 15mm

     

     

     

    I seem to remember that there is a minimum delay time between measurements but I can't seem to find it.

    Sorry, just rambling..

    Bill

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 12 years ago in reply to billpenner

    Hi Bill,

     

    What I'm trying to do is much simplier. It doesn't matter what height the dogs go over the hurdle -- I would have all the leds go off sequentially to the top one for effect anyway.

     

    By the images below, it seems that the middle one -- with sensors mounted at an angle -- would provide the most coverage. Now, I would prefer to use a single sensor --  perhaps pointed toward the dogs

     

    image

     

    Now, I would prefer to use a single sensor --  perhaps pointed toward the dogs as below. I would be curious if the ultrasonic sensors target angle is more conical than flat. If so, the sensor could commit at "t", which would be some particular distance, then fire the leds in sequence up the side and down again. The only thing that I would like to do is have the leds fire roughly when the dog passes over. This is really only my idea to create an effect. It doesn't have to be perfect, and it doesn't have to be accurate, but I'd like to do it in a cost effective way that catches all the dogs as they jump over. Probably the hardest thing is that most shows are outside with lots of ambient light, so I've pretty much ruled out infared sensors, thinking ultrasonic is better.

     

    image

    I hope the pictures help explain it better.

     

    Roger

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube