The local beagle club required a device that would be used on the back of their beagles to track their competitions. They had already used some off the shelf devices with minimal success. So I was tasked with creating new GPS trackers/data loggers for them.
The device would be turned on and placed in a pouch on the dogs back prior to a run. Afterwards the unit would be removed and turned off. At the end of the day the tracks can be downloaded off the device by connecting them to a PC.
High Level Design
Since the Beagle club didn't really care too much about how the unit was designed. I got to make all the creative decisions so long as they met the project requirements. The main requirements were A BOM of $100 per unit, plus the units were to be fitted in a pouch on the dogs back, so they had to be reasonably small.
A simple block level hardware design was built, I often sketch these out in my notebook, but this one was done in Visio. The hardware revolves around the MSP430f5513 MCU from TI. These are suited for ultra low power applications, making it ideal for use in this battery powered project. This particular chip has a slew of features useful for this project
- Voltage range 3.6-1.8v
- Off mode 1.1µA (typ)
- 25Mhz CPU clock
- 4x 16bit timers
- 4x Serial interfaces
- Integrated USB PHY
I have used TI's MSP microcontroller in projects before and was aware I could setup an SD/MMC interface easily with elm-chan's FatFS. This will allow the datalogger to record directly to an SD card. Using the internal USB PHY we can also act as a USB Mass Storage to a PC in order to remove files from the device. At this point, the device would have two distinct modes of operation. USB mass storage mode, and a data logging mode.
Electronic Hardware Design
My favorite part of a project is the schematic and PCB design. This project was done in KiCAD a free, open source, cross-platform, EDA suite. The schematic is shown here, it is essentially expanding the high-level design (shown above) down one level deeper. Expanding each block, and creating any new library footprints as you go. Once the schematic is finished the board layout can start.
I had already found an enclosure I would like to use for this project. From OKW's minitec series, which meant a very specific PCB size was required to ensure a good fit. While I waited for samples to arrive I downloaded the 3d CAD and 3d printed off an enclosure to see if the sizing looked correct. It did so I started working on the PCB to ensure I'd be able to fit everything inside. I finally ended up with this funny looking PCB, the cutout enables me to fit a 650mA battery inside. (which enabled a 20 hour log time) I had made provisions to store a LiPo protection circuit on the main PCB, but ended up using a separate PCB attached to the battery for that task.
Mechanical Hardware Design
I am very grateful that the enclosure manufacturer supplied 3d CAD models of their enclosure. that enabled me to visualize how the electronics would fit within the enclosure. KiCad enables import/output of PCB outline as a DXF file. I used this with Fusion 360 to ensure the PCB would fit within the enclosure and avoid internal features of the enclosure.
I decided to create some custom moulded polyurethane parts. The two parts required are a button and a lightpipe for the 2 LEDs.
In order to create a final polyurethane part you need to create a master, this is done with ren-shape on the mill. I modeled up the parts again in Fusion 360. Fusion has CAM capabilities with I used to turn the digital model to g-code commands my mill can understand. I managed to create a 1 part mold for these parts. This process yields some amazing quality and detailed parts, so it's important that the master mold has the exact features you require from the final part. I was able to model the part with a slight curvature on the top surface that matches with the enclosure to ensure a good fit.
This master is then filled with silicone to create a mold we can use to create our final parts. This silicone mold can be used multiple times to create dozens of parts. The polyurethane used for the final parts is also very cheap. This makes this method quite cost effective for low quantity but high-quality parts. More information on this method is found in an excellent guide which I recommend reading if you're interested.
The front of the enclosure was milled out with a 1mm end mill on my cheap Chinese mill/router. again using Fusion 360 for modeling and CAM setup. I made a simple wooden jig to hold the front of the enclosures in place while they were being cut.
Cutout for the LEDs filled with clear polyurethane to create LED windows on the front of the enclosure. I made some mistakes with this. I did not use enough resin, creating a miniature lens that distorts the LED. Secondly, I applied tape and added resin from inside. Unfortunately, some of the resin leaked around the front of the tape into the texture of the plastic, creating a visible change of texture around the LEDs on the front panel.
I have a github project for this. (Note there now exists v2 hardware.)