jenswilly.dk


Archive for August, 2012

GPS Tracker components

14. August 2012 16:33 by Jens Willy Johannsen
Categories: ARM | Projects

To continue my GSM-GPS Tracker project, here is an overview of the system and the components it comprises:

(Click to see large version)

Firmware components

The firmware components can be divided into peripheral drivers and core functionality.

The project is hosted on Github and all the driver code along with linker script, startup code, CMSIS files and Makefile has been moved into a Git submodule (the root of all evil, I know, but in this case it actually made sense) so I can reuse that in my other LPC projects. The submodule is also on Github.

Peripheral drivers

  • ADC for battery voltage monitoring
  • EEPROM for storing/reading settings (already working)
  • UART for GSM module communications (already working)
  • Soft UART for GPS module comms since the LPC11U24 only has one hardware UART (already working)
  • USB CDC for local programming and debugging (already working)

Core functionality

  • Command parser for commands received by SMS or USB CDC
  • NMEA parser to extract coordinates and timestamps from GPS module output
  • SMS receive/reply GSM module interfacing
  • Position logging storing current and the X last known positions with timestamps
Comments 4 comments »

New project: GPS tracker

10. August 2012 12:15 by Jens Willy Johannsen
Categories: Projects | Telit GE865

It’s about time for a new project and I’ve decided to dust off an old project that I never really got started: a GPS tracker with a GSM/GPRS phone module.

Sure, there are plenty of GSM enabled GPS trackers available – both comercially (like this one) and as hobby projects (this one for example) but that doesn't mean that I can’t 1) learn a lot from making one myself, 2) have fun while doing it and 3) make something better than what is out there…

Initial requirements

So the initial high-level requirements (aka “what’s it gonna do”) are:

  1. Get current position from GPS module.
  2. Accept commands as SMS messages from a GSM module.
  3. Send position info back as SMS.
  4. Continuously send position info to a webserver.

Design considerations

And my initial design considerations (aka “keep this in mind when designing the thing”) are:

Power

Everything must be run off a 3.7 V LiPo battery. So think about power consumption and battery capacity.
The LiPo will be charged with a mini-USB cable.

Enclosure

Think about the size and mounting of GPS and GSM modules as well as antennas for GPS/GSM.
We’ll also need access to a USB socket for charging.
Also, the LiPo battery needs to fit in the enclosure.

I’m thinking either laser-cut acrylic case from Ponoko or 3D printed box from Shapeways

Components

The components I have in mind for this project right now is:

  • MCU: NXP LPC11U24 ARM processor. I’m thinking that is a good project to start switching from AVR to ARM.
  • GPS: SUP500F GPS module since that’s what I already have in my parts box. Otherwise I would probably choose a more modern module.
  • GSM: Telit GE865 on breakout board – again the reason is mainly that this is what I already have. But it’s still nice.
  • LiPo charging IC: The Microchip MCP73831 looks like it fits my purposes perfectly: it is designed to charge one LiPo cell from a USB port and it has bi-directional status output.
  • Status LEDs: a couple of 0805 or 1210 SMD LEDs. The exact model is not critical.
  • SIM holder: a generic SMD SIM holder. Something like this.
  • Battery: 1000 or 2000 mAh 1s LiPo battery. This one for example.

Next steps

The next step is, of course, cobbling together a prototype. And in order to do that, I will:

  • Get the GSM module working: find a suitable SIM, figure out how to send and receive SMS'es and get HTTP GET and PUT working using GPRS.
  • Verify that the GPS module works.
  • Create block diagrams for hardware and firmaware (i.e. identifying components and dependencies)

Stay tuned…

No comments No comments »

LPC ARM USB CDC

2. August 2012 12:55 by Jens Willy Johannsen
Categories: ARM

…the unabbreviated title would be very long :)

Anywho, this is just a quick post to link to my Github project which contains firmware for using an LPC11U24 as a USB "communications device" – i.e. a serial port.

At the moment, it simply writes input from the serial interface to the USB and vice versa. So you can connect the device to a computer with both USB and a serial cable (I use a serial-to-USB cable since I have no "real" serial ports on my MacBook Pro) and then open terminal connections to both interfaces (using "screen /dev/tty.xxx 9600" or something similar) and everything typed in one window gets written in the other window.
There's probably a couple of debugging messages as well.

The project is based on NXP's example code found here: http://www.lpcware.com/content/nxpfile/usb-rom-driver-examples-using-lpcxpresso-lpc11uxx and compiles with the Yagarto toolchain.

Why?

Why would I want to do USB connectivity by way of CDC instead of e.g. HID? Because implementing HID functionality in Mac OS X applications is a pain in the ass, that's why.
Serial port connectivity, however, is so very much simpler. Especially if you use the excellent ORSSerialPort library.

Where?

Right here: https://github.com/jenswilly/LPC11U24-USBCDC

Comments 3 comments »