Sunday 25 October 2015

Wedding favours... that seems like a good idea...

So... another big blogging gap - work had a fair amount to do with it, but the main thing most of this year has been getting ready for the wedding!

The beginnings of the Notey...

To catch up where we left off, Anna said yes.  This was wonderful news, but meant a wedding needed to be planned!

I'm not entirely sure where the idea originally came from, to be honest - someone probably mentioned web favours and that set the ball rolling... we have enjoyed some lovely stuff like home made fudge, and while I like to think I'm a pretty decent baker, felt I wanted to do something a bit more techy to go with the engagement ring.

While it would have been quite simple to do something with flashing lights and an Arduino, I wanted something that could serve a useful purpose... that would see use after the wedding day.  Since doing the engagement ring, I had been researching low energy screens and this seemed like it could be a prime candidate.  I liked the idea of a display that could be put on a fridge and updated remotely from a phone or tablet, to leave messages or make lists.

The microcontroller

I had done the engagement ring with the PIC32 because it was a powerful, cheap microcontroller with a simple IDE... its big weakness was power management, which unfortunately in this project was a critical requirement.  So a change would be needed...

For low power with reasonable speed, ARM is an obvious option... there are a variety of cores available with different power/performance footprints, and for my requirements, a Cortex M3 seemed about right.  I had got an EFM32 evaluation board about a year previously but had never taken the time to get to know it... this seemed like as good a time as any!

The one in particular I had was a Leopard Gecko... this one has an M3 core along with 256KB Flash, and 32KB of RAM.  The maximum speed is 48MHz, which requires a dedicated crystal, rather lower than what the PIC32 can do, but that doesn't matter much for this application - the critical thing is that the sleeping is very efficient.  The EFM32 has several energy level modes... EM0 is when the processor is active, EM1 is for collecting data (CPU sleeping) and EM2 has most things disabled, but will wake up on an interrupt... this is the mode I needed the application to spend most of its time in to have any hope of a long battery life (consumes only uA).

It might be nicer to use a smaller (cheaper) one if I can get away with it, though!

The screen

There are two main choices for low energy screens... e-ink screens (EPDs) or memory LCDs (from Sharp).... both have their advantages and disadvantages,  EPDs have zero power consumption when not being updated... the disadvantages are that they are relatively hungry when being updated, and also suffer from effects like ghosting, and are much more complicated to drive, requiring a great number of capacitors in order to work the charge pumps.  Memory LCDs are much simpler, can run off a single voltage rail, and require very few capacitors... their primary disadvantages are 1) significantly more expensive, 2) some current required to maintain display and 3) fairly poor contrast ratio.

In the end, cost was the deciding factor... I was initially intending to make a wedding favour for all the guests, so the display being about half the price was a big deal.  I plumped for one provided by Pervasive Displays, via. Embedded Artists.  EA offered an evaluation board which was a useful kickstart to getting up and running, and also a reference point for implementing the display... While there was some circuitry I could drop by keeping things 3.3V or below, ultimately I would need to keep most of what was on there not only for the display to work, but also to control leakage current and turn the display supply off when not updating. 

The communication

Bluetooth LE was always going to be the thing that made the project possible, as conventional Bluetooth is far too power hungry.  BTLE has been sold as the solution to the "internet of things" as it allows monitoring devices to be decoupled from the mains and run off very small batteries... in some cases even coin cells!  I loved the idea of potentially running the "fridge note" off a coin cell as that is something widely available and easy to replace.  (I didn't like the disposable nature but that's another matter).

So I wanted a BTLE solution... in a perfect world, I'd get the CPU integrated with the BTLE module... and EnergyMicro/Silicon Labs had a solution coming called Blue Gecko which sounded exactly like what I wanted... unfortunately it was due for launch around September time, when the wedding was!  Samples were going to be available earlier but I wasn't too keen to be on the end of inevitable errata, having been burned  by "rev 0.1" silicon before.

So, a mature two chip solution was safer even if rather more costly and more power consuming.  So needed a chip to partner the EFM32... I looked at a few but eventually settled on the nRF8001.  The primary reason being that it's very, very simple (designed to be hooked up to microcontrollers) and has example code available.  I even found example code for use with the EFM32!  Great... that will do nicely.  Nordic do sell a BT module with an ARM core but I decided to stick with what I knew rather than jumping to a completely unknown IDE and uC with unknown idiosyncrasies.

Now the basic parts were decided, I could get on with the design...




No comments:

Post a Comment