Nordintown Blog

Rubbish musings, projects and hackerings from Nordin

PiCorder: Adafruit ST7565 Display (TG12864H3-05A) with Raspberry Pi

Dec 192014

undefined

As a distraction, I purchased a TG12864H3 RGB LED dot-matrix screen on the cheap from a fellow hackerspace member with the aim of quickly adding a status display to my HackSack using prewritten library [1]. I expected the screen to be very simple to use with the pi, and generally it is, but I had to dig a little to get all the info about setting it up. 

Expanding use beyond the hacksack, I plan to use this with a Pi to control and view number of Pi connected sensors (SDR, RFID, Light, Bus Pirate). To log my notes, progress and resources, I am documenting my steps below.

Test wiring the LCD SPI

Wiring is pretty easy - I made the table below from available guides to help me not fry the I/Os.

http://www.element14.com/community/servlet/JiveServlet/showImage/38-8770-87983/GPIOs.png 

Board Pin Name    Desc                GPIO     RasPi Pinout 
8 B- Blue PWM -    
27 G- Green PWM -    
26 A+ PWM +    
25 R- Red PWM -    
24 GND     6
23 VDD 3.3v   1
22 SID   10 19
21 SCLK   11 23
20 A0   24 24
19 RST   23 16
18 CS   8 26

Note to self: this is the Pi v1. I'll need to update this for the v2 I am now using.

The demo display code [1] runs beautifully, so that works :).  I can compile/run the C++ code but the python equivalent [2] seems to suit well on the Piv2, speedwise. The Bus pirate, RTL-SDR and the I2C hot-swap interface IC are also tested as working from the command line (the latter only briefly tho). I'll need to make figure out how to make calls to these later.

Next I need to get the case readied for the next stage since the project will be 'additive' and will need to be robust pretty early on.

Next steps:

  1. Sourcing the hard case and input device
  2. 3D print box spacer
  3. Using the rf keypad for control
  4. Adding peripheral devices/sensors

I have found a nicely shaped box from Maplin (£11) that is shaped nicely for handheld use [3]. I can 3D print and reprint the middle part (see below) as I add internal devices. I think that combining shop a brought case with printed guts gives me a good balance of robust and custom. Feel free to disagree.  

Also, about 10 months ago I brought a cheap RF numbpad to speed up data entry on the laptop [4]. This will be used to both control the python-powered lcd menu and as a remote control as needed. It's USB, so I can switch it out with a keyboard when I and using the headset viewer via the composite output. Oh yes, I am using a hacked set of video googles with the project also [5]

Boxing it for handheld use

As it stands, the Pi fits beautifully inside the box but there is little space for the other devices to say nothing about the power supply. Thats fine since the box's thickness and internal fixings can be modded via simple wrap-around spacer where the case top and bottom join. This will be 3D printed once our hackerspace printer is up and running. 

Next task - 3D design the box wrap-around spacer and fit the box for the power supply and peripherals.

[1] https://github.com/stephanel/ST7565-RPi

[2] https://github.com/MaliceWitch/ST7565-Pi-Python 

[3] http://www.maplin.co.uk/p/hammond-soft-sided-hand-held-enclosure-blue-with-compartment-147x89x24mm-n21hg 

[4] http://www.hotukdeals.com/deals/advent-n212-wireless-number-pad-was-19-99-now-2-99-reserve-collect-only-pc-world-1637366

[5] http://gizmodo.com/5114440/vuzix-teases-us-with-awesome-virtual-reality-wrap-920av-video-sunglasses