Showing posts with label Hardware. Show all posts
Showing posts with label Hardware. Show all posts

Thursday, 20 January 2011

Adventures with the Omnima LCD Panel

I have recently picked up an Omnima LCD panel, a 3.5” QVGA (320x240) USB powered LCD panel with an SDCard slot and the ability to control it like a serial device over the USB port using the included cable.

Having an ARM7 based processor and a 2D graphics engine, it promises to be a great little versatile display panel for outputting information not requiring a full screen (sensor information e.t.c, news feeds, that sort of thing).  Plus, many of the LCD panels available on the internet either require an additional controller or some curious interfacing to be able to drive it.  For not a lot of cash, this prebuilt solution seems to be an ideal choice.

So that's the good bit – the bad bit is that there doesn’t seem much support for it.  The supplier forums are quiet at best (and not accepting new sign-ups) and there doesn’t appear to be much documentation other than the PDF’s on the Omnima website/forum.  I suspect there may be more available if you buy the SDK tools, but these are expensive to say the least.  Plus, I don’t have that much interest in writing new code for the screen CPU because I believe the inbuilt functionality is enough, and I’m not skilled in C++ development.

Anyway, the screen (version 3 as shown on the website) itself works with LCDSmartie (I’m using v 5.4.1) and the DLL included in the forum worked after a fashion.  The OmnimaLCD.cmd file included in the ZIP file isn’t quite right.  The standard command ends up rendering every serial command to the screen, rather than the result of the command.  The below command sets it up properly.

#@Term MW Off
#@Term FW Off
#@Cls
#@FrColor 0 255 0 0
#@FloatWin Open 10 10 240 320
#@Line MW 10 10 50 10
#@Line MW 10 50 10 10
#@Line MW 10 190 10 230
#@Line MW 10 230 50 230
#@Line MW 270 10 310 10
#@Line MW 310 10 310 50
#@Line MW 270 230 310 230
#@Line MW 310 190 310 230

This turns off any terminal command writing to the screen, creates a black box on the screen, creates a float window to render the text in, and draws some nice green lines at the edges screen which I think look quite nice.  One thing to be aware of,  you can use 4 x 20 screen setting as recommended, and you can use 4 x 40 setting.  However, on the latter, if the text exceeds the screen width, you get text wraparound where it runs around onto the left of the screen.  Not so bad if you don’t have scrolling text and format your text lines appropriately.  Also, the on screen left position seems to be set in the DLL file – I had a bash at editing what looked like the command in a HEX editor, but to no avail.

A note really for myself – the line plotting code consists of x horizontal poz, x vertical poz, y horizontal poz, y vertical poz. 

The one thing I need to work out now is how to render pictures to the screen – apparently supported, but I’m not getting much joy with it.  The graphics processor apparently supports JPEG pictures, but when I try and load it, the unit locks up and needs a power cycle.  The documentation suggests I need to use the “oimage tool” to convert from JPG, PNG e.t.c to a compatible format:-

To generate files suitable for loading using FileToSSD you can make use of the oimage tool. This tool can load all popular image file formats such as jpg, gif, bmp and more, and save the file in the SSD compatible format.

I’ve Googled the heck out of oimage and SSD compatible format, but can’t find anything of relevance – if anyone has any clues, please leave me a note.  I’ve asked Omnima directly, but not yet had a response.  Given that the device is basically a mini picture frame, it would be nice to be able to load and display pictures as well as vector graphics, especially as the latter can be quite slow (I would guess at 500ms per line) on the LCDSmartie example above.  The documentation suggests that picture loading can be quite quick, but we’ll see. 

Finally, id like to get it working in LCD4Linux – I cant see it being too difficult if its just got to send information via text strings, but that's a project for another time.

Tuesday, 11 May 2010

e.On Smart Meter development.

I have an eOn AMPY (Now Landis Gyr+) Smart Meter to monitor my electricity usage as well as a similarly enabled Gas Meter.   It also comes supplied with an eOn branded ‘ecometer’ which shows you energy usage on a current, daily, weekly, monthly and quarterly basis.  Because the smart meter is attached to the grid via a GPRS/GSM modem link, it is also ‘tariff’ aware, such that it gives an indicative figure on your bill.

However, the bit between the ecometer and the supplier’s website is where it all goes wrong – if you want a detailed understand of your power usage, you’re a bit stuck.  Because you can only see ‘current’ usage as a number, if you want to know how much you were using 15 mins ago, you’re stuffed, because the display isn’t detailed enough, and the website only updates on a monthly basis,

So, my plan is to try and understand the technology to see if there is a way of extracting the ‘live’ data as its transmitted from from the meter to the ecoMeter display, and I intend to track my progress here.

So, to start:-

Meter is an AMPY 5236E-Y which apparently has an mbus low power radio in it.
The ecoMeter display is an AMPY Model 5262

Inside the 5262 is a PCB with the LCD soldered to the front of it. However, there is a daughterboard tucked behind the LCD with a TI CC110, what looks like a Crystal Oscillator (ACT K7 26.00SCA) and a chip I can find no data on, but has the serial number 90-13026 037 something 7373vg.
Unfortunately I can’t currently see the controllers on the main board because of the LCD, but there is one ‘major’ microprocessor, and one small one. I suspect this is really just a logic chip and LCD driver.  The motherboard has the following stickers on it:
46228938A1-AG
AML2008/01/28-38A1/AG
There is also a 9 point (3x3) contact patch on the back of motherboard which may be either a programmer or output. This is accessible from outside the case, if that makes a difference.

What I need to find out:-

More about the MBus Protocol
If there is any encryption between the meter and the display panel.
Any control panel options for the ecoMeter – e.g. is there a PIN to set or the like, and how this relates to the meter itself. Additionally, are there any hidden menu’s e.t.c.