Hi! My name is Gabe.
I want to create a geotracking app/website for my father’s dumpster company. This tracker and software would:
- Track how long a box has been at a particular address
- (Within app) Estimate and visualize price of box + delivery based on distance travelled and size of container - using concentric “value circles.”
- (Within app) Plot on a map where every box is, whether on site or at a reserve lot and how much money it is making on a daily basis.
- Autofill addresses once lack of movement is detected for 30 minutes - 1 hour (anywhere other than reserve lot; where the dumpsters are stored) and auto-start calculating profit from box from 30 minutes or an hour at standstill to pickup date + a charge for any additional days once button is clicked to confirm ‘Delivered.’
Here’s the Hardware I think I need:
- Raspberry Pi Zero Wireless
- Long Antenna-based GPS Module with USB or UART connector
- OTG cable (to connect USB to UART converter)
- Prolific PL2303 USB to UART converter (to connect to the RX and the TX terminal of the GPS module)
- Jumper Wires (female-to-female, to connect RX and TX port of the GPS module with the USB to UART module.)
- Portable Wifi Dongle (to provide the connectivity on the go. The device will travel along with the circuit to provide regular internet connectivity.
- USB-A to microUSB cable (to power Rasberry Pi Zero W)
- Power Bank
- Container (to encapsulate the entire circuit from rain and dirt).
Software:
¯_(ツ)_/¯
Currently, I am learning Elixir. I want to stretch myself with this project to better my skills. I am likely months away from beginning this project because I have zero idea of what to do on the software side. So I have turned to you all:
6 Likes
I accidentally clicked submit: Here’s the rest - Hi! My name is Gabe.
…So I have turned to you all:
What technologies will be involved in this project? Learning resources?
Thanks for your time.
2 Likes
Hey @Aptissimo welcome!
Kudos on the ambitious project! Wherever you end up in terms of what you actually build, I am sure you will learn a lot along the way.
The first thing I’d do is separate the problem into two parts:
- Information you need to collect at the “edge”. This is the actual GPS data related to each dumpster.
- A service on the web (probably in a cloud) that these GPS devices provide information to for processing.
Edge Hardware
In general you want to offload as much computing and data processing to the central service as possible, because that won’t be operating off of a battery.
To solve for #1, I would strongly suggest NOT trying to roll your own hardware. I’d pick an off the shelf GPS tracker for a few reasons:
- Battery life. The absolute killer of these sorts of solutions is that if your device won’t last long enough, you gotta go out in the field to switch it out. The more often you have to do this, the bigger a pain.
- Cost. There are logistics / supply chain optimized devices that are going to come in a lot cheaper than your raspberry pi + hardware.
- Durability. These devices will need to work in rain, snow, and the heat of the sun. A hand rolled device is going to become a support headache when they fail in these conditions.
An important caveat: If you want to use a Pi Zero to prototype this, by all means go ahead! I just don’t recommend hand rolled hardware packages for deployments beyond a handful of locations for the above reasons.
Cloud Software
For the cloud though, by all means choose Elixir and probably Postgres as your database to collect, store and analyze this information. Unless you really want to dig into the “DevOps” side of the world I’d consider picking something fly.io or similar managed deployment service that you can mostly just push code to and watch it run.
Postgres has excellent support for geo data and geo data processing via the postgis extension. Most managed postgres services will include the postgis extension so it should be readily available for you.
Before I can offer more advice on this front though I need a bit more information about where you are in your general software development journey, and where you’re at with Elixir.
Have you built a web server before of any kind? Have you used a database like postgres before? What are you currently using to learn Elixir, and how much have you covered?
Sounds like a fun project!
8 Likes
All agreed here.
Interestingly there’s an Elixir place called Corvus that does insurance and one of their things is insuring the contents of shipping containers and I believe they use GPS trackers that are very likely just white labeled from a manufacturer
Remember it’s the “tracking and calculating cost efficiency of equipment” business, not the GPS tracker business.
Looks like a fun project.
First question, why the dance with all the hardware to connect the GPS module if it has USB? Wouldn’t a USB to Micro-USB suffice?
I have started a similar project a couple of years back, and ultimately selected a LoraWAN-based tracker and the Things network to get the information back. That is if you need the information in semi-realtime. If you are just going to store it and read when the box returns that’s a different story.
1 Like
Cool project!
Regarding hardware;
I assume Wifi will suffice to get it connected online?
I see no problems with the hardware setup - Just keep in mind the power consumption (160mA when only wifi peripheral is turned on). 160mA @ 5V = 0.8W.
A small motorcycle battery for $30 would be able to power the device for about 78 hours. (5.3Ah @ 12V = 63.6Wh)
Found this this DC-DC converter (12V to 5V) -. https://www.amazon.com/PlusRoc-Waterproof-Converter-Compatible-Raspberry/dp/B09DGDQ48H?th=1
Just noticed that your bill of material includes conversion between USB - UART? Perhaps you are able to use the existing UART available on the Pi Zero - https://i.pinimg.com/736x/a7/ec/eb/a7eceb182550d83500fcfe84afe5a31e.jpg (GPIO 14 and GPIO 15)
I have no opinion regarding the cost, I guess its a question about alternatives.
Have seen plenty of Pi-setups outdoors working for ages used to monitor the Coast and sending pictures - so that surfers know if there is any waves.
How I would approach this assumes the use of your hardware setup.
Software;
I dont think you are months away from getting a proof of concept done.
Server side -
Elixir/Phoenix/Ecto with Postgres (and postgis extension).
Phoenix - https://www.phoenixframework.org/
Ecto/Postgis - Get started with Postgis and Ecto - Tutorials and screencasts for Elixir, Phoenix and LiveView took the first one I found that seems to cover enough initial information.
Perhaps use leaflet (https://leafletjs.com/) for visualizing the positions on a map.
Client side (raspberry) -
Simple python-script sending gps-data to server once every half hour with the help of cron jobs. (Cron Jobs: The Complete Guide for 2024 - just took the first article I found on the topic that looked like it covered the basics)
To send http-requests Requests: HTTP for Humans™ — Requests 2.32.3 documentation
To read the gps-data from serial pySerial — pySerial 3.4 documentation
The business logic - as others already mentioned, is something that I would implement on the server side. If I understand you correctly you should have all the data that you need if you store your gps-data with datetime-data.
Just as I said initially - The effort to just get going and sample gps-data is simple and I would guess that if just follow the basic example in the Phoenix framework guide and then try to apply the information from the ecto/postgis guide - I would guess a couple of days before you have a proof of concept running.
Keep us updated, would be cool to see how this project evolves
1 Like
Should probably be ashamed for not mentioning nerves on the client instead of python 
Something that could be of interest is the following setup on the Pi Zero;
Nerves - A Linux dist with a optimized setup with Elixir for embedded devices - https://nerves-project.org/
Circuits - For serial communication over uart with gps module - GitHub - elixir-circuits/circuits_uart: Discover and use UARTs and serial ports in Elixir
Req - For sending gps-data to server - GitHub - wojtekmach/req: Req is a batteries-included HTTP client for Elixir.
I would then also search for articles about how to minimize the power footprint - PowerControl: Improve the Performance of Your Nerves Device - DockYard
Hope you find any of the articles and links helpful. Kind of got excited about the project myself. Perhaps I should try to build something as well - just dont know what to do with it

1 Like
That sounds like a great learning project! Is learning the primary objective or is it solving a business problem/pain point?
If it’s the latter, it’s worth considering whether the hardware approach brings enough benefits to justify its costs when compared to software only approach that leverages physical “anchors” like QR codes and/or NFC tags to identify dumpsters and quickly capture/report events and locations via a smartphone.
This could make a lot of sense if the company handles dropoffs and pickups. But if that’s not the case, the hardware approach could be very nice since automating tracking could help with auditability/accountability. And that benefit could justify the costs of upfront hardware investment and ongoing maintenance.
Anyways, it’s generally a good idea to think through the rollout and whether it can be done incrementally where each stage is useful in and of itself. This strategy de-risks the overall endeavor and lets you pick the low hanging fruit for quick wins upfront.
For example, your second bullet point for price estimation and visualization based on delivery distance and container size can be launched as a useful standalone feature even without any tracking. Then add some forms to manually log pickup and delivery events – then figure out how to grab GPS data, tie in QR codes/NFC tags, and calculating what to charge. And once it’s all humming along, tinker with some hardware and run a small pilot with a few prototypes.
Just some food for thought and good luck!
3 Likes