Inside the YHDC SCT013 current transformer

The YHDC SCT013 series is very popular for use in energy monitor projects.


Warning, the core is VERY hard, but VERY brittle, don’t hit it with anything hard, don’t grip in with pliers, don’t drop it on a hard surface.

The coil and half core are held in the lower housing by two obvious catches which click over the bobbin. Removal means pulling the assembly upwards gently whilst releasing the catches and feeding cable into the housing. One of the catches will probably catch on the slot in the bobbin, be prepared to release it.


An ideal tool for the purpose is an ordinary $2 DIP chip puller which can be used to get purchase on the two ears on the bobbin that can be seen in this pic. Push a little cable into the housing, pull upwards while releasing the catches, then feed more cable and the assembly is pulled upwards from the housing.

Above is the PCB detail. This one has a TVS (the black component) and no burden resistors. There is a place for two parallel 0806 burden resistors on the board.

The PCB floats on two plastic pin extensions of the bobbin. You may obtain benefit in securing it with two very small fillets of hot melt adhesive as above, small enough so as to not interfere with the guide rails in the enclosure.

Burden resistors

So if you wanted to add a burden resistor for 0.333V out at 50mA secondary current, R=0.3333/0.05=6.6667. You could do this with 1% resistors in the E12 value series, 12Ω and 15Ω will give the desired resistance. Likewise for 1V out, 22Ω and 220Ω in parallel will give the desired value of 20Ω.

If you wish to remove existing burden resistors, they can be removed with specialised tooling but small SMD resistors will usually melt the other side solder moments after melting the first side. Position a toothpick with one had to push the resistor sideways, with the other and use the soldering iron to eat one side to melt, move the soldering iron to the other side and push the resistor sideways with the toothpick as soon as both sides melt.


A CT that has no load could develop extreme and damaging voltage within the secondary winding in the presence of primary current. If the CT assembly does not have an integral burden resistor, it is wise to install a TVS or pair of inverse series 9V Zener diodes to prevent excessive voltage lest the external load be disconnected.


ESP8266 remote power display for energy monitor – EV2

See ESP8266 remote power display for energy monitor – EV3 for an update…

ESP8266 remote power display for energy monitor documented a design and some variations for a real power display display using emontx3 / emonhub / mqtt. This article documents a simple compact implementation.


The remote power display uses a ESP8266-12E devkit 1.0 module, a common 3.3V 4 digit 14.2mm seven segment LED module with 74HC595 shift register per digit. The particular LED module has sufficient space to mount the ESP8266 inside the module.

Above, the interior of the module that suits the implementation. Continue reading ESP8266 remote power display for energy monitor – EV2

ESP8266 remote power display for energy monitor

This article documents remote power display for an energy monitor system based on emontx3 / emonhub / mqtt.

The remote power display connects via WiFi and subscribes to a topic on a MQTT server, updates are published every 10s with data from the emontx3 by emonhub.


The remote power display uses a Wemos D1Pro ESP8266 module, a common 4 digit 14.2mm seven segment LED module with 74HC595 shift register per digit, and a simple 3V/5V level converter between the two (see above shrink wrapped in the cable from the D1Pro to the display).  Continue reading ESP8266 remote power display for energy monitor

Inductance of sensorless brushless DC motors

A reader of A Demagnetisation Risk Index for a sensorless brushless DC drive asked whether the inductance of a sensorless brushless DC motor could be measured with one of the inexpensive LC meters available on eBay.

Motor inductance line-line typically ranges from several µH up towards 100µH. Importantly, the fundamental frequency of flux change in the laminated iron core under normal operation is typically less than 2kHz.

Validation of the LC200A

To verify the instrument, a test inductor was made with 3t on a FT-240-43 ferrite core.

Above is an estimate of the expected inductance of the test inductor, 9.65µH. Keep in mind that the tolerance of ferrite is quite wide, 20% variation is not unusual. The test inductor measured 9.1µH at 10kHz on a classic RLC meter.

Above, the LC200A measuring an inductor comprising 3t on a FT240-43 ferrite core, measurement frequency was 670kHz. The measured inductance is 8.98µH, 7% lower than the estimate but well within tolerance of the ferrite core, and less than 2% below the value measure with a classic RLC meter. Continue reading Inductance of sensorless brushless DC motors

SCT-010-000 current transformer protection

The YHDC SCT-010-000 clip-on or non-invasive current transformer is widely used in DIY energy monitor applications, and is readily available on eBay for A$6 including post.

A key issue with current transformers is that current in the primary winding will cause excessive voltages in the secondary winding unless the secondary winding is suitably loaded. The broad rule of thumb is NEVER disconnect the output connections whilst current flows through the primary.


YHDC’s website is typical of Chinese web sites, and I could not find a datasheet for information on the internal circuit and possibly internal protection.
Continue reading SCT-010-000 current transformer protection

ESP8266 IoT DHT22 temperature and humidity – evolution 3

