LCD Display on Segmeter

43 views
Skip to first unread message

Robb01

unread,
Dec 20, 2010, 6:30:47 AM12/20/10
to Aiko distributed platform
Hi all
I am interested in adding an LCD display to the Segmeter with a
pushbutton to scroll through the 3 power measurements and 3
temperature measurements. A second LCD line would show a description
for the data point. The display would go to sleep after a delay until
the next time the p/button is pressed.

The aiko-node.pde includes lots of code for displaying the data from
the arduino but will it suffice to have the LCD-displayed variables
stored as memory variables in the code or would a separate storage
device e.g. SD card etc. be required? I imagine the stored variable
data would only need a one-minute-or-so update. I suspect SD storage
would not be necessary but is that how others see it?

Thanks
Rob

Jonathan Oxer

unread,
Dec 20, 2010, 6:51:51 AM12/20/10
to aiko-p...@googlegroups.com
On Mon, 2010-12-20 at 03:30 -0800, Robb01 wrote:
> I imagine the stored variable
> data would only need a one-minute-or-so update. I suspect SD storage
> would not be necessary but is that how others see it?

SD storage shouldn't be required unless you want historical logging of
data on the device itself. If you just want the LCD to display the
latest readings it should be possible to do that by using global
variables to store the readings, and then reference those variables in
the routine that sends the values to the LCD.
--
Jonathan Oxer
Ph +61 4 3851 6600
* Freetronics (www.freetronics.com)
* Arduino Shield List (www.shieldlist.org)
* Practical Arduino (www.practicalarduino.com)

Sam Sabey

unread,
Dec 20, 2010, 5:27:42 PM12/20/10
to aiko-p...@googlegroups.com
Hey Rob, Jon,

While I haven't implemented an LCD on any of my displays, I do know Andy's Pebble does just this using the Aiko components of the code. They aren't in the SEGmeter codeline at the moment, however they could be re-inserted as new handlers.

From what I understand, the LCD just outputs the current value in the global buffer and updates at the same rate it's changing.

Sam.

> --
> You received this message because you are subscribed to the Google Groups "Aiko distributed platform" group.
> To post to this group, send email to aiko-p...@googlegroups.com.
> To unsubscribe from this group, send email to aiko-platfor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/aiko-platform?hl=en.
>

Andy Gelme

unread,
Dec 20, 2010, 10:27:24 PM12/20/10
to aiko-p...@googlegroups.com
hi Rob,

On 2010-12-20 22:30 , Robb01 wrote:
> I am interested in adding an LCD display to the Segmeter with a pushbutton

As Sam mentioned, there is existing code in the Aiko code base for both
these functions.

The Aiko LCD code supports either a directly connected LCD screen that
uses 6 (or 7) Arduino pins ... or an LCD screen connected via an 8-bit
shift register/latch that requires only 3 Arduino pins (the source code
provides documentation ... it's the same as the Pebble hardware).

Also, as Sam noted, the sensor value poll rate and LCD display rate are
linked. I intend to allow different rates for sensor polling, display
updates and (serial) communications transmission in an upcoming version
of the software.

> The display would go to sleep after a delay until
> the next time the p/button is pressed.

This could be managed by another Aiko timer handler.

> The aiko-node.pde includes lots of code for displaying the data from
> the arduino but will it suffice to have the LCD-displayed variables
> stored as memory variables in the code or would a separate storage
> device e.g. SD card etc. be required?

As Jon mentioned, global variable storage is sufficient for your
application.

In trying to create a modular system, I have a strong preference against
global variables. Unfortunately, the Arduino development environment is
less flexible than working in a completely unrestricted C / C++
development environment.

I intend to provide a structure for specifically managing sensor output
variables for display and communications purposes that promotes
modularity ... and avoids potential collisions in a global name space.

Just have to be careful about the limited RAM space in an ATMega processor.

--
-O- cheers = /\ /\/ /) `/ =
--O -- http://www.geekscape.org --
OOO -- an...@geekscape.org -- http://twitter.com/geekscape --

Luke Weston

unread,
Dec 21, 2010, 9:50:19 PM12/21/10
to Aiko distributed platform
On a SEGmeter, Arduino pins 0 and 1 are dedicated to the AVR's UART as
usual, pins 2 and 3 are used for the pass-through software-UART (if
that functionality is used, which it probably won't be in your case),
4 is unused, 5 is used for the 1-wire temperature sensors, 6 is
unused, 7 is used for the relay, 8-12 are unused, and 13 is used for
the indicator LED.

So, you can use pins 2 (usually), 3 (usually), 4, 6, 8, 9, 10, 11 and
12.

So, you can easily wire up an LCD display to those pins, using 4 bits
of data, plus enable, plus register select, plus read/write select
(although that latter pin doesn't normally need to be used, you can
just tie it to ground.

Then, just tweak the code to enable the use of the Aiko LCD display
"driver" code along with the rest of the code needed to support
SEGmeter, and tell it what the appropriate pins are that are used for
the LCD.

And you should have at least one pin left over for a button, too. For
the button you'll need to pull the pin low by default with a pull-down
resistor and make the button pull it high - or vice versa.

Robb01

unread,
Dec 23, 2010, 6:57:31 AM12/23/10
to Aiko distributed platform
Hey guys
Thanks for your replies. Looks like I have some work to do on the
breadboard!
Is there any advantage one way or another between the 7 pin connection
to the LCD vs the 3 -pin connection method via the MC14094 shift/latch
register - apart from the obvious one of using up a larger number of
available arduino pins?

Thanks
Rob

Luke Weston

unread,
Dec 23, 2010, 9:06:07 AM12/23/10
to aiko-p...@googlegroups.com
On Thu, Dec 23, 2010 at 10:57 PM, Robb01 <rebr...@gmail.com> wrote:
Hey guys
Thanks for your replies. Looks like I have some work to do on the
breadboard!
Is there any advantage one way or another between the 7 pin connection
to the LCD vs the 3 -pin connection method via the MC14094 shift/latch
register - apart from the obvious one of using up a larger number of
available arduino pins?


Disadvantage: Uses up more of the pins.
Advantage: Simply that it does not require actually using the shift register IC. Much more straightforward to wire up. 

:)

Luke
Reply all
Reply to author
Forward
0 new messages