Hamshield Motion Detector

I took a slight detour off of the APRS project I previously mentioned to show off the immediate capabilities of the Hamshield Mini. While I preached its battlefield capabilities, the goal of APRS is much more impressive. In this post I plan to dissect how I made it.

One day you’ll grow…

BLUF: PIR + Hamshield Mini

I cobbled arduino code with some open source PIR sensor code and made it auto-report. That simple. My code is on github, you need the hamshield and dds libraries. Here are some pictures:

The Setup

The entire setup runs off of an Anker phone charger and a recently-deceased mouse cable. The hamshield is awfully soldered on top of the 3V3 Arduino Pro Mini, and the PIR sensor joins in on the hackneyed fun. Getting the Hamshield Mini to connect was probably my biggest obstacle, so here’s a general schematic I used to connect it:

This will work for most Hamshield examples.

It works. Don’t know exactly why, and don’t really ask questions.

The Code

I used this example for AFSK and modded it to auto-report without a serial input. I then mashed it with a PIR tutorial, cut off anything unnecessary, and compiled it. The github is posted above, but really it checks for a “high” read from the PIR, then sends the code if motion is detected.

The Future

In theory, for APRS I’ll just have to disconnect the PIR sensor, add a GPS, and auto-report position. Wrong. Hamshield has a weird way of forming packets that will take me quite a while to figure out. Eventually I can add telemetry - altitude, pressure, all to a data format. I hope this article helped you get to the fledgling stages of the Hamshield Mini; truly I may never fully realize this thing’s potential.