Current Ranger R3 released!

CurrentRanger is now at revision R3!

I received great feedback and several threads in the forum outlined some patterns of user behavior which led me to make some improvements and hopefully eliminate some of the issues I’ve seen people run into. Here is the change log:

Reverse polarity protection

Perhaps some folks were too excited to turn the CurrentRanger on and missed double checking their battery polarity and pufff .. the charger chip released the smoke. I offered free fix/repair to a few who’ve asked, and to put this behind – R3 now ships with reverse polarity protection. If you get it wrong, nothing happens, including the obvious – won’t turn on!

Redesigned 3D enclosure

The previous pillar style enclosure takes about 1h05m to print. And because of the way the mounting pillars are placed in R1-R2 the case called for PETG (stronger less brittle material) but often produced diagonal drag lines in the inside-bottom of the case, and PET tends to print stringy which requires additional cleanup. Mounting screws are now moved closer to corners, this yields more PCB area and allows the case to have top corner posts which are a lot more practical, free the bottom of the case for a larger battery and shave a whopping 18 minutes off the print time. This also yields more room for enclosing a bluetooth module inside the case while keeping the case low profile. And the case print just looks that much better in PLA (no posts that can easily snap either). I’m really happy about this improvement.

Gold terminals be gone!

I am done with Gold terminals, they are the fake news of banana terminals. There is nothing truly gold about them. I tried to like them but frankly, I found them to be more trouble than their gold appearance is worth. Being exposed makes them a short hazard, and twist-locking wiring actually rips the wires. Besides, I almost never use the input terminals since I added the green thumb terminal which makes it a snap to insert battery and project wires. Those gold terminals looked rich and fancy (until the “gold” wears off revealing the dull communist metal) and that’s where the “goods” stop. And yes – I did try many different vendors, I could not find a vendor with consistent quality and repeatability. They may be good for your speaker where you never touch and see them again, but I think not suitable for an electronic instrument.

You want Gold(less) terminals on your CurrentRanger? Be my guest, get them from wherever you can, but I won’t ship these anymore. I cant put fake on awesome. Instead the kit is now standard with low profile banana terminals – simple, compact, functional, consistent, just as or more conductive, that’s real “gold” in my e-tool box.

Moved components & features

A few folks in the forum reported damaging/snapping some of the capacitors near the input terminals, causing the unit to behave erratically – these are now moved away from the terminals to help reduce the chance of this happening. Just to give you an idea, here’s what that looked like, and what to avoid doing when mounting mechanicals around small SMD components on any board:

Misc other changes & additions:

  • the power button is moved slightly left to allow easier access when OLED is mounted
  • the charge LED is now moved next to the USB and is see-through just like all other board LEDs
  • the Bias LED is moved symmetrical to the LPF LED
  • a GND pin added to the SPI header next to the lower right mounting hole
  • minor layout changes & silkscreen additions

Silkscreen nightmares!

Since the top of the PCB serves as the user interface, the silkscreen needs to look fairly good and crisp. I went the extra mile to try and design some nice graphics and make a PCB with a bunch of traces look more attractive and professional.
Unfortunately since inception I’ve had numerous silkscreen issues because of these graphic elements (some my fault, some the fab’s fault, and some “in between”) causing several batches of panels to go straight into the trash. I painstakingly retraced all these graphic elements on the board in a vectorized form and these issues are now resolved (as far as silkscreen design goes). The fab can still screw up but hopefully that won’t happen again.

The official guide is updated, as always please read it carefully before using your unit. Here’s the SMD side:

CurrentRanger is made with great love and pride in Michigan USA, and I welcome feedback, suggestions and contributions.

Gateway V9 Released

The Pi Gateway software is now at v9.0.0, this release is a major new feature and bug fix release. This blog entry serves as a change log and feature review. Below are the main highlights.

New Node button & sample metric generators (ex: Internet Speed polling event)

Clicking New Node you may add a numeric ID node. This could be a future RF or LAN node, or a dummy node to hold data such as your internet speed over time (add the Internet Speed event and enable it).

For RF nodes, any node that starts sending data through the serial port attached RF gateway, will automatically generate a new node. For RF nodes, node IDs up to 1023 are now possible thanks to 10bit addressing. Below you can also see a node with ID 999 that reports temperature.

MultiGraphs

A new Multigraph button on the node page allows generating a graph containing multiple metrics right on the node page. This enables you to easily compare the various metrics of a node chronologically. Clicking the far right remove button under the graph allows you to generate another graph with a different combination of metrics. There is a practical limit to how many metrics you can show since each metric can contain a lot of data and generates a separate vertical legend, so be reasonable and avoid pushing limits. Here’s such a graph showing the various metrics of an RF node:

