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).
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.
[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
water + electronics = bad. Solution?
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…
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:
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.
Detail of the connector:
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.
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.