1 / 4
XRP Robot Thermal Motion Tracker — zdjęcie 1
1 / 4

XRP Robot Thermal Motion Tracker

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

Your robot can “see” warm bodies.

Ocena
0 / 5
Polubienia
1
Pobrania
10
Wydruki
0
Wyświetlenia
232
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Kategoria
RC & Robotics
Licencja
Creative Commons — Attribution — Noncommercial

Materials Needed

2 – HCSR501 PIR sensors
4 – M2x25mm hex head cap screws 
      (if you get M2x30mm screws the extra length can be cut off)
4 – M2 hex nuts
1 – M2x10mm hex head cap screw (for seating hex nuts into the nut traps)
2 – Servo Extension Cables
CA glue (superglue)

Tools

1.5mm Hex driver or Allen Wrench

A Useful Addition

2 -- XRP Robot Running Lights or LED indicators

Discussion

A couple of PIRs (Passive Infrared Receivers) can allow the XRP robot to see and track infrared sources.  The heart of this capability is a PIR Motion Detector.  Do an internet search and order two HC-SR501 PIR sensor modules. 

The printed cones limit the sensor’s field of view so that a second source way out on the side won’t confuse the sensor.  The shells block the individual sensor module’s field of view to a side view and straight ahead.  If the sensor sees thermal movement it outputs a one “1” (high logic).  If there is no motion the output is a zero “0” (low logic level).  And, since the robot can move, even a stationary warm body can have an apparent motion to the robot. 

Tracking then becomes simple.  If the right sensor outputs a “1” and the left sensor outputs a “0”, the object is toward the right so turn in that direction.  Likewise, if the right sensor outputs a “0” and the left sensor outputs a “1”, the object is toward the left so turn in that direction.  And, if both sensors are outputting a “1”, the source is straight ahead.  A “0” output from both sensors indicates that nothing is within the field of view.  In this case you might turn the robot to look somewhere else.

HC-SR501 Set-Up

Once installed you won’t have access, so initial set-up is important. 

The yellow jumper shown on the left is in the single trigger mode.  Move the jumper to the back two pins for repeat trigger mode so the output will remain high as long as there is motion.  The left orange pot is the sensitivity; turning it clockwise to the limit increases sensitivity (range).  Try various positions if you get false triggering.  The orange pot on the right is the time delay.  Turning it counterclockwise to the limit minimizes the time delay before a new observation is available (how long a logic “1” remains after a detection).  Make sure you’ve turned these potentiometers (pots) to the limits for high sensitivity, quick responses and shortest hold times.

If you’re brave, you can (operate on and) modify your HC-SR501 sensors to further reduce the time delays and dead times before another object is sensed.  Looking at the attached “HC-SR501 data sheet” the 1Meg pot labeled RT1 controls the time delay but has a 10k resister R13 in series.  If you solder a 1k resistor on top of (i.e. in parallel to) R13 you can get time delays (hold times) less than a second.  (Note: on the modules I obtained, the series resistor R13 is connected to the other side of the pot and connects with pin 4 of the BISS0001 integrated circuit).  The trigger inhibiting time is determined by the 1Meg resistor R33 connected to pin 6 of the BISS0001, so soldering a 100k resistor on top (in parallel) will reduce the dead time.

Constructing a Wiring Harness and Power Source

The HC-SR501 operates from 5-20V.  There is an internal 3.3v regulator and series diode in the module.  So, supplying 3.3v from a Qwiic expansion port won’t make it happy.  You’ll need to tap into a higher voltage power source for operation on the XRP.  You have options:

  • Solder a power and ground wire to the battery holder or connector.
  • Use the 5 volts available on the Servo Connector through another one of the Servo Extension Cables .
  • Tap the 5v from the USB connector in the Raspberry Pi Pico W using a USB charging pigtail (micro B USB pigtail) when you aren’t using that port to upload a program.
  • Use a separate 9v transistor battery (with the snap connections) and a 9 volt battery pigtail .

You will need to make a “Y” cable “harness” (plus the power connection) so that a single Expansion Header on the XRP can handle the outputs from both PIR sensors.  Cut off the male end of two servo extension cables and you’ll have a 3-pin connector that fits the HC-SR501 with a length of cable.  Buy a Qwiic cable from SparkFun and cut it in half. Now, along with the two wires from your power source choice, connect the ground wires together.  Connect the power wires together except the one from the Qwiic pigtail.   Finally, connect the output signal from each of the HC-SR501 modules to an IO wire on the Qwiic cable.  Double check the various wires so they don’t get crossed (the PIR connections are different than servo connections.  The PIR sensor connection labels are printed on the back of the tracker’s base for reference when plugging in the cables. 

Printing

I used a 0.25 Z-step, 15% honeycomb fill, 2 perimeter shells and 4 top- and bottom layers.   Support will be needed for the center of the dome and the HC-SR501 module cut-out in the shells.  I would recommend printing the shells and the cones in black or a dark color to minimize reflected light.  The XRP peripheral clip should have support turned on and may need a couple millimeters of brim added if there are adhesion problems. Note: this is printed as a separate piece for strength (print grain running around the clip instead of relying on layer to layer adhesion strength).  The peripheral clip will be glued to the PIR base using CA (superglue).

Assembly

Seat the M2 nuts into the traps in the back of the base section.  (Insert the M2x10mm screw, start the nut, and cam the nut into the trap using the hex driver).

Screw the long M2 screws in to the holes in the shell (hopefully it’s a tight fit, so screw them all the way in).  Line the PIR sensor up with the screws so the 3-pin connector is under the covered portion of the shell, then slid the PIR board into the shell.

Slide the shell and PIR assembly into the cone lining up the screws and the cable connector hole.  (It took me a couple tries myself).  (I also found that balancing the PIR sensor on the posts at the bottom of the cone and sliding the shell/screws into place also worked).   Then insert the screws from the shell, PIR and cone assembly into the holes in the base plate (again while lining up the cable holes) and tighten the screws.

Finally, glue the clip onto the base using CA glue.

When you plug in the cable harness through the base, note the ground (GND) orientations.

Coding Hints

The IO lines need to be set for data input (in the XRP Expansion header you choose) during the program set-up.  Note that the outputs from the HC-SR501 modules are only known to the computer, when using this tracker, unless you provide some external indication.  A good solution is to build a pair of “XRP Robot Running Lights or LED indicators”.  Then, inside the program read loop, when the output of the HC-SR501 is obtained it is immediately output to the appropriate LED before using the data for any other purpose.  Now the LEDs tell you what the motion sensor sees.

Operation

There is a couple minute warm-up period for the PIR sensors after power is applied (internal capacitors need to charge with long time constants).  Some PIR sensors are more responsive than others and residual resistance in the time delay pot (plus that pesky series resistor) can lengthen the hold periods after a thermal object is gone from view.   Constructing the Robot LED Running Lights and setting up the code loop to turn on an LED when the IR sensor triggers will provide a “feel” for the PIR time responses.  This timing information will be useful in programming the robot for accurate responses to a thermal stimulus.

The HC-SR501 has time delays of around 5 seconds with the pots set as previously indicated (if no modifications have been made).  A logic “1” output is held for that period after the thermal stimulus is removed.  Also, there is about a 3-5 second delay before the HC-SR501 can trigger on a new thermal stimulus.  A control program will need to account for, and compensate for these time delays and dead times.

Tagi