My adventures with a Raspberry Pi and Arduino programming

Posts tagged ‘gps’

Eye SPI Arduino…

I’ve been toying with how to handle multiple peripherals that require Serial. Up until now I’ve used the Software Serial library on Arduino, and have resorted for my SD card logger to use the hardware serial.

But is there a better way…

Maybe…

Lets have a look at the comms options:-

Part Hard Serial Soft Serial SPI I2C
ArduLogger V3 Y NO YES [0] YES [0]
GPS – GP635T Y Y NO NO
GPS – UBlox 6M module Y Y NO NO [1]
3DR Radio Y Y NO NO
LCD – Hitachi 44780 Y Y NO [2] NO

[0] ArduLog software only, not the SparkFun OpenLog software. Oh and you need to modify the code yourself to add support!
[1] The compass on the UBlox does have I2C SCL and SDA lines, but not the GPS
[2] It is possible to use a register to drive the LCD. May be possible to cleverly link this to an SPI interface

Hmmm… So maybe not then… Although of course nothing stopping me using interface circuitry to make all the above work, but it would probably add to the number of IO lines used, not reduce them!

Speaking of IO lines used, I’m currently using these:-

  • ArduLogger – 2 (hardware serial)
  • GP635T – 3 (2x soft serial, 1x power mosfet on/off)
  • 3DR Radio – 3 (2x soft serial, 1x power mosfet on/off)
  • LCD – 6
  • TOTAL: 14 (Arduino Pro Mini V3 I use has 22 pins that can be used for digital IO – 4 of these are optionally SPI, and another two optionally I2C)

I’ll keep a watching brief on using SPI though – could potentially be useful, and allow me to ‘off board’ a lot of serial comms in future.

[UPDATE 26 MAY 2015]

You can buy ICs that act as an SPI to multiple UART convertors each with a 64 byte FIFO queue. The chip model for two output UARTs (up to 4MBit/s!) is

SC16IS752IBS and is documented at http://www.nxp.com/documents/leaflet/75015676.pdf. This product also has some GPIO ports, so could theoretically externalise all my IO (including LCD) if I really needed to.

Recent purchases…

I’ve made a couple of recent purchases after considering the full scope of my project.

Firstly I’ve bought another SparkFun 16×2 LCD module, and this time I won’t ruin it with a soldering iron by accident!!!

This LCD will be used in the D of E supervisor’s receiver module. I’ve also developed a user interface and set of menus so you can navigate through and track multiple teams, find your own position, edit settings, and even navigate to a selected team. (distance, bearing).

In order to drive this though I had to use some sort of interface. Several small buttons seemed a bit fiddly to add to the box, so I’ve opted for a PlayStation controller like Joystick! I can mount this on the project box next to the LCD. If you push this joystick down it also acts like a selection button, so I have left to right, and up to down navigation, and a selection button. Just like a standard modern GPS unit (but at a fraction of the cost).

Interestingly, SparkFun have stopped selling the black project box, now instead selling a clear one. That’s pretty awesome from a show-and-tell perspective! I can now show off the project, and see the power LEDs through the case. No need to drill LED holes that may leak in water.

I’ve also decided to buy a couple of micro SD interface cards – a ArduLogger device from a local supplier, but with the SparkFun OpenLogger software installed. This software is a bit more flexible, allowing you to name multiple files and either replace their content or append new content. Perfect for a receiver tracking multiple teams – you can have a GPX file for each day for each team. Great! I’ll also fit this on the transmitter so I can check the teams actual route later if they go out of signal line of sight. Not that I don’t trust them…

I also decided against bluetooth for a couple of reasons. Firstly, more complexity, space, and power usage for a very limited ‘download’ mode at the end of a walk. Also because I have a whopping 433MHz module already with a high baud rate! May as well re-use that to request and force an upload of an entire set of logs. They’re only a few KB for a day, so won’t take long at all to transmit.

Having two transceivers also brings the tantalising prospect of sending and receiving messages. A future ‘posh’ version of the transmitter may be a bigger battery, and LCD screen, and another joystick – so the team can send progress reports and receive information from their supervisors. E.g. ‘get off the mountain – crazy weather coming!’

I’ve also found a cheap supplier in Singapore for my Arduino Mega boards. More on that in another post. They’re approx GBP 1.80 each! Great if you want to make a lot of modules.

For my next trick I’ll use a Dremel to cut holes in my project case so I can mount the components. More to follow!…

Arduino Pro Mini power saving modes

There are many ways to save power on the Arduino board itself. I summarise these with power consumption numbers…

(more…)

More tracker power saving tricks…

I’ve now employed a bunch of tricks to reduce power consumption. Here’s what I’d done…

(more…)

GPS power savings tests

Turns out you can save a hulluva lot of power by carefully using a GPS unit…

(more…)

D of E radio tracker project progress update…

Managed to spend a bit of time playing with my gpstxrx project now I’ve finished writing NoSQL For Dummies! Made a lot of progress already…

(more…)

I2C and software serial and hardware serial working fine!

I’ve now got all communication channels working on the Arduino Pro Mini just as I had on the Raspberry Pi (aka Ralph) and the Gertboard…

(more…)

Battery pack working…

Managed to get the battery pack working with my Pro Mini and UBlox GPS…

(more…)

UBlox GPS working with Arduino Mini Pro…

Got Software Serial working with my Airbot UBlox based GPS and compass unit!

(more…)

GPS TX RX Project intro

I’ve started a project to build a tracker and receiver unit for Duke of Edinburgh, or other expedition, groups – all using Arduino!

(more…)