WeatherShield + supercapacitor + tiny solar cell

There were some interesting discussions in the Low Power Techniques forum about solar power, running motes on super capacitors, and running motes without batteries. I had some tiny solar cells I got long ago from ebay, and I wondered if these could run a low power stock Moteino+WeatherShield node, without any assistance.

Update: the shop now has an offering for a 7.5F SuperCap and a 1W mini Solar Cell which can be used in a similar project as this shown here.

For the experiment I added this 7.5F low-ESR supercap to charge from the solar cell during the day, and keep the mote going at night. To avoid discharge I added a shottky diode from the cell to the cap. The solar cell is actually composed of three tiny cells wired in parallel, the combined capacity is around 0.7W. Here’s the “schematic”:

I initially charged the cap from a 5V source to get it going, and then I attached the cell to a basement blurred glass block window which hardly gets a ton of light:

Note that the shottky does drop 0.2V from the actual capacitor voltage. Even so this worked surprisingly well. Here is the new node in my Gateway UI:

The node transmits temp/hum/pressure/voltage data every minute. Below is a look at a few weeks of the voltage readings. The solar cell charges every day to about 4.25v (actual voltage is ~4.45V b/c of the diode) and discharges to just below 4V.

Quite encouraging, I was pretty sure this would work since the WeatherShield and Moteino sleep at under 7uA, I just wasn’t sure how these old small cells would behave with the supercap. I recon if this node would be placed outside and facing direct sunlight, the charge voltage and overnight dips would be even higher values.

This would also work with a LiPo battery instead of the super cap. Of course, if this was placed outside in the freezing cold, those cheap LiPos from china can die in the cold. But at just $6.50, the supercap is a cheap alternative, much safer and resilient to the cold, and shows how low power is not that complicated.

Moteino R6 released

After Moteino R4 has been the long running champion of its lineup, and R5 has had a brief period of glory, Moteino has now been shipping for the past week at revision R6!

Wait, what happened to R5 which was never announced you ask?
Well R5 was mainly a transceiver layout change from R4, it also added a u.FL RF connector (which is now offered in the shop) and SMA connector “helper” pads, and few other minor layout changes, nothing too significant and otherwise identical to R4. Customers were now getting HCW and LoRa radios on the same Moteino PCB instead of separate PCBs for HW and LoRa.

However in R6 there are more important changes:

  • CW transceiver layout has been added in addition to the RFM69/LoRa layout, which means that the whole spectrum of RFM69 and LoRa radios are supported. Note that W and HW, while still in the shop, are no longer available as an option for MoteinoR6 – they are replaced by CW and HCW (which are 100% equivalent from a software and features perspective, but smaller!)
  • supported transceivers: RFM69CW, RFM69HCW, RFM95/96/LoRa
  • in addition to this, RFM12B is now also usable (though not sold) with Moteino R6 because of the new CW pads. Note that the RFM12B library is still usable but no longer actively developed or supported
  • a delay cap was added to DTR to avoid situations where the Moteino never wakes from an ultra low power state – this has been mentioned and discussed in the forum
  • u.FL pads kept for those who want to connect a pigtail instead of straight coax or the provided monopole wire antenna
  • the Trace Antenna variant reflects all these changes as well except it’s connected to the onboard PCB antenna and does not require an external antenna

Here are RF connector options now possible on the Moteino, all these RF connectors are available in the shop for convenience:

 

Wireless Programming updates

In past times (see this and this post), wireless programming of a remote Moteino used to be done via a python script. This took a compiled Moteino sketch (hex file) and passed it to a programmer Moteino which would relay it to the target node . Later this python app was migrated to a windows desktop app (see release post and upload speed update). At which point non-windows folks were left with a somewhat out of date python script. I was asked about the status of the python app many times. So I decided to merge the python script and windows app so all platforms can use it. This was done via IronPython which can invoke a python script straight from a windows app. Hence wireless programming for Moteinos has gone through several changes:

  • the firmware part which used to be a separate library and has been merged into the RFM69 library, this is now called RFM69_OTA.h (vs: WirelessHEX.h) and all functions have the same name and parameters
  • the windows app now can run both natively (windows code) or invoke a new updated OTA.py python app which you can control and modify if you’d like

