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 thoughts on “WiNode Based Wireless Graphical Display

  1. Hi Nathan,

    I have already buy a 128×64 display KS0108 is possible to add a Nintendo DS touchscreen ?
    Is much difficult ?
    Please let me know

    Regards
    Francesco.

  2. Depends on what else you have connected, if you can spare 4 of the analogue pins for the touchscreen then no problem. If it is the bare parallel KS0108 display that you have then it uses ~16 pins inc power and when I made my KS0108 version of this display here (with an RFM12B and DS18B20 as well) I only had 1 spare I/O pin left.

    One option there would be to connect the KS0108 using an I2C I/O Expander such as the MCP23017, that will bring the connections between the screen and Arduino down to 4 including power. I haven’t tried this myself but this looks like a good starting point, or you could use a serial backpack like the one I mentioned here.

  3. Hi Nathan,

    I have buy a ST7565 and WiNode and I have a DS1307, is possible to use the DS1307 instead of the MCP79410 ?
    Why do you use the MCP79410

    Please let me know

    Best Regards
    Francesco.

  4. Hi Francesco, The WiNode I used was on of the early ones that came with the MCP79410 presoldered on the bottom of the board, that’s the only reason I used it. You could use the DS1307 but you would have to update the RTC part of the code of course.

    Cheers,
    Nathan

  5. Hi Nathan,

    I have some problem with the touch screen, and I would try to use without it.
    I try to comment the code of the touch screen but I don’t display the output data, but only the first menu. ( I have dispaly ST7565 )
    Can you help with your code for this display ?
    Please let me know

    Best regards
    Francesco.

  6. Such a great idea, and the possibilities are endless with this solution, could even create a automated heating controller, would look good to have this next to the heating panel to see how much electric you are currently using.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <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.