Jul
12
2016
0

Power meter optical pulse detection

I’ve always planned to monitor my electricity usage. I had previously (about a year ago!) ordered some power transformers from seeedstudio and a six channel ADC for simultaneous three phase current and voltage measurement but never got around to starting the project.

We’ve since had a “smart meter” installed which has a handy LED on it that flashes once every watt hour of energy is consumed. It also has and IrDA port on it but I believe the communications protocol is password protected and will report a tamper state if the password is tried too may times. Because of this, I decided it was best to optically interface with the meter, and best of all, I’ll be measuring the exact amount of power we get billed for. Unfortunately I won’t be able to predict the bill amount (in dollars) as the three phases that come into the house are billed at different rates while this LED pulses the combined usage.

Meter
(more…)

Jul
09
2016
0

Wiring up the ESP8266

Before you can program the ESP8266, you need to wire it up.

First things first, the ESP8266 uses a 2mm pin spacing so you can’t use a standard breadboard as these use a 0.1 inch spacing. It also uses 3.3V logic, so you need to use a 3.3V serial adaptor or a 5V one with a level shifter.

Ideally, you will need the following things:

  • USB to 3.3V TTL serial adaptor (I use an FTDI TTL-232R-3V3)
  • ESP8266
  • 3.3v DC supply (capable of providing ~400mA)
  • Small SPST switch – Optional to switch between Run/Program mode
  • Momentary push button – Optional reset button
  • 4 x ~10k resistors
  • ~100nF capacitor

I wired up my ESP8266 like this (Source: https://github.com/esp8266/Arduino/blob/master/doc/boards.md#improved-stability)

Note: The pin CH-PD is marked EN on the ESP8266 12E

Note: The pin CH-PD is marked EN on the ESP8266 12E


(more…)

Jul
07
2016
1

Introducing the ESP8266

About a year ago I put up some money for the Wino-Board kickstarter project, received my Wino-Boards and did nothing with them for 12 months. They are effectively a tiny Arduino board attached to the innards of an ESP8266 WiFi module.

I finally had a play with them last week and after making a few changes to the Wino-Board libraries (The current version could not do an HTTP GET), I found them very easy to use.

The more intriguing thing about the Wino-Board was finding out more about the ESP8266 module and that it is now possible to directly program the module itself using the Arduino IDE.

Front and Back of the ESP8266 (12E)

Front and Back of the ESP8266 (12E)


(more…)

Jul
30
2015
2

Petit Studio Raspberry Pi HDMI extender cheap cable fix

Note: This fix is NOT due to a fault of the Petit Studio Raspberry Pi Camera extension kit, it’s due to the use of cheap HDMI leads.

I brought some Petit Studio Raspberry Pi HDMI camera extenders from Tindie. These boards passively convert the 15 pin ribbon cable into a convenient HDMI connector so the cable can be extended using HDMI cables. It doesn’t convert the signal to HDMI, it simply uses the HDMI cable as an extension. Sidenote: The $5 shipping only took 4 days to get to New Zealand from Japan!

I brought some cheap 3m HDMI cables from a supplier on TradeMe and thought I was all set.

It turns out not all HDMI cables are made the same. The cables I brought work perfectly between a PC and monitor, but not at all on the Tindie camera extender.

A quick Duck Duck Go (That’s so much harder to use as a verb than Google) and I found a fix – There are meant to be shields for each data pair but in cheaper cables these are not connected. It’s an easy fix, just use the metal shield of the HDMI plug as ground…..

Or not..
(more…)

Written by John in: Electronics,Raspberry Pi,Weather Station |
Nov
12
2014
2

EP Solar MPPT Tracer charge controller serial code

Following on from my previous post working out the EP Solar Tracer serial protocol, I’ve got code working on a Raspberry Pi. It’s even validating the CRC checksum.

How to connect a Raspberry Pi up the the EP Solar Tracer

How to connect a Raspberry Pi up the the EP Solar Tracer


(more…)

Sep
23
2014
7

EP Solar MPPT Tracer charge controller serial interface

I’m currently involved in a project to set up a solar powered wireless station and wanted to remotely monitor the battery charge process. I looked into a number of charge controllers to see if any of them could be connected to a computer. Many of the controllers have ethernet and built in web servers, but these come at a cost.

The (relatively) cheap chinese made EP Solar Tracer MPPT Solar charge controllers have an RJ45 interface for an MT5 remote display which means that there must be some way to get data out of the charge controller.

The MT5 remote display

The MT5 remote display


(more…)

Aug
12
2014
0

Pulsecounter PCB’s have arrived

I posted recently about detecting power loss in an AVR and quickly writing values to EEPROM before power is lost completely and have since received the PCB’s I ordered from oshpark.

This is the first time I have ever ordered professionally made PCBs. I’ve made many using photo resist or toner transfer, but at US$5.00 per square inch for three boards (including worldwide postage) I decided to give it a go. It took a total of three weeks from placing the order to arriving in New Zealand.

This is OshParks render of what the Top was meant to look like

This is OshParks render of what the Top was meant to look like


(more…)

Written by John in: AVR,Electronics,General Randomness |
Jun
12
2013
0

Soldering ESCs

I’m using 30 Amp hobby King ESCs in my Quad Copter.

They each come with five bare ends which need connectors soldered to them.

Here’s a picture showing the result of about two hours of soldering and heat shrinking.

qc_escs

I’ve cut the DC power supply leads a little shorter so their length is perfect for my application.

Feb
13
2013
4

Update – Bosch BMP085 Source (Raspberry Pi)

I have updated my code to Read data from a Bosch BMP085 with a Raspberry Pi to correct some bugs reported back to me.

The main bug was that I’d forgotten to close the i2c file at the end of bmp085_ReadUP() – This shouldn’t have caused any problems if you were calling the function once per execution, but if calling it multiple times, it may crash. On the same note, if you are calling the functions multiple times, you may want to move the opening and closing of the i2c file outside of the functions so the files aren’t opened and closed multiple times. Thanks to Radu P for reporting these issues.

It looks like lm-sensors.org is back up now, but if not, you can find a locally hosted copy of smbus.c and smbus.h in this earlier blog post.

Note that I’ve written a number of posts on using this sensor. Here is a link to all posts on the topic.
(more…)

Feb
02
2013
0

Water Meter Project

Our water at home is supplied by way of rainwater off the roof of the house. We have about 55000 Litres (~14500 Gallons) of storage capacity but a long dry summer sees the levels drop considerably.

I decided it was time to add a water meter into the circuit to be able to monitor our water usage.

I picked up an Elster S100 water meter complete with an electronic Pulse output.

IMG_1587

The meter outputs one pulse per Litre of water. It’s only a two wire output so it appears to be a simple switched output such as that from a reed switch, but I’ll need to check before committing to any specific circuit design.

I’ll Probably use an Atmel AVR Microcontroller to count the pulses. The AVR will be setup as an SPI Slave to talk to a Raspberry Pi. I should have a better idea how best to implement it soon.