This is the best of both worlds. The new OTA.py script is cross platform and independent of the windows app, just needs to be invoked with the right parameters (run `python OTA.py -h` for details). Those on windows can just use the desktop app (runs the protocol in native C# code), or can click the “Run OTA.py” checkbox to instead invoke the OTA.py script dynamically. The parameters are passed from the desktop app into OTA.py and the desktop app conveniently remembers your programming parameters next time you open it.

Most significantly the WirelessProgramming.exe is now 3.8MB (vs 29KB) because it bundles all the required self contained IronPython runtime to run the OTA.py script. It also requires the pythonLibs.zip file that was added in the same directory.

Give this free tool a try and let me know if there are any issues or bugs. Enjoy!

 

Using PowerShield with Moteino & WeatherShield

John from John’s DIY Playground put together a nice video of setting up a Weather Node powered by a PowerShield from a LiPo battery, watch his assembly vide and demo below.

Although you could directly power the Moteino + WeatherShield from a LiPo battery, this is a good example of how you might assemble & use the PowerShield to get 5V from any lower voltage and power Moteino and other sensors for low power operation.

He also shows how to program it and configure it in his IoT Gateway software.

John mentions he made another video of a similar setup, this shows mating only the WeatherShield and a Moteino  with integrated antenna. Here it is:

Motorized blinds with Moteino

James from snorp.net looked into automated blinds but when he saw the eye watering prices he decided to make his own wireless motorized blinds. He posted a great detailed tutorial to do just that. The result is motorized blinds automation device that is wireless, low power and costs just $40 for the DIYer. This is a blast considering commercial devices can cost upwards of 10x or more. Here are the highlights of his project:

  • after experimenting with Bluetooth, he decided to use Moteino a try for it’s ability to use ListenMode and make the project very low power
  • the chosen motor was the 28BYJ-48 stepper motor for its low cost ($2), quiet operation and fine control ability
  • he used Fritzing to design a simple yet very elegant shield to host his motor driver and Moteino and posted the schematic, layout and BOM then fabbed the PCBs at MakerStudio:
  • the whole assembly is pretty compact, it uses a 4xAA pack to yield a consumption of just 46µA while running the motor an average 12s/day, that comes to a theoretical 7 years life on a set of high quality 4xAAs. In real life that should last at least 2 years. Here’s what it looks like assembled and installed:

And a demo of it in operation:

Moteino with trace antenna

I had previously released a MoteinoMEGA with trace antenna, and there is now a regular Moteino with trace antenna. Everything is the same as the MEGA variant, except of course this is the atmega328p based Moteino, the most popular variant. The antenna is tuned to work in the 868-915 bands and should deliver very decent performance, close to the wire monopole. Here it is next to it’s MEGA sister board:

MoteinoMEGA with trace antenna

Over the past few months a friend has helped me create a MoteinoMEGA variant with a trace antenna tuned for between 768Mhz to 1.16GHz. So this should be great for 868-915mhz. I’ve tested this variant myself (915mhz) and I was surprised how well it performs compared to a wire monopole (which will still be better given the type of antenna). I did not do extensive testing but I am pretty confident this turned out as a great antenna and I am offering the remainder of this batch for those eager to have one and perhaps do more testing on their own. Depending on the response I may or may not ever make more of these, we shall see. The same antenna could be used with any other Moteino but I want to see the response of the users before I invest too much capital in new batches of Moteinos. The ANT pad and u.FL footprint are still there if for some reason the user wants to cut off the trace antenna and use one of those instead with a monopole or different antenna. Otherwise everything else is the same, well, except the yellow soldermask which has a nice orange hue from my new PCB supplier. I will offer these with RFM69W/HW in 868/915mhz or without a transceiver, your choice. Enjoy.

Wireless Programming just got 50% faster!

The Wireless Programming GUI app that I introduced in an earlier post is now at version 1.2 (get exe here). It features the ability to bundle up to 3 HEX file lines per RF packet (instead of the default 1), which yields a significant transfer speed increase. Let’s just do the TL;DR first and gaze at the results of transferring a compiled sketch of 13,858 bytes:

  • running with 1 line per packet (the same as before) yields 866 packets and ~43s OTA time:
  • running with 3 lines per packet yields 290 packets and ~18s OTA time:

That’s an average 58% speed gain, not too bad!
By comparison, the same sketch uploaded directly via FTDI/serial takes about 13s, so much closer to that figure than before. I think a few other techniques could be used to squeeze yet more speed (increasing RF bitrate!) but that’s for another day.

Note that the same exact data is transferred, except in fewer longer packets. I had to make some changes to the WirelessHEX69 library to support these longer packets. Also I fixed some bugs that emerged during this development, see the github commit for all the changes.

To support the new GUI v1.2 speed increase you only need to update your WP programmer Moteino with a new version of the WirelessProgramming_gateway sketch (to refresh the WirelessHEX69 code) to make it support the faster WP speed (ie also update the WirelessHEX69 lib!). Everything else is completely backwards compatible, and you can use the new GUI v1.2 with an older WP programmer Moteino if need be (1 line per packet only), and also all old target nodes that are OTA/WP programmable are not affected at all and can be updated at the new speed. FWIW you can actually use 1 or 2 (not sure why you would) or 3 lines per packet (the new default going forward). Experiment and see what your own speed gains are! Please report any bugs or issues in this forum!

Wireless Programming desktop app

Finally, it’s here – my own Windows desktop app for Moteino Wireless Programming, download the exe from here. Not sure why I didn’t make this sooner, maybe because the command line invoked python script version works perfectly fine and also maybe because there was already a vb6 version built by someone else. But, it’s time to dust off my .net GUI skills and put C# to work. And the result is this:WP1

Not much to it really, a mere 300 lines of loosely written code, last (mid)night. Here’s a rundown of the features, I tried to make this a bit more useful and intuitive to use than the command line python script, so that would be the main attraction other than being a GUI:

  • gives you a list of available serial ports so you don’t have to guess (you still have to know which serial port your wireless programmer Moteino is connected to)
  • allows you to type/paste or browse for a hex file
  • allows a numeric target node ID
  • once all settings are populated with valid info, the Start! button is enabled
  • upon exit, it saves the settings to registry and attempts to read them back in future launches

Clicking Start! will do some validation and start the OTA protocol just as the python script did it, but also gives you more visual feedback with a progress bar at the bottom:WP2

I will potentially expand this to allow remote wireless programming through a tcp port, just like the 3rd party vb6 app, but I doubt that will be very popular so I am sticking to the basics for now. If there are any bugs let me know.

This is it for 2015, see you on the other side of 2016!

New product: MoteinoMEGA-USB with LoRa footprint

There is a new variant of Moteino available: MoteinoMEGA with LoRa footprint and onboard FTDI USB-serial converter. This is the first MEGA USB variant. It will also work with RFM69HCW radios if you want a MEGA-USB with RFM69, but for now you will need to source your RFM69HCW from somewhere else. Otherwise all sketches and examples should work as before. I have yet to create a pinout diagram for this variant but it’s pretty much the same as the MoteinoMEGA. Here is a shot of both sides, shown with a RFM95 LoRa transceiver soldered on the bottom: