-
Where should all the wires go?
08/27/2018 at 12:31 • 0 commentsAfter a number of tryouts, this is the mapping of pins I'm currently working to:
The e-Paper requires SPI data in, clock plus a command line which, as it doesn't need to send any info back, I've mapped to the MISO pin by changing the order of setup in the e-Paper library. It also has to have a Reset line as it won't respond when the Huzzah wakes up from sleep. As the module is the only one on SPI at present, CS is tied to ground. I've freed up the BUSY line by inserting delays in to the commands sent to it and patched the library appropriately.
This leaves I/O available for the disc vibrator, the onboard LED & the wake from deep sleep line. To be allocated to the remaining items are two pushbuttons (which can work from ADC if required) and leaves the SPI free for other things. However I still need to figure where to put the piezo buzzer, so there may be some swapping around of pins between the vibrator and the serial port.
Finally, the LiPo sits behind the AP2112 charge/power chip so I would like to route the raw battery voltage to the ADC pin as the ESP API reading of the battery value will be wrong as it's masked by the power chip.
-
Proof of Concept complete
08/27/2018 at 12:12 • 0 commentsSo, busy with work and a high altitude balloon launch, it's a long weekend in the UK (Bank Holiday) so that means rain which means indoors and time to catch up.
I've created 5 modules of code to try out various elements before bringing them all together:
1. Just getting the Huzzah to talk to the e-Paper - initially not hard, but optimising the pins took some work
2. Checking that the e-Paper module will allow me to do partial updates when the whole system starts up, so I don't have to clear the screen and start from the beginning - which takes about 5 seconds.
3. Get started with the ArduinoJSON library, using it to pull some data off an internal web server, parse it and display some info.
4. Slight side track, getting the time from an NTP server - interesting but I'm not sure we need atomic clock level precision for this!
5. Investigating the sleep options on the Huzzah to get the most of the battery life - this is important early on in the project but for now, I'll use a larger LiPo ;-)
So taking these separate blocks of code, I've integrated them so we start up, initialise the display, grab some records from the server and display an item of data. In doing so we get a good idea about the form factor.
The e-Paper module still has some investigation work to do as changing the orientation of the drawing commands results in some interesting mapping of co-ordinates. One of the next steps is to turn the module through 90 to the left so that cables are inline and the top & bottom mounting parts of the PCB are inline.
Right now, I'm using the jumper cables supplied with the e-Paper module as they plug straight in to the pins on the Huzzah. I'll be removing various connectors from the Huzzah, e-Paper and LiPo so that we are nicely streamlined.
-
ESP talking to ePaper
08/14/2018 at 08:47 • 0 commentsI've got the interconnect between the ESP WiFi module and the display - documentation helped along the way but some hacking & testing was required.
With all the pins connected, I got started quickly enough with the demo code from WaveShare, but as the ESP8266 as less IO than an mainstream Arduino and some of the pins are required at boot to be in a particular state, some experimentation and alterations to the ePaper library were required to reduce the connections using IO down to Data, Clock and a command signal.
At present it's all about prototyping, so I'm going to stick to these off the shelf modules. It will limit the amount of functionality that can be added short term, but I'd rather get something working quickly than start designing a PCB with features that may never get used.
Next steps will start with a minor detour to see if removing the command signal wire is OK and then I'll remove the bulky connectors, hard solder a first version mounted on some flexible plastic, make a sleeve out of a light weight cloth & velcro, and start wearing it.
In parallel, I've got some initial ideas on demo modules to code - reminders, temp & weather. Reminders is two way - getting them from a data source and then confirming they've been done, temp is sending out info & weather is grabbing info. I suspect there will be a mashup of IFTTT, dweet.io, Arduino.io and misc api calls in my near future.
-
Bringing the hardware together
08/11/2018 at 18:28 • 1 commentAfter some research & thinking, I've settled on using ePaper as display as updates are unlikely to be required more than once per second and frequently not for minutes or even hours at a time, alongside an ESP8266 module from Adafruit that will take care of battery charging and can be put in to deep sleep mode, which should enable a very small LiPo battery to be used, despite using WiFi to communicate with the world.
The total weight of these three components should come in well under 25g which compares well with my Timex outdoor watch at 33g.