Quantcast
Channel: Articles on JeeLabs
Viewing all articles
Browse latest Browse all 296

A new design, moving to 32-bit

$
0
0

With one of the two main energy metering nodes out of order, it’s becoming more urgent now to implement a replacement. It would be a shame to break the cycle, after some 8 years of data collection, all logged and waiting for future visualisation.

There are quite some signal sources, more than a simple JeeNode w/ ATmega328 can easily handle. Given the recent focus on STM32F103-based boards, it should come as no surprise that this has also been picked as base for the new node. The Olimexino-STM32, to be exact:

The Olimexino-STM32 has an STM32F103 µC with 128 KB flash and 20 KB RAM, as well as a very nice complement of features on-board:

  • plenty of I/O, since this is based on a 64-pin µC
  • 12-bit ADCs, which can read up to 1 million samples per second
  • a LiPo battery connector for backup, including charger
  • very low power 3.3V regulator (the same as on the JeeNode)
  • on-board switching regulator, which can run off 9..30 V (DC, but see below)
  • µSD card slot (on the bottom), for long-term data storage
  • 8 MHz and 32 KHz crystals, allowing the µC to keep track of real time
  • USB mini jack, for power and as USB device
  • CAN bus terminal header (note that it’s either USB or CAN on this µC)
  • Arduino-shield compatible headers, including the offset fix
  • mini 2x5 header for JTAG (also compatible with a Black Magic Probe)
  • 10-pin UEXT header, for off-board extensibility
  • and a 16-pin extension header with all the otherwise-unused pins

In short - lots to like, and many convenient features for an “energy reporting node”.

Here is a first build, with RFM69, OLED (optional), P1 port with NPN transistor to invert the signal, and a “pulse port” for the 3 pulse counters - the most urgent task for this whole setup:

There’s a LiPo on the back, attached with dual-sided tape, and there’s a small DC jack adapter (newer models of the Olimexino-STM32 have it on-board, instead of the screws on this one):

The board is well-documented, even though in this case it’s all obscured by the battery:

One nice property of the Olimexino-STM32, is that it includes an efficient switching regulator with a wide voltage range. Since the board also includes a diode in series, it can in fact be operated from an AC power source. Which is perfect here for two reasons:

  • feeding AC into the unit means we now have a way to detect phase and measure AC mains variations, as well as fluctuations in 50 Hz for estimating the load on the power grid
  • there’s already a bell transformer nearby, used for … the door bell!

Here’s the meter cupboard - nice and dry now - and the new 8 VAC power feed, ready for use:

From the logo in the first picture, you can see that Mecrisp Forth is already running, and so are the OLED & RF69 drivers. The next task is to read the pulse counters and report them over RF.

Note that this RFM69 is being operated in native mode, i.e. it’s not sending out packets in the original RF12 format. Since this is the first such node added to the JeeLabs Home Monitoring Network, the central hub also has to be extended with a receiver node to pick up these packets.

Lots of software tasks ahead. And also some electrical puzzles, apparently - it looks like the pulse counters are not yet properly being sensed by this new board.


Viewing all articles
Browse latest Browse all 296

Trending Articles