Desktop graph scroll-zoom & double-click zoom

You may now scroll-zoom with your mouse wheel over a graph (works in all graphs) and it will zoom in and out. You can also double-click and it will zoom in. On mobile devices double tapping will zoom-in.

Edit and Delete metric data

Graphs now show lines between data points instead of bars by default. Still, sometimes it can be confusing looking at lines or bars, where the actual data points are. So you can now turn on data points. Additionally, you can edit and remove any single data point (click on specific data point to edit/remove) or range of data points (select range of data points to remove or change to a new value) if you wish by enabling the edit/delete mode using two buttons below the metric graph. Data points are automatically enabled when editing data.

Easy node image change

You can now change a node’s icon very easily to any existing icon (under the /www/images folder), or upload a new image of your choice (uploaded to /www/images/uploads). Icons should be 120x120px, if larger they are resized. Clicking the node icon:

This brings up the node icon change dialog (pick existing or upload new):

Other icon changes:

  • some default icons have changed (ex. CT-50 thermostat)
  • for consistency, all default icon nodes are now prefixed with icon_
  • rssi icons renamed to rssi_n with n=[1, 7]

New HTTPEndpoint for posting data from LAN

You may now submit data to the Gateway from any LAN device, thus enabling the use of WiFi (ESP anyone?) and network connected nodes, and also essentially removing the need of using only RF nodes. For instance:

https://raspberrypi/httpendpoint/?id=1234&MOTION&F=77.77

will generate a new node (if non existent) with ID=1234, and generate two new metrics (MOTION, and temperature). If an ID is not provided, then the IP of that node becomes the ID. The generated node will always have a new _ip property which contains the IP of the sender. Other examples:

  • /httpendpoint/?MOTION&F=12 ->  ID=(valid IP)
  • /httpendpoint/ -> no update, just lastupdated timestamp

The response will be JSON of this form:
response: {"status":"success","message":"SUCCESS!","matchedMetrics":2}

Run in internet isolated LAN

All script files are now loaded locally and there is no longer a dependence on an internet connected RaspberryPi to fetch these scripts. So there is no concern running this completely disconnected or behind firewalls etc.

Title setting & Menu changes

You can set your own custom title from the settings page, don’t forget to click Save to apply changes. The menu now shows the Gateway app version, when the database was last compacted (done once daily automatically), and an option to compact the database on demand.

You can now quickly restart the app via Ctrl+Atl+Shift+R, or from the Menu as before.

Run it as a Mobile app

You can now run the application as a mobile app. A manifest.json definition that loads automatically with the web page allows you to create a shortcut via the Add To Home Screen option in your mobile device’s browser. Then clicking that icon on your home screen opens the web page like a mobile application without the extra browser bars.

New default metrics

  • It’s sometimes desirable to compare the RSSI of an RF node with the transmit level of an RF node. The new X:n metric with n=[0, 31] allows this to work nicely with the RFM69_ATC library extension and you can see the transmit level drop or rise based on the RSSI change.
  • A new TYPE:nodeType which matches the exports.motes definition of a mote in metrics.js allows to automatically pick that mote’s icon and other features like buttons. Example: when a SwitchMote is powered up, it can send a 1 time TYPE:SwitchMote token to indicate it’s a SwitchMote. You can always later override and pick the node type from the node type dropdown

Other misc changes

  • node name/title added on the metric page – this helps determine which node’s temperature metric you may be looking at (vs. just “Temperature”)
  • ordered Node/Event type dropDowns (A-Z)
  • reworded and simplified licensing terms

Installation and upgrade path

This being such a major change with many new/renamed/deleted files, it’s a good idea to reinstall the application from scratch on a new raspbian image rather than try to do an in-place manual upgrade. This also ensures you will be running the latest and best raspbian, nginx, PHP7, nodeJs & packages, etc.

To transition your data to V9, backup the content of the /home/pi/gateway/data/dbfolder, then make a complete image backup of your currently functional previous version and store that until you are sure V9 runs smoothly on your Pi and all your old data is picked up.

Then follow the Gateway software setup steps in the official guide to install V9 to the latest raspbian image.

Once the V9 is running, to load your old data, you will need to sudo systemctl stop gateway, copy/overwrite the saved data into the new /home/pi/gateway/data/db folder, and then sudo systemctl restart gateway, and you should see all your old nodes and their data.

