Raspberry Pi zero

Will there be a raspberry pi zero based version of the emon equipment in order to bring the price down?

Shoka's picture

Re: Raspberry Pi zero

As far as I can see the present emonPi set up is compatible with a Pi zero, assuming it has the optional header installed.

The emonPi hardware interacts with the Pi completely via that header, including how it gets power to the Pi.

You would need to arrange a WiFi dongle with a extended aerial connection as the only functional USB port would be inside the case and heavily shielded, **or** a micro USB to Ethernet port hanging out the gaps left in the case where the larger Pi's Ethernet port is exposed.

The mechanical mounting of the Pi zero would be only to two points ot the three used with a full size Pi, but given how small and light the Pi zero is I doubt this would be a major issue.

The lack of usb ports and Ethernet port to fill the cutouts on the end of the emonPi case would be unaesthetic, but not a functional issue. 

Practically however this would reduce the capability of the emonPi dramatically as the Pi zero has no Ethernet port, and unless you add a USB hub you would also lose the ability to connect USB based sensors as well.  The Zero is about the computing power of a Pi B+, but with half the memory, and substantially less power than the Pi2 B.

You can also presumably substitute the Pi A+ for the Pi Zero, the only issue I see is the location of the USB ports on the A+ may not align with the case cut outs for the Pi's USB.

Given that the emonPi case, PSU, sensors et all are around four to five times the cost of the Pi 2B, expecting to make significant savings by reducing the power of the Pi at the heart of the system, seems optimistic at best...

However given that a Pi zero can function as a USB slave, a much better use would be as a data gathering peripheral for a "real" Pi, powered from the emonPi and capable of operating the various sensor "hats" that will not fit inside an emonPi.

 

Harry

 

glyn.hudson's picture

Re: Raspberry Pi zero

Pi Zero works great as an emonBase with RFM69Pi, our ready-to-go SD card image works out of the box: We tested it :-) https://twitter.com/Openenergymon/status/677493655582715904

It's a little bit slower running Emoncms than the Pi2 but this is to be expected and no big deal. No plans as yet to re-design the emonPi to use the zero instead of Pi2 but no reason why the Zero could not be used with RFM69Pi. Lack of Ethernet and Wifi is a bit of an issue, but this can be fixed via USB add-ons OTG cable is included with most Pi zeros . We've been struggling to obtain even a couple of dev samples of the Pi zero, so it's not really practical for us to stock it in the shop at the moment. 

leodm's picture

Re: Raspberry Pi zero

Glad to hear about Zero and Emoncms on it. For my project, I just need to monitor temps (6x DS18B20) and one relay to control a pump. Emoncms is exactly what I need (run offline AND online) to monitor with a phone via wifi. Do you think I can do that with Pi alone (no RFM) to reduce the cost? (onewire and relay directly plugged on Pi).

pb66's picture

Re: Raspberry Pi zero

Yes it's totally possible, but there are no off the shelf images or solutions for you. The Pi's have in-built 1-wire support on GPIO4 (pin 7 - used by this project to reset the rfm2pi) but that can be changed. All you need to add is a single 4K7 pull-up resistor, although an inline protection resistor could also be added.

The w1-gpio and w1-therm modules need loading at boot, this can be done by manually adding them to /etc/modules or using devicetree.

You will also need a script to read the temp sensors which can be done in fairly easily bash or python.

The data will need sending to emoncms which emonhub is the best tool for. perhaps writing a script that reads the temp sensors and posts them to emonhub via a socket is the easiest route. 

Googling "raspberrypi 1-wire" should get you started with the set-up and also some example scripts that can read the data on demand and searching this forum for "emonhub socket interfacer" will help customise  script to send to emonhub on a loop.

How you "control" the relay can be done many ways but the physical connection of the relay should be done via a low-power switching circuit rather than a relay direct to the gpio pins, there are many relay boards that accept a digital input from a Pi gpio and indirectly power the relays coil.

Paul

leodm's picture

Re: Raspberry Pi zero

Thank you very much Paul and sorry for polluting this thread.

Then: 1x Rpi 2, One-wire for the sensors, relay card on gpio, wifi dongle into usb. Emonhub take data and send to local Emoncms install. then I can wifi connect to Rpi with my smartphone to monitor data. Fine!

Now I know that Emoncms will run on Zero, if it works with Rpi 2, I will "downsize" (size and cost) with Rpi Zero.

If I want to contribute a little bit, can I buy an Emonbase from the OEM shop? then simply add my temp sensors and relay card? I would have like to buy relay card too but did not find some in OEM shop.

Leodm

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.