This article documents a first project with the Espressif ESP8266 in its third evolution (based on ESP8266 IoT DHT22 temperature and humidity – evolution 2).

The objective is a module that will take periodic temperature and humidity measurements, and in this evolution publish them using a RESTful API.

Evolution 3

The example platform used in this article is a Wemos D1Pro. In this case, the D1Pro is configured for an external antenna, and a modification is made to the board to add a 1N34A diode for the deep sleep reset circuit (NodeMCU devkit V1 deep sleep). A three pin right angle header to the top of the board (as seen) and another on the underside on the opposite edge to get GND, +5, +3, and D4 for the DHT22 data wire. There is less than $20 in parts in the pic above. Continue reading ESP8266 IoT DHT22 temperature and humidity – evolution 3

High gain external antenna for Wemos ProMini

I have some IoT projects that would benefit from range afforded by a better antenna than the on-board antennas in most ESP8266 modules.

The Wemos ProMini has an on-board IPX socket for an external antenna so it is a candidate. Note that a 0R 0603 resistor needs to be removed and another or a wire link soldered in to route the RF to the IPX socket.

Above the Wemos ProMini with a 7dBi SMA-RP antenna ($1.80) and flylead SMA-R(F) to IPX (M) ($1.00).  Continue reading High gain external antenna for Wemos ProMini

A search for some mid power white wide angle LEDs

I have a project which needs some mid power (~3W) white wide angle (120+°) LEDs.

The obvious source ie eBay which means running the gamut of Chinese sellers, sellers who rarely understand the product they sell and probably expect the same of buyers.

Buying electronic components on eBay

Component sales tend to fall into categories:

  1. those with headline descriptions that have very brief description of characteristics; and
  2. those whose descriptive content claims well known part numbers for which datasheets can separately be found;
  3. those with detailed specifications offered.

In the case of category 1, it is very hard to have confidence that the components will deliver required performance, and headline descriptions on eBay are often used as competitive search keywords and do not apply to the goods on offer. These are probably best skipped unless they are the only option.

Category 2 provides a better option, and the question then on delivery is whether the goods are compliant with the part number offered. There is a considerable risk of counterfeit or fake parts that are not equivalent to the claimed part number, even where brand names are cited.

The third category can provide suitable product, but it takes some leg work, more than ‘due diligence’ to check the description for consistency and form an idea about its reliability, fit to the requirements and then value for money, seller reputation etc. This can be a lot of work for a few dollars worth of parts, but is a better option than category 1.  Continue reading A search for some mid power white wide angle LEDs

ESP8266 relay module review – Yunshan WiFi relay

After scouring eBay for a packaged esp8266 with 220V 10A relay, two products were identified:

  • Yunshan WiFi relay; and
  • LC Technology relay.

As is usually the case, finding a schematic and specifications is very difficult and the sellers were of no help (no surprises).

The LC Technology device was offered with indistinct pics that hinted it had a 8Mb flash chip, ESP8266EX processor, and a STC 15F104 8 bit processor on board for some unidentified purpose.

A schematic was eventually located for the Yunshan board, and from pics it appeared to have a 12E module on it which hinted the flash size.

A Yunshan module was purchased for about $10 posted, and it was indeed a 12E with flash-id 4016, so 4MB of flash memory.

The board does not incorporate a USB-TTL adapter which is a nuisance not just requiring an external adapter for programming, but there is no integration of the RTS and DTR signals as in the NodeMCU devkit. Adding a quality USB adapter (eg CP2102) would not increase the price a lot, you can keep the CH340G etc). Continue reading ESP8266 relay module review – Yunshan WiFi relay

Reset helper for NodeMCU ESP8266 modules

A common scheme for Lua scripted NodeMCU modules with automaticlly start the script init.lua is to incorporate some logic to test the condition of a GPIO pin to determin wether to boot to the application or drop to the lua prompt for programming etc. In fact the scheme can be elaborated to provide a simple multi level selection based on the time the input condition is applied.

The obvious pin to use is the pin that commonly has a “BOOT” or “FLASH” button on it, GPIO0 or D3. It is used to activate the ESP8266 boot loader if it is low during boot, so it must be left high at boot to allow the lua interpeter to run, but it can be pulled low shortly after boot up and tested from init.lua.

An example init script follows.

print("\n\nHold Pin00 low for 1s t0 stop boot.")
print("\n\nHold Pin00 low for 3s for config mode.")
if == 0 then
  print("Release to stop boot...")
  if == 0 then
    print("Release now (wifi cfg)...")
    print("Starting wifi config mode...")
    print("...boot stopped")
print("Starting app.lua")


Above is a pic of the helper. The DIP switch allows selection of the BOOT pulse in 1s increments. It has four connections, ground, Vdd, BootOut, and Reset (optional). The button near the DIP switch resets the helper which in turn will apply a 10ms reset pulse to the Reset line. Continue reading Reset helper for NodeMCU ESP8266 modules