For any issues and bugs, please use this forum or you may submit a PR to the Github repository. Note that this change log may be edited as any loose ends are tied and before an official release is created.

SwitchMote available with PSU R3

The full SwitchMote kit is available again. I had to redesign the PSU cover and some 3D printed spacers which fit the new PSU R3. Everything is pretty much the same as before, except that there’s significantly less soldering to do. The PSU R3 is also available separately. All the small passives are now SMD soldered. There are now 4 screws that balance the cover a little better than before., and the FTDI programming header is offset from the edge.

You do the programming the same via an FTDI-Adapter and a double length male header which is provided in the kit.

SwitchMote PSU R3 release

The SwitchMote PSU is now at revision 3, here are the changes:

  • DC side is now SMD assembled, no more through hole components
  • 2OZ copper PCB
  • with the RECOM RAC02-05SGA there is no need for a fuse, only a MOV at 230V
  • although the DC side TVS footprint is left there, the specs of the AC-DC do not warrant a TVS on the DC side
  • same relay options as before – two 10A/250V relays or one 16A/250V relay
  • same control via AVR Moteino
  • optional footprint for ACS711 hall effect current sensor, this is experimental – it offers an analog output proportional to the AC current flowing through the SwitchMote relays. Adding this sensor requires cutting the main HOT trace where indicated and soldering solder jumpers on the bottom from the transducer’s DC side (isolated) to the Moteino side.
  • 4 symmetric mounting holes for a better enclosure – planning to make a 3D printed PETG enclosure and make the SwitchMote available with it

The kit will include the SMD assembled PCB along with the RECOM PSU, relays, MOV, screw terminal and headers. Optionally it can be ordered assembled at an additional cost.

New Moteino packages released for Arduino IDE

There is a new Moteino Arduino core package release (v1.4.0). If you’ve used the Moteino package so far with the Arduino IDE, you should get a little notice next time you start it up. By the way the link to the LowPowerLab package definition JSON is the same and should be pasted in your Preferences dialog under Boards Manager URLs:

Then you can either install or upgrade to the latest AVR package. Notice there is a brand new Moteino SAMD package with a new MoteinoM0 board as well, more on that in a separate post. Install/upgrade these in your Boards Manager:

These two packages includes a refined selection of taget boards:

  • [ Moteino / Moteino-USB ] – use this to send your sketch to a Moteino or MoteinoUSB
  • [ Moteino (8Mhz) ] – for 8Mhz Moteinos
  • [ MightyHat ] – technically identical definition to Moteino but use this to target a MightyHat
  • [ MoteinoMEGA / MoteinoMEGA-USB ] – use this to program MoteinoMEGA or MoteinoMEGA-USB
  • [ MoteinoM0 ] – a new Moteino based on SAMD21 Cortex M0+!

Once the packages are installed or upgraded you should see these new boards in your Tools>Boards menu:

And if you’re using my custom IDE board/port shortcut bar add-on, you can quickly add and access them directly from a click of a button, no more searching in the mile long Boards submenu of doom:

Some notable changes in these new packages:

  • added standard LED_BUILTIN pin macro definitions for all boards, you can simply use this macro to address the onboard LED of any Moteino, no more need for specific checks of what board it is you’re targeting, the LED_BUILTIN will just work. This macro references D9 on 328P Moteinos and MightyHat, D15 on MoteinoMEGAs, and D13 on MoteinoM0, simply use this macro directly in your sketch:
  • added board macro definitions for all Moteino boards:
  • added SS_FLASHMEM macro pin definitions for all Moteinos, again this is to ease the use of the SPI CS/SS selection pin across all Moteino boards:

I hope you find these changes useful. There’s lot of work to be done to upgrade all the sketches in the RFM69 and SPIFlash libraries to make use of these new macros. Please report any issues and stay tuned for the coming updates on MoteinoM0!

RFM69 and SPIFlash libraries released via Arduino LibraryManager

The LowPowerLab RFM69 and SPIFlash libraries are now published to the Arduino Library directory, and available to install in the IDE’s Library Manager (under Tools>Manage Libraries). Note that if you already have these library installed manually, you may need to remove it and re-install using the manager:

As new versions are released, you can update to the latest or switch back to an older version if you have a need to do so. If you’re new to using the Library Manager, it’s worth to read the official Arduino Library guide, and also check the Library Manager FAQ, to understand how Arduino libraries work, and how manage them (adding, switching, updating, manual library installation, deleting local libraries, etc).

As usual, please report any issues or bugs in the forum or open a Github issue where appropriate.

Gateway app Updated to v8.10

