ESP8266 based power meter – motivation

Having a energy saving mindset, i’m always striving to save a dime and do my contribution in order to avoid waste. That said, it’s crucial to know where we’re spending energy. Goal here is to do a project log of a ESP8266 based power/energy meter.

All started when i found out about emonCMS and i wanted to give it a go on a budget. So, i hooked up my 1st gen Raspberry Pi Model B (it’s a war machine – pics will be self explanatory) to a ATTiny85 to do the ADC stuff. Power consumption is sensed via a 30A clamp freely available in the usual chinese suppliers that will output a sine wave up to 1V depending on the load. So, it was just a matter to offset my wave (since ADC won’t love negative signals and 1V sine wave will mean 1V around 0V, or, -1V to 1V).

This was the goal:

Pretty graphs from EmonCMS project
Pretty graphs from EmonCMS project

Continue reading “ESP8266 based power meter – motivation”

Reverse SSH Tunnel – when you cannot SSH to your host

Sometimes you need a workaround for SSH to an host. On my case, i cannot SSH to a ppp connected Raspberry Pi, but he can SSH to every other host. Solution is simple: ppp-Pi will SSH to a remote SSH server leaving a door open. Then i can SSH to my host, and login to my Pi. Confused? I know.

There’s a pretty good explanation on StackExchange.

Continue reading “Reverse SSH Tunnel – when you cannot SSH to your host”

3G to WiFi Raspberry Pi gateway

[Edit]: Thanks Hackaday for the highlight! Part two of the hack – having a 77 year old learning how to use an Android phone – is ongoing. Proof of success: her instagram account.

After building my DIY 16.5 dBi (probably with pornographic levels of VSWR – hopefully i can get an antenna analyzer on that by the next few weeks) and proofing the concept of a feasible 3G gateway, i had to put everything inside a nice IP65 box and set it up outside. Initially i was aiming at using a modded WR703N with Rooter firmware and a Huawei E3131. After burning both of them, i had to resort to a Raspberry Pi Zero.

Principle of operation: Raspberry Pi handles the PPP session from the USB modem, creates an WiFi network via hostapd and uses iptables for the rest.

Notes on weatherproofing something

Basics first:

  • water + electronics = bad. Solution?
    • Sealed box.
  • heat + electronics = bad. Solution?
    • Sealed box with ventilation.
  • Sealed box with ventilation + electronics = moisture during low temperature. Solution?
    • Heat it when it’s cold.
  • 230VAC outside = bad idea. Solution?
    • Industrial grade 230VAC to 5VDC PSU – i used this one from Mean Well – RS-35-5 (link to manufacturer) placing it within the attic and routing 5m of 2×0.75mm2 cable outside – 6m total, minimum voltage drop.

So, this is not a trivial problem to solve. My solution? IP65 grade box (IP rating table right here) with a breathing hole, DHT22 sensor inside, DS18B20 outside, python measuring things. More details below…

Continue reading “3G to WiFi Raspberry Pi gateway”

Temperature control (DS18B20 + DHT22) with the Raspberry Pi

In order to know what’s happening inside a semi sealed box, i used a small piece of perf board and added the DHT22 and DS18B20 with 10k pullups. I also added a small push button for safely powering off the Pi if needed. It looks something like this:

My take on a temperature HAT for DS18B20 and DHT22

Continue reading “Temperature control (DS18B20 + DHT22) with the Raspberry Pi”

My take on the TP-Link WR703N Antenna Mod

There is a lot of info online on this little WR703N router, and also some guides on how to add an external antenna (check here, and here, for instance).

So, i won’t going much details, but this was the process:

Performance was greatly improved! My goal was to connect this to a colinear 8dBi omnidirectional antenna for my 3G to Wifi gateway.

Thoughts on the Huawei CRC-9 Antenna connector

Quick post on Huawei CRC9 antenna jack.

This is a very small antenna connector found on some of Huawei’s 3G broadband modems.

The jack has a ground and two pads. They are NC (normally closed) meaning that when you attach an antenna they will open up and the RF circuit will feed the external antenna instead of the internal one.

I had to dig around a lot to find some info on this, and found a russian site with some info.

CRC-9 principle of operation. pin 1 is the antenna jack, pin 2 is the internal antenna.

Detail of the connector:

Pin 1 is the antenna jack, pin 2 is the internal antenna.

Why is this relevant? Because i didn’t had a CRC-9 pigtail around and had to solder coax directly to the board. Yes, it works. No i don’t recommend. This was hooked up to my DIY yagi antenna.

Huawei E3131 external antenna mod

DIY 2100MHz / 3G Yagi Antenna

Part of my family lives in a very remote location. There’s only AM and FM radio, i need to boost DVB-T signals from a repeater 40km away, and the phone landline fails around a week a month (trees falling and stuff).

So i had the idea to build a 3G/Wifi gateway. I didn’t wanted to spend 30€ on a comercial antenna to check if i had the required signal so i built my own.

It’s important to state that this was a trial: this build was never intended as a final product since this yagi wouldn’t stand a chance to strong winds.

Finished v1.0 build.

Continue reading “DIY 2100MHz / 3G Yagi Antenna”

Decoding OWL CM130 wireless monitor signal

So, i have a OWL CM130 wireless energy monitor for keeping an eye on power consumption at home.
It’s a great little gadget, but also a very cheap one: i bought it a few years ago for around 30€ in eBay, but it won’t let me do anything with the data, other than display it.

The OWL CM130 kit
The OWL CM130 kit

These usually work in 433MHz band, and i happen to have a 433MHz AM receiver similar to this one:
http://ardumarket.com/en/transmisors/transmisor-rf-fs1000a-330-443mhz-arduino-pic-id19.html

And this is the pinout:

FS1000A 433MHz receiver and transmitter pinout
FS1000A 433MHz receiver and transmitter pinout

 

So, i thought “This is a no brainer”!

Continue reading “Decoding OWL CM130 wireless monitor signal”