Showing posts with label 7-segment display. Show all posts
Showing posts with label 7-segment display. Show all posts

Wednesday, 21 August 2013

The display

Here is a video from an early test of the (small) display with simulated distance countdown:




Assembling

Connections
The electrical connections are pretty simple so I did not do a schematic (power, an SPI connection through a level converter to the display unit and [software]serial/UART to nRF24AP2 module). I can make that up if people are interested......

To connect the device parts to the hat I decided "velcro" was the way to go. Allowing removal when needed. I waterproofed each of the elements in small "ziploc" bags with electrical type and put some velcro on the back of them. I then stitched the other half of the velcro into the hat (with some very poor sewing technique).

This is what it looks like:


and here is a quick video too:

and you can see in the video the bane of the 7-segment display -- the letter 'k'



Bigger displays! No medium sized displays.

The character height of the displays that came with the dx.com modules was 10mm.

This was fine when testing but not large enough to be seen well out on the track.

Upsizing seemed like the sensible thing to do. Let's try doubling to 20mm (https://www.sparkfun.com/products/11405 -- common cathode with same pinouts).

  After some soldering and extension so the displays fit:



 Looks great - real advertisement potential there.

 Let's try it on the hat. Uh-oh, now we are too big to run with and it flaps about.

 Let's try and find a display that is just right:
 I decided to go with these ones  (http://www.digikey.com/product-detail/en/LDQ-N516RI/67-1450-ND/252641) as the unit is a one off and the slightly more orange-than-red colour fit in with the aesthetics more. I got a few of these cheaper ones just to have as spares too (http://www.digikey.com/product-detail/en/LTC-5723HR/160-1879-ND/3198988).

Just right....


Software - ANT+

There was not much refined software out there for talking to ANT devices from Arduino.

I took the code at Digital Hack's Blog (http://digitalhacksblog.blogspot.com.au/2012_10_01_archive.html) as a starting point (Thanks!) and tidied it up and created a slightly more useable library.

This is at: https://github.com/brodykenrick/ANTPlus_Arduino

The library talks to ANT+ devices, like nRF24AP1/2, over UART. It allows for simple setting up of channels and receiving broadcast messages.

Software - 7-Segment Display (MAX7219)

I rewrote the  Arduino LEDControl (http://playground.arduino.cc/Main/LedControl) to do all ASCII characters. Some good, some OK and a few bad.

https://github.com/brodykenrick/MAX72xx_SPI_Arduino

I added a greater range of characters, support for double-wide characters (like M and W) and generally made it better for use as a alpha+numeric display (rather than just numbers).

What would we need?


What would it take to make this display?
  • A micro-controller
  • A power source
  • An ANT+ module
  • A display 
  • An ANT+ source of distance information (Garmin Forerunner 410 Foot-pod)

MCU
I have quite few Arduino boards lying around, so that seemed to be the easy choice on the processor. I ended up using a Tinyduino (Tinyduino) and an Arduino Pro Mini (link) in my two separate iterations.

 Power
I also have some LiPo batteries around from other projects. Lightweight and powerful (link).

A display
7-segment displays are cool in my opinion and so that was the display I decided would make most sense (in spite of the difficulty in getting some letters represented). These seemed to be good and cheap options based on the MAX7219 (http://dx.com/p/8-segment-led-display-board-module-for-arduino-147814) and cheaper than I could get the main chip for myself.

ANT+
An ANT+ module for talking to the Garmin. This would need to be purchased. The sparkfun modules (link) seemed good - however they weren't available anywhere. I ended up buying from Goodluckbuy.com in China (http://www.goodluckbuy.com/nrf24ap2-wireless-module-zigbee-module.html)

Source
I have a Garmin Forerunner 410, Heart Rate Monitor and Foot-pod.