Posts Tagged ‘LCD’

Have you ever been so aggravated or inspired by something that you were unable to continue with your day/week/life until you did something about it. I ran into one of those situations recently. It started out like any other… I was working on a little out of office LCD display project for my desk. It’s an old external hard drive case that I modded to hold a 4×20 LCD and a four potentiometers. Different knob positions provide difference time/location info on the lines of the display. Example “At Starbucks, back in 15”. I could probably just use a white board but that’s too easy. Anyway, I needed I needed a few RGB leds for the project so I started my walk over to the local Radio Shack. As soon as I opened the door I remembered why I hate that place. To keep this from turning into a b!tch fest I’ll just provide the short list:
1) Waiting in line forever while people complain about the cell phone plan they signed up for and now can’t afford. Every single time…
2) The markup on basic hardware and consumables is out of control. This is Seattle! Why don’t we have access to a few options?
3) The support. If I’m looking to buy a cell phone I get instant service and the person helping me is the Rain Man of cell phone factoids. If I am looking for a 28pin DIP socket I’m better off finding it myself.
4)etc
5)etc…..

What am I going to do about it? I left The Shack, bought a domain, put together a temporary site, lined up distributorships with my favorite companies and started a Kickstarter campaign. I have reached the point where I am willing to risk my own time, credit and cash to see if there are any other like minded people out there in this market of around two million.

Check it out here: http://www.kickstarter.com/projects/aromaoftacoma/not-another-seattle-hackerspace-literally?ref=live

Please forward the link on if you live in the Northwest or empathize with the situation.

Advertisements

I have been working on modifying a Linksys router (WRT54G) that I picked up at Goodwill into a controller for an electric wifi controlled wheelchair robot. Along the way I found a cheap way to control an LCD remotely. Enjoy!

My parts list is:
(1) Blue, 4×20 LCD w/ LCD117 from Modern Device
(1) RBBB Arduino Clone from Modern Device
(1) Linksys WRT54G V2 from Goodwill running DD-WRT
*This tutorial will include the use of a Linux machine running Ubuntu 10.10. If you’re using a non Linux machine you’re on your own…. Sorry.

Why don’t you see a level shifter in the mix? The ATMega328P in my Arduino clone is fine with reading 3.3V logic on the RX pin. On side note, the chip is fine running at 3.3V source as well. This has been demonstrated by JeeLabs for a few years now.

So let’s begin……

The LCD wiring is as follows –
*This will work with the liquid crystal library as well if you don’t have an LCD117 board.
LCD power (LCD117) comes from one of the RBBB pins labeled as 5V.
LCD ground (LCD117) comes from one of the RBBB pins labeled GND.
LCD RX (LCD117) comes from the pin labeled PIN 9 on the RBBB.

The WRT54G wiring is as follows –
*You’ll have to verify the pin out of your specific router. This is documented on line pretty well. On my V2 the serial port is the 20 pin connector on the right front of the board.
RBBB GND pin to pin 9 on my router’s serial port.
RBBB RX pin to pin 3 on my router’s serial port.
This is it! I soldered female header to my router’s serial port in lieu of wire.

** I added an external 2.1mm power jack to my router so I can connect my clone to the router’s 12VDC supply. This is pretty wasteful but it saves me a few parts when the router is running on battery power.

Here’s the specific Arduino sketch I’m using to hand characters from the router, through the Arduino to the LCD. I guess in this example I’m using the Arduino as a level shifter that can do other stuff.

#include
#define txPin 9
int incomingByte = 0;
SoftwareSerial LCD = SoftwareSerial(0, txPin);
void setup()
{
Serial.begin(9600);
pinMode(txPin, OUTPUT);
LCD.begin(9600);
LCD.print(“?G420”);
delay(500);
LCD.print(“?Bff”);
delay(1000);
LCD.print(“?s6”);
delay(1000);
LCD.print(“?f”);
delay(10);
LCD.print(“?c0”);
delay(300);
LCD.print(“routerBot ACTIVATED?n”);
LCD.print(“?n”);
LCD.print(“root@192.168.2.1?n”);
LCD.print(“echo ## > /dev/tts/1”);
}

void loop()
{
if (Serial.available() > 0) {
incomingByte = Serial.read();
LCD.print(incomingByte,BYTE);
}
}

Download the sketch to your Arduino board.

Next, in your router’s admin page enable SSHD. Again this is documented on line pretty well.

Now let’s SSH in to the router-
Here’s how I do it.
Connect to your router via WiFi or an ethernet cable.
Open up a terminal. (CTL+ALT+T)
Type “ssh root@192.168.2.1”. This is my router’s IP address. Yours may be different.
You may have to type “yes” next.
Now enter your router’s admin password.

Once you’re able to open up an SSH session with the router let’s slow down the serial port comm speed.
Type “stty -F /dev/tts/1 9600.”

If you’ve wired everything correctly reset the Arduino and you should see a message on the LCD. If it doesn’t work try resetting the board and waiting a few seconds.

Now, if we’ve done everything correctly to this point we can send a few characters over.
Type “echo ?f > /dev/tts/1”
This should clear the LCD. Replace the “?f” with whatever text you like now. “?n” will get you to the start of the next line on the LCD.