Categories

Archives

Elsewhere

     
       

WiNode Based Wireless Graphical Display

I’ve recently put together another wireless GLCD display, this time using a WiNode together with a ST7565 GLCD with RGB backlight and a Nintendo DS touchscreen. The WiNode is fitted with a 433MHz RFB12B transceiver and the MCP79410 Real Time Clock (RTC) option as well as a DS18B20 temperature sensor for the room temperature reading.

This is quite an improvement on the first display I made, the feature list is now:

  • Touch control using Nintendo DS touchscreen
  • 3 Different display views selectable via touchscreen
  • Receive power reading from emonTX via RF
  • Receive remote temperature reading via RF
  • Read room temperature from DS18B20 sensor
  • Transmit room temperature reading via RF
  • Backlight colour changes depending on power reading
  • Supports MCP79410 RTC for time & date display

The WiNode makes a great base on which to build a display like this and being 3.3V it pairs well with the 3.3V ST7565 displays. This particular display is the Adafruit one with the RGB backlight (available from Proto-PIC) that I covered here and I’ve connected it up along with the touchscreen and temperature sensor as follows:

WiNode Pin Connected to
D0 RST on ST7565
D1 SID on ST7565
D4 DS18B20 data pin (with 4.7K pull up to +3.3V)
D5 Red cathode for backlight
D6 Green cathode for backlight
D7 SCLK on ST7565
D8 A0 on ST7565
D9 Blue cathode for backlight
A0 X1 on DS touchscreen
A1 Y2 on DS touchscreen
A2 X2 on DS touchscreen
A3 Y1 on DS touchscreen
3.3V VDD on ST7565, VDD on DS18B20,
Backlight Anode via 100 Ohm resistor
GND CS and GND on ST7565, DS18B20 GND

That makes it a full house, A4 and A5 are used for the I2C bus for the RTC, D2 is in use for the RFB12B interrupt, D3 is interrupt/wake up for the RTC, D10 is CS for the RFM12B and D11-D13 are for the SPI bus to the RFM12B. There is always the possibility of using more I2C devices or an I2C IO expander if I wanted to add anything else.

I haven’t used pull down resistors for the touchscreen, as I noted here this allows it to be used on 3.3V and the accuracy is fine for this purpose (detecting relatively large areas for use as buttons).

Here you can see the menus and the colour changing with the power usage, there are a few more pictures on Flickr here.

    

My code for this so far is available on GitHub here.

For the above connections it is also necessary to change the pin numbers defined in the JeeLabs GLCDlib library, in GLCD_ST7565.cpp to:

#define PIN_SID 1
#define PIN_SCLK 7
#define PIN_A0 8
#define PIN_RST 0

and the other changes for the ST7565 that I mentioned in the GLCD post here.

Change LCDUNUSEDSTARTBYTES from 4 to 1 otherwise the display will be off to the right hand side:

#define LCDUNUSEDSTARTBYTES 1

Uncomment the slowSPI define:

// Switch from fast direct bit flipping to slower Arduino bit writes.
#define slowSPI

Change the PAGE_FLIP mode by changing from 0×7 to 0×3

// If the top line is appearing halfway down the screen, try the other mode.
//#define PAGE_FLIP 0×7
#define PAGE_FLIP 0×3

Adjust the contrast to your liking. I settled on 0×20

st7565_Set_Brightness(0×20); // strictly speaking this is the contrast of the LCD panel, the twist on the crystals.

and I reversed the colour defines in GLCD_ST7565.h so it makes more sense for a positive display:

#define BLACK 1
#define WHITE 0

Still to do: It needs a case, mounting the touchscreen is going to be tricky, it’s just held on with insulation tape at the moment. I also need to come up with a better way of setting the RTC rather than putting it in the code, either through the touchscreen or possibly do it automatically from NTP over RF from a Nanode. Something to look into over the Christmas break I think. I also need to add a supercap so the RTC keeps its time when the display is powered off.

8 comments to WiNode Based Wireless Graphical Display

Leave a Reply


 


 


 

You can use these HTML tags
(links will be automatically marked with rel="nofollow")

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

By submitting a comment you agree that it can be reproduced under the same licensing terms as the rest of the content on this site.