I need Display-o-tron on a Arduino Uno


#1

hi everyone hope your day is going good…
i am trying to get the Display-O-Tron working on a Arduino Uno so i can have a simple user menu system
i have a few pin examples pages i have looked at and i have some sample code to try and get it to display something

    /*
  DogLcd Library - Hello World
 
  Demonstrates the basic use of a DOGM text LCD display.
  This sketch prints "Hello World!" to the LCD
  and shows the time.
 
  See the online-documention for wiring instuctions
  We assume  the following pins are connected:
  * LCD SI pin to digital pin 2
  * LCD CLK pin to digital pin 3
  * LCD RS pin to digital pin 4
  * LCD CSB pin to digital pin 5
  * LCD RESET pin is not used
  * LCD Backlight pin is not used
 
  Library homepage : http://code.google.com/p/doglcd/

*/

// include the library code:
#include <DogLcd.h>

// initialize the library with the numbers of the interface pins
DogLcd lcd(2, 3, 4, 5);

void setup() {
  // set up the LCD type and the contrast setting for the display 
  lcd.begin(DOG_LCD_M162);
  // Print a message to the LCD.
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);
}

i have this pin out image


and this schematic i am taking that this is from the front of the screen

but i still cant get anything to display.
using a multimeter nothing seems to tie up and make sense
can anyone please tell me what pins go to where i have looked through the github code and cant see anything that points out to the pins i need…

i could do with someone telling me
pin2= 3 volt
pin2= 5 volt
pin3= ?

just so i can tie up the code above with the pins on the back of the Display-o-Tron

thanks in advance


#2

Have you seen this: http://shop.pimoroni.com/products/display-o-tron-lcd

… I haven’t recouped the info you posted and reconciliated it with those found there, but maybe this will help you figuring it out?


#3

Since it was designed for the Pi, you can assume that all input pins will be 3.3v.

You’ll need to connect a 3v3 supply to the 3v3 power pin on the header to power the display up. You’ll also need to make sure you specify DOG_LCD_VCC_3V3 in lcd.begin() like so:

lcd.begin(DOG_LCD_M162, 0x28, DOG_LCD_VCC_3V3)

The second argument is the contrast, and 0x28 is the default.

I don’t believe it’s possible to run Display-o-Tron at 5V since there are placements for the 3V3 charge pump. However I think it can tolerate 5V logic at 3v3.


#4

You only need to wire one of the 3.3v pin, GND, and the 3 SPI pins right? I might have a go myself this afternoon, just for experimentation’s sake!


#5

it dont work… thats what i cant figure


#6

it works for me, you have to use MOSI, SCLK and CS0 + BCM25 as command. 3.3V supplied from pin1 or pin17, both are electrically connected on the dot3k it seems.


#7

btw, in your example sketch, you have to use ‘DOG_LCD_M163’ rather than ‘DOG_LCD_M162’, or you won’t get the ‘number of seconds since reset’.


#8

i will give it a try over the weekend thanks guys


#9

and here is a pic of the wiring…

I broke off the 3.3 feed so it’s out of the way and don’t confuse things, but pin17 is active so it probably make sense to use that one instead:


#10

thats alot for this all i need now is a backlight and the joystick working. i did buy this for the raspberry pi but i have changed boards. so if i can get this fully working it would be great. i will update post once everything is together


#11

joystick should be quite straightforward. I’ll see if I can get something out of the SN3218 to do anything useful and will post here if I succeed.


#12

actually, you may just want to have a look here, seems @jon and @gadgetoid have made your work that much easier ;-)


#13

works too, although you should note that you need to feed it 5V or it won’t do very much… here it is in action using the basic serial debug sketch available on the github (with small tweak to get the channels to stay up long enough for the mugshot):


#14

and here is a sketch that will flick through the 18 channels at brightness 16:

#include <Wire.h>
#include "sn3218.h"

const int brightness = 16;

void setup() {
  sn3218.begin();
  sn3218.enable_leds(SN3218_CH_ALL);
}

 void loop() {
  int i;
  for( i = 0; i < SN3218_NUM_CHANNELS; i++ ){
    sn3218.set(i,brightness);
    sn3218.update();
    delay(100);
  }
  for( i = 0; i < SN3218_NUM_CHANNELS; i++ ){
    sn3218.set(i,0);
    sn3218.update();
  }
}

