0

I've had an idea for an Arduino project, but I'm not sure where to start. My idea is this: have an Arduino Nano connected to an HC-SR04 ultrasonic sensor, as well as an nRF24L01+ radio. This will be the tripwire module, which will send an alert to a second Arduino (connected to another nRF24L01+ of course) whenever something passes by.

This wouldn't be a stationary unit, it would need to be able to be placed and sense in a variety of locations so the distance would need to be set on power up.

Another issue I'm running into is getting the nRF24L01+ units to work for this purpose. I want to know that the units are wirelessly connected, so having a packet sent every second or so lets the receiving unit know that they're connected, and an additional packet for the tripwire trigger sets off an indicator led.

Is this even possible?

  • You might find a pir sensor cheaper on $$ and power consumption if battery powered. – Hayden Thring Aug 30 '15 at 0:49
  • Welcome to Arduino StackExchange! This sounds like multiple questions to me. The only real question there: "Is this even possible?" would have the answer: Yes. If possible, reword it to fit more into the question-and-answer format that StackExchange uses. – Nick Gammon Aug 30 '15 at 1:01
1

This sounds very doable. The first point, tuning the distance threshold at startup, could be done with a bank of DIP switches or a potentiometer on an analog pin to set the value. You might include some startup code continuously pings the transducer and displays the result on an LED, until you press a button to tell it "use this".

The second, is a very typical communication technique - sending "hello" packets periodically to confirm that communication is up. In your case, the same packet could carry a hit/no-hit bit within it.

  • 1
    It would be easier and faster just to send triggered/not triggered status every second. – Avamander Aug 29 '15 at 17:49
  • Just have it trigger, whenever the distance changes by more than x amount. That way there is no need to initialize, and it would also update if the surroundings change (e.g. someone places a trashcan in the path of the sensor) and doesn't just dumbly report a trigger all the time (instead of only when someone passes in front of the trashcan in the example). – Gerben Aug 29 '15 at 19:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.