What are the pros and cons of the different types of connection for screens?
They differ on the following attributes: speed, distance, multiple screens, reliability,
What is your need?
Want a screen to display atmosphic information like
Temp
Station Pressure
Humidity
Pressure
Angle
and a few more.
Different size fonts to emphasize the information.
So max 50 bytes of data?
Screen size?
Graphical or Text?
How often do you want to refresh the screen?
Serial screens often stop at 19K2 where I2C goes up far beyond. But it also depends on the type of screen. I have an STN I2C screen which is really slow displaying what it received fast.
I would say 80 byte to be safe.
Around 2-3 inch screen on the long side.
Graphical
refresh every second
I did not know there was a limit to the data you could send to the screen.
Thanks for the help
Don't know if you have considered cost factor or not. Smaller serial character displays costs about 20-25USD. I don't know about graphical ones. 2" seems awfully small for that much info.
Curious, why serial or I2C? Have you got not enough pins for a parallel interface LCD?
liudr:
Don't know if you have considered cost factor or not. Smaller serial character displays costs about 20-25USD. I don't know about graphical ones. 2" seems awfully small for that much info.Curious, why serial or I2C? Have you got not enough pins for a parallel interface LCD?
At this point I don't know the diffrence between serial, i2c or parallel.
what I'm making is a handheld device that can measure temp, barometric pressure, humidity and angle. Make some calculations and display it all on graphical display with a button for some setting changes.
which screen would you recommend for this?
I use character displays most of the time. They are cheap and relatively easy to interface with well-documented library as a part of arduino release. But they have limited space. If space is limited on your device and also battery power, you may want a smaller OLED display. They're not very popular yet so examples might be harder to find.
If I were you, I might invest a little on a regular (HD44780) 16X2 character display due to its simplicity and price to just prototype the project. Your project is mostly your calculations and measurements, not your display. Once you nail that, you can migrate to any display you want so why not start easy with an easy display and save the trouble for later? ![]()
smoothisfast:
liudr:
Don't know if you have considered cost factor or not. Smaller serial character displays costs about 20-25USD. I don't know about graphical ones. 2" seems awfully small for that much info.Curious, why serial or I2C? Have you got not enough pins for a parallel interface LCD?
At this point I don't know the diffrence between serial, i2c or parallel.
what I'm making is a handheld device that can measure temp, barometric pressure, humidity and angle. Make some calculations and display it all on graphical display with a button for some setting changes.
which screen would you recommend for this?
There area a few other things you will need to consider that will probably drive the decisions
especially since you are talking about a hand held (more than likely battery powered) device.
First a bit about parallel vs serial vs i2c (and SPI)
Note: for pin counts I am not counting power pins since they don't consume AVR i/o pins.
Parallel is just that, all the connections to the device are in parallel and each electrical function is
on a separate wire which consumes a pin on the AVR.
A typical character lcd (HD44780) display will need anywhere from 6 to 11 pins.
A typical glcd (ks0108) display will need 13-14 pins.
Serial (we will assume asynchronous TTL which is what the Arduino Serial class is)
typically uses 2 pins. TX, RX
The TX line transmits data and the RX line receives data.
With serial you normally cannot talk to more than one device using that
pair of wires. i.e. it a connection between 2 "things".
I2c is also serial and uses 2 pins (SDA, SCL -- serial data, serial clock)
but works completely differently than asynchronous serial.
i2c is a master/slave "bus" in that you can hook up more than one slave
and share the same 2 wires for multiple devices.
So theoretically, if the display and all your devices uses i2c they all
could use the same 2 pins for communication.
SPI is yet another "serial" interface.
SPI is a synchronous serial interface.
SPI cannot be shared by more than one device like I2C.
In some cases a LCD panel may say it has a "serial" interface but you need
to look closely to see which one. And sometimes it may even support more than one.
Which type of device is "better" is hard to answer as you really have to look
at things from an entire system perspective rather than each individual component
to ensure everything will play together.
For example with parallel connections you often cannot share the pins for other functions
(other sensors in your case) so it can use up precious pins that may not be available
depending on what else needs to be hooked up.
You also have to consider product and software library availability.
For example, if you want to use a graphical display, you will want to ensure
that you have a software library and that will limit which displays and the types
of interfaces. The current glcd v3 library only supports a ks0108 display
in parallel mode.
The advice I would offer is to take a step back and really home in your requirements/needs
for your device. Things like physical size and power availability can really limit your choices.
For example does this device need to run for extended periods of time on batteries?
If so then certain things will not be possible or you may have to carefully manage your power in s/w.
For example the backlight on some of the glcds can consume more power than is available
when using small batteries.
You have to get out the knife and cut down the "wish" list back to reality.
Here are few things that may help you:
- Character displays (HD44780) are typically 8x1, 8x2, 16x1, 16x2 characters or 20x4 characters. (16x2 being the most common)
- HD44780 displays use a fixed font but usually allow defining 8 custom characters.
- GLCDs (ks0108) are typically 128x64 pixels and the glcd library allows custom fonts and bitmaps
- lcds like the white pixels on blue displays always require a backlight (even in direct sunlight) in order to read the display
where as the black on green/yellow do not require a backlight when the ambient light is high (like outdoors). - ks0108 displays consume more power than HD44780 displays. The backlights on ks0108 can be as much as 200ma+
- HD44780 displays regardless of mode are usually easier to hook up and consume less code space.
You can easily find graphical (ks0108) 128x64 displays for under $20.
128x64 graphical displays are about 1.5"x3"
But also keep in mind that while a 16x2 display may sound limiting, you might be able
to effectively use one by having modes or scrolling through the different sensor data by pushing a button.
You could even define a custom character/icon for each type data to "fancy" things up.
I'm not sure what you will be using for your base board, whether it is a stock arduino or whether
you will be building your own board with something like m328p on a proto board.
Keep in mind that a standard Arduino board typically isn't very power effective so if you want/need
to run this off batteries for an extended period of time, using a stock arduino won't get you there.
If you are using a standard arduino and don't have very strict power requirements you might
consider using an lcd shield.
There are many out there but here are two examples:
http://emartee.com/product/42054/Arduino%20Keypad%20LCD%20Shield%20V2.0
Both of these will get you up and going immediately as they will work with the liquidcrystal library
and you have buttons available for a user input.
The green one, while a bit more costly, also has connections for other sensors without having to
use any other additional shield. The green one also has a backlight switch so it be used without
the backlight to save power.
Hope that helps.
--- bill
About back lights, color lcds can't be viewed even under daylight without backlight. Mono lcds like ks0108 and hd44780 are perfectly visible under moderate illumination. OLED displays don't need back light but probably consumes very little when all pixels are black.
bperrybap:
SPI cannot be shared by more than one device like I2C.
You can have as many devices as you want on an SPI bus, but each device requires it's own select pin.
4D systems serial OLED screens are quite easy to use, and they're quite visible with general ambient light, but completely unreadable in direct sunlight. Maximum current draw for a full white screen on the 1.5" screen is something like 100ma IIRC. I assume that other OLED displays perform similarly.
If I were working on this project I2C vs. serial wouldn't even be on the list of decision factors.
Wouldn't that depend on the distance involved?
Don
floresta:
If I were working on this project I2C vs. serial wouldn't even be on the list of decision factors.
Wouldn't that depend on the distance involved?
Don
I've not dealt with this situation where the display is more than 1.5 foot-length wire away. I used ide cables up to 18 inches on hd44780 parallel interface. So what's the pros and cons in terms of larger distance (maybe up to 6 ft) of the several interfaces and possible cabling? I'm not at the moment doing this but may want to do this for a future project. I have made my serial panel already but that is a bit overkill for simple projects.
bill, thanks for the education.
I'm taking your advice and will get the LCD Shield.
My device will only be on for 20 - 30 min at a time, when the user wants the information.
smoothisfast:
bill, thanks for the education.I'm taking your advice and will get the LCD Shield.
My device will only be on for 20 - 30 min at a time, when the user wants the information.
With only 20-30 minutes of run time you should be fine with something as simple
as AA batteries, assuming your sensors are not battery hogs, which they
shouldn't be.
The lcd shield route is but one way of many possible ways to go.
A bit more to look at, hopefully, it isn't adding additional confusion....
For example you could also go without a shield and use a small lcd backpack that provides serial
or i2c control over a character lcd (16x2 or 16x4) as well as a 4x4 keypad, or wire up your own
buttons.
example: (not in the US but has some neat lcd backpacks, with and without the actual lcd)
http://www.byvac.com/bv3/index.php?route=product/category&path=41_42
Their stuff is also on ebay:
http://stores.ebay.com/ByVac-Electronics/_i.html?rt=nc&_sid=127240190&_trksid=p4634.c0.m14.l1513&_pgn=1
One nice thing about the backpack handling the keypad is that it will do all the keypad/button
debouncing.
If you do decide to go down the character lcd shield route, make sure to look closely at them
as, there are a few different versions floating around. There are several of them
on Ebay. Some have additional holes and/or headers on them for hooking up additional i/o control/sensors.
Some can control the lcd backlight in s/w using D10, some have a switch for the backlight, and
some have the backlight wired permanently on.
The ones I've seen with s/w backlight control default to having the backlight on and then you
can turn it off in software or use PWM to control the brightness of the backlight.
So look closely before you buy.
If you need help determining this information just ask.
Not sure how big/thick you want to go but if you have the room, you could also wedge a
sensor shield in between the arduino and the lcd shield to provide the sensor connections
if you go with a lcd shield that does not have the additional headers or if you want/need
the connectors/wires to not stick straight up but rather out the sides.
In that case, you could use the cheaper lcd shield without the extra connections and then
use the sensor shield for additional sensor connectors.
The sensor shield would give you up to 6 connectors that
can be analog inputs or digital outputs, or 4 connectors and one I2c connector.
(i2c uses 2 pins and so you can't use 2 of the 6 connectors when using i2c)
The sensor shield is usually called something like "arduino analog shield v4".
Here are a few examples of the v4 sensor shield.:
http://emartee.com/product/41798/Arduino%20Sensor%20Shield%20V4.0
--- bill
So what's the pros and cons in terms of larger distance (maybe up to 6 ft) of the several interfaces and possible cabling?
I2C was originally designed for communications between integrated circuit chips on the same PC board. As far as I know (which isn't very far) it is limited by the maximum allowable capacitance and various techniques have been developed to allow I2C communications over somewhat longer distances than originally thought possible. So if you want to reliably use I2C for distances more than several inches you will have to investigate some of those techniques.
Don
Again thanks for all the info. Im sticking with the lcd shield for this project. Looks like the easiest way to do this.