The Pi Gateway software is now at v8.10, this release is mainly a new feature release and also it fixes some issues. You can view a list of all the changes in the official release notes. Here are some quick highlights:

Node/overridable Settings

If you’d like a particular global setting (from settings.json5) to be overridable in a node (for instance minimum voltage for battery powered nodes) you can now do so in metrics.js by using the new settings section under exports.motes, note that the included settings must match the name in settings.json5 or they will be ignored. Example from exports.motes.MotionMote:

imageThen on nodes of that type, the setting can now be set a custom value:
image

Wifi RadioThermostat CT50 IP setting support

Specific code for the CT50 was updated to support a new IP setting in the UI. This allows the user to override and set the IP of a thermostat on the node page, thus enabling having multiple thermostats with different IPs in the app:
image

New Setting Types

This enables more user friendly settings. Supported types are jQuery mobile HTML5 defaults, and examples of how to use these are found in the settings.json5 file:

  • checkbox – for true/false settings
  • number
  • email
  • password – obsoletes setting.password:true/false
  • range – min, max
  • default (no type) is text

A few examples using new types:
image

Email attachments

The sendEmail function in gateway.js has a new parameter where you can pass the URL of an attachment to include in sent emails: global.sendEmail = function(SUBJECT, BODY, **ATTACHMENTS**). Example email with attachment:
image

Scheduled events time remaining & datetime

Scheduled events now show time remaining until they will run, and the datetime when that happens:
image

Sunset/sunrise API for events

Based on suncalc, this node API allows creating events that run at various times during the day based on calculation of the sun position. A few examples are:

  • sunrise
  • sunset
  • solarNoon
  • goldenHour
  • dusk
  • dawn

To calculate these events, the latitude/longitude coordinates can be provided on the general settings page:

image

New All-Events page which shows all scheduled and disabled events:

image

Modified main menu:

  • removed the Exit item (redundant)
  • added app version:
    image

RSSI is now a metric and logged/graphed by default:

imageimage

Low Battery Voltage

Warning icon now blinks in/out over the node icon:
image

As always, when you update:

SwitchMote with single 16A relay

SwitchMote and SwitchMote PSU are now available with a single 16A relay, instead of dual 10A relays. I realize this is most often the case that a second relay is not really necessary, except when replacing dual gang switches with a single gang SwitchMote, so I found this higher rating relay which can be soldered as shown in the guide. I also added the option to get it with a single 10A relay since most light applications now use either CFLs or LEDs and 16 amps are not really necessary for such small loads.

This new 16A relay requires removing two of the leads to make it fit the SwitchMote PCB, this is also added to the guide:

Worth noting here that the dual relay SwitchMote (a.k.a. 2x10A) is now the official kit that deprecates the older single 5A relay SwitchMote – that one has been discontinued and will only be available by special order.

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:

 

DHL Express for international orders

Good news for international customers!
After a period of integration and API testing, DHL Express is now available for international orders!

Pricing on DHL shipments is dynamically fetched at checkout and ranges typically from $25 to $40 to most EU countries. In almost every case it will beat the USPS pricing of PRIORITY ($33 to most countries) and it totally obsoletes USPS EXPRESS ($60 for most destinations). The transit time is typically 4 days to western EU and about 5 days to eastern EU. Most other places should expect a similar transit duration. There will always be flawless full tracking to the destination address, as opposed to postal tracking which is only available to a few countries that have agreements with USPS and has recently been unexpectedly removed from countries like France, Italy, Denmark and others.

USPS will continue to be available as flat rate service. The big disadvantage of USPS for international shipments is that there is an exchange to the destination country’s postal system, and in many cases these government run postal systems are poor at best. This sometimes results in delays, invalid package routing, invalid or confusing or out of order tracking (if any), bad customs handling and overall poor customer experience – not because USPS didn’t do its part. But because countries like Germany (the irony is the Deutsche Post owns DHL!) or Italy have very poor and anal customs which are nothing but deterrents for using the regular post for shipping.

With DHL all this is a thing of the past because DHL is one of the (if not the) best (and fastest) courier service available. It handles the customs clearance brokerage for the end customer (sounds like it may add a fee for this service in some places) but the experience you get is incomparable to that of dealing with the local post office. International buyers still have to pay import taxes as required by your country laws.

This is still considered to be a Beta release and while integration and automation continues to be implemented in the backend and some details ironed out, you are encouraged to report any bugs or issues or provide any feedback for improvement. Hopefully DHL will improve shipping experience for those customers who opt for and are willing to pay for the better service!