Wearware: G-Force data logger: Update 1

The Wearware: G-Force data logger project has moved on since the last post, both in specification and status. It was envisaged that a PIC12F, and SD card and SPI Accelerometer would be used but after a few revisions and a little bit of software work it was decided to drop the FAT filesystem for the first prototype.

This then left the method of getting data from the logger to a PC of some description up for debate. Should a simple UART be used with a UART -> USB cable which can be picked up on ebay for less than £2.00, should an integrated USB / MCU be used to reduce the amount of objects needed? How about a Bluetooth -> UART adapter that I was using on my 3D printing?

In the end I went with the integrated USB and MCU option, specifically targeting the PIC16LF1454 which has support from various USB stacks, such as M-STACK and MICROCHIP application libraries.
The nice think about the PIC is that it has an internal clock and re-syncs itself using the USB data when connected so that the oscillator doesn’t drift like a lot of internal oscillators do.

One side effect of this change was the availability of I/Os to use on the PIC, and so the Accelerometer has been changed from a ST-Microelectronics MEMS using SPI to a Freescale i2c device which is coincidentally cheaper. The PIC16LF1454 however only supports either i2c or SPI as it has one MSSP peripheral so one of the protocols will have to be bit-banged to operate.

The SPI has been chosen to bit-bang because it is a simple non-shared protocol and the flash memory isn’t time critical, whereas getting data from the accelerometer is and will be interrupt driven.

For my first alpha design, the board measures 22x22mm and uses 0603 SMD parts (the smallest that I can solder currently). I’ve opted to use SOIC parts instead of TSSOP and QFN so that I can add debug probes more easily. I’ve opted to omit the battery and related circuitry and place test pads for all the lines I am interested in on the under side.

Without further ado, here is the render of the PCB.

WearWare: G-Force Data Logger First Render
WearWare: G-Force Data Logger First Render

As you can see the PCB is rather cramp. The programming point is located on the underside where the Micro-B USB connector is placed in the top left. A tactile switch lives in the top right along with the power circuitry whilst the PIC, Flash memory and accelerometer take up the bottom of the PCB. Finally the feedback LED’s are on the left hand side.

Whilst the hardware comes in from the various corners of the globe I’ll be developing the software with the help of MPLABX’s simulator.


One thought on “Wearware: G-Force data logger: Update 1

Leave a Reply

Your email address will not be published. Required fields are marked *