Parking Lot Help Request
Host-free low latency notification system to alert attendants in a parking lot or facility that customers need assistance.
To run this project yourself you'll need to:
- Purchase the necessary hardware and configure it.
- Configure Notehub.
- Configure the project's Notecard.
- Set up a Twilio account and configure the data to route from Notehub to Twilio.
- Optional: Weatherproof your hardware for field testing.
Hardware
The following hardware is required to run the Parking Lot Help Request application.
- Notecarrier A with pre-soldered headers
- Cellular Notecard (LTE Cat-1 versions are highly recommended)
- Sparkfun RGB LED breakout - WS2812B
- Twidec 12mm momentary push button with pre-soldered wires
- LiPo battery
- Solar panel with JST connectors (any of these are compatible) (This 3W model is the one used in the project)
- Breadboard
- Male-to-male jumper wires
- Break-away 0.1" pin strip male headers
Optional additional hardware
This plastic enclosure is for boxing up the hardware for field testing after assembly. See the Optional Hardware Weatherproofing section at the bottom of this README for instructions.
Hardware Assembly
-
After purchasing your hardware, use the Notecard and Notecarrier Quickstart documentation to assemble your Notecarrier A and Notecard - don't worry too much over connecting to Notehub: this document will cover it shortly.
-
Break off 3 male pins in a strip and solder to each side of the Sparkfun LED breakout. (This video from Adafruit provides a good example of how to solder male pins to a board like the one the LED comes in.) These pins will allow the LED to sit in a breadboard and easily interact with the Notecarrier through jumper wires.
-
Cut a male jumper wire in half and use a wire stripper to strip at least 1/2" of coating off of both the ends of the jumper wire and each wire connected to the Twidec push button. Also snip off the soldered tip of the button's wires so the filaments are free floating. Notice that both the button and jumper wires are exposed for soldering, also there's a length of heat shrink on both button wires that will be used to cover the soldered portion of wire later.
-
Use the "Western Union" X-style of wire splicing to wrap the exposed jumper wires together with the Twidec wires and solder them together. Cross one wire over the other, wrap together until no wire remains unwrapped. A helping hand tool made soldering the jumper wire and button wire together much easier.
-
Add a short piece of heat shrink tubing to each wire before soldering the wires together.Solder the wires. After soldering is complete, slide the heat shrink down over the exposed wires and use a heat gun to shrink the wrap down to and protect the wires from the elements and electrical shorts. If heat shrink tubing is unavailable electrical tape can be substituted. (A great video that shows how do all of this, splicing through heat shrinking, is available here.) The heat shrink has been shifted over the newly soldered wires - now to shrink it with an application of the heat gun. The finished button with its newly added jumper wires on each end, and a protective coat of heat shrink to hide the wires.
-
Slide the LED into a breadboard.
-
Attach the Notecarrier A to the breadboard by plugging a jumper wire from the A's
GND
pin to the-
bus on the breadboard. Notecarrier A's GND pin to breadboard's negative bus (-). -
Attach the Notecarrier A to the LED breakout by plugging jumper wires into its headers in the following configuration:
VIO
➡️V5
on LEDAUX2
➡️DI
on LED- Breadboard's
-
bus ➡️GND
on LED Notecarrier A VIO pin to V5, AUX2 pin to DI, and negative bus to GND of LED breakout.
-
Attach the newly soldered button wires to the Notecarrier and breadboard:
- Red wire ➡️
AUX1
on the Notecarrier A - Black wire ➡️ breadboard's
-
bus
- Red wire ➡️
-
Plug the LiPo battery and solar panel into the Notecarrier A's JST connectors for each piece of hardware This hardware is assembled: Notecarrier, Notecard, LED, button, LiPo battery, and solar panel.
-
Now it's time to configure Notehub and the Notecard!
Notehub
The Parking Lot Help Request project runs with the help of Notehub. As such, to run this app you’ll need to create a Notehub account, and start a new Notehub project.
Creating a New Project
- Sign up for a free Notehub account, if you don’t have one already.
- Click the blue Create Project button in the top-right corner of the screen.
- Give the project a name, such as “ParkingLotHelpRequest”, and then click the Create Project button in the modal.
Once your project's created, copy the product UID down somewhere: you'll need it to program the Notecard in the next section.
Optional: Grouping Devices By Fleet
Notehub has the option to store groups of devices by fleets, which is useful for organizing similar groups of devices and storing project settings that need to be shared and synchronized across devices.
For this project, you can group devices by something like "Lot Location" or "Garage Level", simply by updating a project's fleet name, and assigning devices to that fleet.
Notehub creates an initial default fleet for you when you start a new project, and you can use that as your starting point.
-
Inside your Notehub project, navigate to your fleet in the navigation menu, and then click the Settings link.
-
Inside Settings, change the Fleet name input to something more useful (like "Lot L" or "Floor 3" for all devices in that particular lot)
-
Then click on the Devices link to see all the devices associated with that Notehub project.
-
Double-click the device you're currently configuring.
-
Update the fleet that device is assigned to by using the dropdown.
-
You can also rename the device from this page if you need to update its parking spot number in the same way.
With this, your Notehub backend is fully configured, and you’re ready to start setting up your Notecard.
Notecard Firmware
This is a "host-free" project because the Notecard itself can be configured to send notes to Notehub when the button is pressed. It may sound simple, but this is a pretty big deal. Typically, a host microcontroller is necessary to process logic like "when a button is tapped something else (sending a note to Notehub) needs to happen." The fact that Notecard can do this without a host means big savings in terms of necessary hardware and necessary power-usage the device needs (microcontrollers tend to be resource intensive).
To set up the Notecard, refer to the README.md
file in this project's firmware
folder for full instructions under the Configure the Notecard section.
Twilio Firmware
Once help requests (button press events) are being successfully sent to Notehub from the Notecard, the requests will need to be routed out of Notehub to Twilio for SMS alerting.
See the firmware
folder's README.md
once more for complete instructions to format the button press events and send them to Twilio. The section Transform Notehub data with JSONata for Twilio has all the details you should need.
Optional: Hardware Weatherproofing
If you want to field test your help request button in a more real-world setting, you'll need an enclosure to secure all the various pieces and keep them safe from the elements.
NOTE: This step is entirely optional. Please do not undertake it until after you've determined your hardware works correctly.
For such a situation, we typically recommend a plastic junction box similar to these. They are relatively inexpensive, come in lots of different dimensions, are dust and waterproof, and can have holes drilled in to them for wires with standard power tools.
As mentioned in the hardware list at the top, an ABS plastic junction box with the dimensions of 8" x 4.7" x 2.2" was used.
-
Once you have your box, take a power drill and 1/4" drill bit to drill a pilot hole in the center of one of the short sides of the box (this will be where the button will eventually go).
-
After drilling the pilot hole to keep the plastic case from cracking, use a 1/2" drill bit to drill a hole large enough for the button to fit in snugly.
-
Use an Xacto knife to clean up any loose bits of plastic around the hole's edges.
-
Unscrew the gasket and hex nut from the top of the button, thread the wires through the hole, and if the hole's the right size, the button head should sit snuggly. Rescrew the hex nut to keep the button in place.
-
Now, reassemble the device inside of the plastic enclosure. Tape or glue everything down to keep the hardware secure. (Make sure the LED NeoPixel and solar panel are visible so the device can recharge itself and display to users the help request has been sent.)
-
Screw the plastic top on, tap the button to make sure everything works, and go forth and field test.