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
0

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…)

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
6

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
26
2014
0

dump1090 binary built for Raspberry Pi / Arm

If you’re after a binary of dump1090 for the Raspberry Pi without having to build it, here’s a compiled binary for you.

I built it on Arch linux, but it also works on Raspbian, or likely any other Arm processor as well.

It’s version 1.09.0608.14 of the MalcolmRobb fork

You can download it from here: (more…)

Jul
09
2014
1

AVR – Detecting loss of power and writing to EEPROM

As part of a recent AVR project, I wanted a way to increment a counter and store it even if the power was lost. This could be done with an external flash memory device, but I wanted to use the internal EEPROM of the AVR.

The internal EEPROM is limited to around 100,000 writes. Independent tests have shown this can be doubled, but 100k writes is only about 27 hours if saved once every second, so not practical for a device I wanted to last at least five years.

It takes a maximum of 34ms (8448us per byte) to write a 32 bit (4 byte) integer to EEPROM. Due to the low power requirements of an AVR, I was confident that a decent sized (say 2200uF) capacitor would allow an AVR plenty of running time to complete EEPROM writes/saves before power is totally lost.
(more…)

Written by John in: AVR,Embedded Systems,Weather Station |
Jun
22
2014
2

Huawei HG630B. Inspecting the firmware

My previous posts on hacking the HG630B didn’t result in me getting root/console access to the router, so it’s time to look into the firmware.

I downloaded the latest version of the firmware. These are the details of the firmware I used:

Name: HG630bV100R001C55B017_upgrade_main.bin
Size: 11 MB (12,322,608 bytes)
SHA-1: 375dbe5bc212840fbf7bf4216c76dc7dc08f571c
MD5: 62950060e08d4a357ea946f29dded3e5
CRC32: 5b4c5e27
(more…)

Written by John in: Embedded Systems,General Randomness | Tags:
Jun
11
2014
1

Huawei HG630B. Connecting to the UART

In my previous post I guessed that a five pad header on the rear of the PCB could be a UART of some type.

I quickly soldered a header to the pads, connected my Saleae logic analyzer up, switched on the router and started my snooping.

After a few attempts at finding a suitable ground pin, it wasn’t long before I had data that looked like this.

There's definitely some data there

There’s definitely some data there


(more…)

Written by John in: Embedded Systems,General Randomness | Tags:
Jun
09
2014
2

Huawei HG630B. Peeking inside

Let me be the first to say, it is really hard to open up the HG630B without breaking anything. You have to get the foot off first, this can be done with a small flathead screwdriver and a lot of patience.

Once this is done, there are four screws to undo and a myriad of plastic clips holding the front and back together.

You need to be careful of the antenna as it is partially attached to the case – It’s held in place by some slots inside the case.

Rear side of the HG630B board - Click to zoom

Rear side of the HG630B board – Click to zoom

(more…)

Written by John in: Embedded Systems,General Randomness | Tags: