An
Interactive Display
Update
6 23rd May 2007
Things are going quite well now.
Ethernet: I now have my bought Ethernet stack (Shortcake) working as designed and broadcast messages are getting sent and received without any problems. Sadly this is where the good news ends. It turns out the original author only implemented a very minimal implementation of TCP to get the demo web page to work. I need a somewhat more complex version with mulitple socket support so it has been off to the library to try and understand TCP.
Tools: My main resource has been a book by Fred Eady called Networking and Internetworking with Microcontrollers. This in addition to one of his Atmel ATMega32 Ethernet enabled boards has enabled me to understand most of the intricacies of socket based Ethernet communications. To cut a long story short I now have the Telnet code working so I can configure the unit using this application. I am now working on the code for the other sockets I need.
The design
I have added some more funtionality to the main PCB including another EEPROM/FRAM chip space. We'll see if this is needed further down the road. At the moment I have two working prototypes which I am very pleased about.
So far so good. I am going to send off for another PCB prototype soon but in the mean time it is more Ethernet stack coding. This is time consuming and at times frustrating but I am getting there.
Update
5 12th February 2007
Wow, hasn't this project taken a long time!!
OK, things have not been static and I am pleased to say we are getting there wherever there is....
I have been working on the individual elements of
the design which are the screen, the touch screen, the ancillary components
and the Ethernet interface.
Ethernet: This was hard to build the hardware but the bought software works
quite well on it. Unfortunately it no longer compiles under the latest version
of the compiler so some work is needed there.
Screen: I had some bugs in here but on the whole it was a slow but rewarding
trip to a fully working graphic screen.
Touch Screen: This is proving a challenge. The original chips to achieve this
were 1 pound and 50 pence but just after I placed an order for the minimum quantity
(140) the suppliers trebled the price. I could not afford this and felt rather
used too so I used the original money paid to get more screens and decided to
find another touch controller.
The one I have found is from Maxim. I now have this mounted and mostly working
although getting a reliable reading from it is proving a challenge. This is
really a work in progress so I am hoping to solve this in software over the
coming week(s).
Ancillary components: These include the EEPROM/FRAM, Real Time Clock and distance
sensor. Work is still needed here but this should be quite easy as I have working
examples from other projects. I have also added a takeoff for the SPI interface.
Hopefully this will enable the addition of slave units for other tasks but with
a communications link to the main processor which will add some intelligence.
At the point of writing I have the latest PCB with the screen and touch screen assembled and working. I am working on the touch screen code now and will start assembling the Ethernet hardware soon.
My plans have changed slightly too and the screen will be available in two guises. These may run from the same code base of not, time will tell. Essentially though there will be a standalone version which will not need a controller e.g. a PC and the dumb version which will.
Since I don't have a PC running 24/7 I will obviously be using the standalone version. Tasks I have in mind for it are to remind me to take the rubbish bin into the road on the appropriate days, list the tasks for the kids in the morning/evening etc. anything which is schedule based. As time goes by I hope it will become a little more interactive but the early versions will be quite simple.
By contrast, the PC based version will have a lot
of immediate functionality including things like alarm clock, calendar and many
other tools/applications. These work by the graphic display acting as an extension
of the PC offering a small 128X64 display with touch input. The PC will format
the screens and send them to the graphic display. The user will then press selections
according to whatever is shown. These are returned to the PC which then takes
actions. etc. etc. There will be no smarts in the graphic display other than
those needed to run it and process Ethernet messages etc.
Update 4 22nd December 2004
All the design work is now done for the prototype board and I have tried to send off the files for production. Sadly there was one mistake where I was specifying a hole to be drilled within another hole and they didn't seem to like the resolution I had output the files at. I have now rectified these and recreated the files only to find the PCB manufacturer has gone on holiday until the new year. Never mind, I will send the files off before Xmas so they are there waiting for them on their return.
Update 3 21st November 2004
Here we are again, another chunk of time since the last update and I have been busy as always. As below the design is constantly evolving and as before some of the features have moved on. In summary:
1) The sound board is now a separate microprocessor with its own PCB. I am now thinking this will be an add on board as not everyone will want sound and it won't be as cheap as chips (sadly). The reason for this was the processor intensive nature of the sound and there simply wasn't the cycles available in the chip running all the other software.
2) The temperature reading facility I had planned will now also read humidity. Currently I am only planning the one sensor mounted in the unit somewhere. This is a Sensiron device - the SHT11 for your interest. At the moment I have not worked out how the mount the unit or hence the package needed.
3) Manual buttons are out ;-) I am now planning touch sensitive ones using the Qprox capacitive change sensing technology. The exact chip is likely to be the QT160. The development kit is so mesmerising I often find myself playing with the switches and LED's rather than actually working on my design.
I am now making my second and hopefully the penultimate prototype board. There are two big changes on this board from the original.
Firstly I am going to solder the microprocessor directly onto the board this time rather than using my homebrew ZIF mount. This means the layout will be very similar to the final version.
Secondly I plan to get this board made professionally. It took me over a month to get my original one working due to broken tracks (hairline cracks where the etchant was a little keen etc.). There was also the small matter of mistakes I made and bits where I simply changed my mind.
Anyway, it will take me another couple of weeks at least to finish the design as it is all routed manually plus the turnaround time for the actual PCB. After that I then have to solder everything on and test. Lots of time there sadly.
I have also been working on the PC software which has come on leaps and bounds. I now have the framework of how it is going to work and the design features working for the screens that will be displayed on the controller hardware. I have lots of ideas here but tend to concentrate on the software side when I am away from home for (usually) business reasons.
Hopefully there will be more to add soon as the prototype comes back to me and I get it working.
See you all again soon.
Update 2 14th June 2004
Well, well, it is now nearly a year down the road from the last update and hasn't time flown by. On the good side though I have been very busy with the project and actually now have some pretty dramatic news to write about.
The design:
The design has changed a bit from my original ideas as I guess was only to be expected. The original ideas about using a text based menu system worked well in practice, it was just that is could be so much more. The working text based system was demonstrated at UKHA2004 and whilst it was liked by all that saw it a common question was 'will it be touchscreen?'. So, with this in mind I have been experimenting with the touchscreen version I have. I am pleased to say that it looks good and future development will be along this direction.
So, the main features now are
1) Touchscreen interface with the screens being designed on a PC.
2) Ethernet interface for screen downloads and transmission of data messages i.e. the message the user configured the unit to send as the action from screen choices.
3) Atomic clock interface if you fancy connecting the aerial and parts readily available from Maplin.
4) On board real time clock for those little power cuts.
5) All data stored in non volatile memory.
6) All menus and screens updatable dynamically without rebooting the unit.
7) Bootloader installed so the firmware can be updated from a PC serial port.
8) Hopefully the ability to make some sort of sounds. This is still untested on the prototype at the moment.
9) Lots of non volatile memory in the form of serial EEPROM. The exact amount is still undecided
10) Switch mode power supply for cool running (I hope as I have not tested it yet).
The prototype:
Progress was very rushed whilst trying to get something working for UKHA 2004 and it was a struggle. I was literally fixing the last bugs 10 minutes after arriving and setting up. I managed it and all went well as hopefully the video will show. The only sad fact was the Ethernet interface was not working for the show. It has taken me from then (mid may) to mid June to get this working but it is alive and well now.
As can be seen from the photos I made quite a lot of mistakes on the version 1 design, but hey, that's what prototypes are for. A little bit of fancy soldering and correct the circuit diagrams and all was well.
Next steps:
Lots of bright ideas here but I have to write a whole load of code first so watch out for the next update............
Update 1 6th July 2003
Well, here we are a wee way down the road now and things are finally coming together. I think I have my connectivity sorted with a development board from www.prllc.com. This came with an Ethernet stack called Shortcake and all the source code to go with it. Currently I am building a prototype design for the above reference design but PCB production is a way away yet - see the next paragraph.
This is because I am working on the menu system for the project. I have set myself a design brief to allow the user of the menu system to set up their own menus which should be changeable within the design specification. Actions or what the device will make things happen should be supported on two levels. Firstly built in fuctionality for example the X-10 schema etc and if possible to allow user definition of schema based actions. Anyway, so much for the lofty aims. At the moment and since Christmas I have been working on the actual menu and display routines as well as the VB application which allows me to design and change the menu structure. This has been very tough going but I am nearly there now I think. A bit more testing and we will see.
Pictures to follow.........
One
of the things missing from my slowly becoming automated house is a neat way
of interacting with it all. I can do anything I like with a web browser or tablet
etc. but these are all little computers sitting around the place that sadly
does not get SWMBO approval. What I need is a discrete always on way of talking
to ‘the house’ and getting things to happen or extracting information. Typical
things we need to know are ‘how long till the heating switches off’ or ‘is the
watering on and if so which hose and for how long’. All available at the click
of a mouse, just no handy computer most of the time ;-(
So,
what’s the solution? I looked around for something off the shelf and could not
see anything that would do what I want. Things that came close cost way more
than I could afford so I either have to do without or build something myself.
Never one to shy from a challenge I am now trying to build something myself.
So,
what’s first. As you may have seen from other areas of the site I do a little
programming of micro controllers so this seemed a good starting point. I have
been caught short by choosing too small a chip (in power that is) before so
not this time. I am developing on a 32k ATMega32 and aim to end up on an ATMega128.
These are very capable chips so fingers crossed they will work a treat.
Next,
find a display. I looked at normal character LCD displays but these were not
very cheap despite their reputation so the hunt was on for something better.
Eventually I spoke to a friend (Stuart Poulton) who pointed me towards Apollo Displays who
do a gorgeous range of screens. I have settled on a 128 by 64 mono graphic display.
Mono does not do it justice as it is white on blue and it looks lovely.
So
far I have it working on my development system and have written most of the
low level primitives and some high level routines. See the page
on the grahic display board for more details.
I
can now print text starting anywhere on the screen in blue or white. I also
have the option to reverse the current pixel colour so my text can cross from
a blue to white area etc. I can also draw squares, rectangles, circles and ellipses
with a fill option. Very satisfying I might add not to mention adding greatly
to the usefulness of the display.
Other
plans:
I
have been looking at how to interact with the unit and am leaning towards a
digital rotary switch which I hope to use to scroll around the screen and for
text input etc. There would have to be a button or two for select and cancel
but I have not really thought these through too well yet – one step at a time.
Finally
there is connectivity to consider. Initially I will be using serial as it is
an easy and proven method. I am looking at Ethernet too but this is very difficult
without bumping the cost through the roof, we shall see.
One
last note:
This
will be the biggest project I have undertaken so far and there is a lot to consider.
I will probably have to use external
RAM and maybe EEPROM for the Ethernet stuff both of which are new to me. There
is I/O from the rotary and normal switches with all the usual de-bounce problems.
On the programming side writing the interface to a hardware TCP/IP stack is
something I am definitely not looking forward to. A lot of the components I
have to use are only available in surface mount and some of these I can barely
see let alone solder. An example of this is the connector for the ribbon cable
on the graphic display. The pins are on a .5mm pitch meaning .3mm of pin then
.2mm of gap repeating for 30 pins. This is the worst of them but essential never
the less. Watch this space for how I manage to solder this (or give up and get
someone else to do it meaning more money going out). The case will also be difficult
and this is usually one of the more expensive bits too. All that electronic
wizardry and a lump of plastic costs almost as much. So, lots of challenges
and no short cuts in sight.
My plan is to make these to sell and they will be
xAP powered (as the messaging protocol). Hopefully I will be able to get the
cost around 100 pounds but it is way too early in the project to decide that.
Sadly the component cost is quite high and not having the power to bulk buy
my hands are a little tied here.
I will also be using this as the basis of my stand
alone controller for my irrigation stuff. 80% of the coding and hardware is
the same so it makes a lot of sense to combine the two products for as much
of the life cycle as possible.
This page last updated on 23rd May
2007