#15

and here’s a quick summary of how you can control the channels how your project requires:

sn3218.begin(); // open register
sn3218.enable_leds(SN3218_CH_00 + SN3218_CH_01); // Enable channel 0 and 1
sn3218.set(0, 50); // Set channel 0 to 50/255
sn3218.update();   // Signal the SN3218 to update outputs from its input registers

SN3218_CH_00 backlit right R
SN3218_CH_01 backlit right G(B)
SN3218_CH_02 backlit right B(G)
SN3218_CH_03 backlit middle R
SN3218_CH_04 backlit middle G(B)
SN3218_CH_05 backlit middle B(G)
SN3218_CH_06 backlit left R
SN3218_CH_07 backlit left G(B)
SN3218_CH_08 backlit left B(G)
SN3218_CH_09 baroled 1 (leftmost)
SN3218_CH_10 baroled 2
SN3218_CH_11 baroled 3
SN3218_CH_12 baroled 4
SN3218_CH_13 baroled 5
SN3218_CH_14 baroled 6
SN3218_CH_15 baroled 7
SN3218_CH_16 baroled 8
SN3218_CH_17 baroled 9 (rightmost)

SN3218_CH_ALL affect all channels

note that many dot3k out there have the B and G channels reversed, that is the meaning of the parentheses I added!


#16

and here’s a sketch that drives both the LCD and backlight… not perfect but shows the basics of how it can be done:

#include <Wire.h>
#include "sn3218.h"
#include <DogLcd.h>

DogLcd lcd(2, 3, 4, 5);
const int brightness = 128;

void setup() {
  lcd.begin(DOG_LCD_M163, 0x28, DOG_LCD_VCC_3V3);
  sn3218.begin();
  sn3218.enable_leds(SN3218_CH_ALL);
}

void loop() {
//print text over 3 lines
  lcd.setCursor(0, 0);
  lcd.print("I could do this");
  lcd.setCursor(0, 1);
  lcd.print("all day and I'll");
  lcd.setCursor(0, 2);
  lcd.print("prove it:");
  lcd.setCursor(10,2);
  lcd.print(millis()/1000);

//clear LED driver register
  int i;
  for( i = 0; i < SN3218_NUM_CHANNELS; i++ ){
    sn3218.set(i,0);
    sn3218.update();
  }
//flick 9 channels of backlit
  for( i = 0; i < 8; i++ ){
    sn3218.set(i,brightness);
    sn3218.update();
    delay(100);
  }
}

#17

err… a word of warning, not all the power pins are rooted on the dot3k, so if you are not using a cobbler as I did you’ll have to be careful! after trying to figure out which points are usable on the dot3k by following the traces here is a combination that should definitely work:

5V -> pin 4 (though pin 2 seems to be joined at the top)
3.3V -> pin 17, next to MOSI (pretty sure pin 1 isn’t suitable)
GND -> pin 25, right at the end next to SCK

… I’ll edit this post after checking whether others are working, but that could well be why you couldn’t get it to work originally I suppose.


#18

right, yes, there are 2 power pins not supplied by the PCB: pin 1 (3.3V) and perhaps more surprisingly pin 20 (GND), so in the pics I posted keep in mind that you have to adjust those to reflect the fact that I was using a cobbler (that has those points electrically rooted)!


#19

and for clarity here is a valid wiring directly onto the dot3k header:

MISO - in purple - is unused but I’ve got premade 3 and 4 pins cables for SPI connections… well it is one of the 5 joystick link but I wasn’t trying to procure for those, only the LCD and backlit.


#20

I finally took the time to take a decent shot that shows a dot3k linked to a (Metro) Uno… there are a couple of inversions of colours compared to earlier shots, simply to avoid crossing the loom needlessly but it’s otherwise identical, minus the cobbler:

… it should be clear but i2c+power (backlit) is at the back and SPI (LCD) is at the front. Again, MISO (purple wire) is unneeded and can be disconnected from D6, unless you want to wire in the joystick, see http://pi.gadgetoid.com/pinout/display_o_tron_3000 for pinout details.