Electronics Hardware

Introduction to the Heltec Automation HT-HC01P Halow Mini PCIe Card

Heltec Automation have two 802.11ah Halow WiFi Modules, the HT-HC01 V1 and HT-HC01 V2. Both are based on the Morse Micro MM6108. Version 1 was only available in the 902 to 928MHz band and operated with a maximum power of 21dBm. Version 2 had two variants supporting 902-928 MHz and 863-870MHz (Europe). The 863-870MHz module was limited to 16dBm and the 902-928 MHz had an upgraded maximum power output of 27dBm. You will note the addition of a small step up converter in the top right corner, providing 5V to the FEM. As there are two different versions, you must

Electronics Hardware

Evaluating the ALFA Network AHPI7292S

The Alfa Network’s AHPI7292S was claimed to be the world’s first IEEE 802.11ah sub 1 GHz WiFi Raspberry Pi HAT when it was introduced in 2021. It is based on the 1st generation Newracom NRC7292 SoC and is still readily available today from various distributors such as The Newracom NRC7292 (and 2nd generation NRC7394) can operate in either host mode or standalone mode. While the NRC7394 2nd generation part has since been released, the easy availability of the AHPI7292S should make it a candidate for initial evaluation of the Newracom ecosystem – but with some caveats ahead (spoiler: lack of

Embedded Linux

Building an updated 802.11ah driver for the Alfa Network AHPI7292S

The Alfa Network’s AHPI7292S was claimed to be the world’s first IEEE 802.11ah sub 1 GHz WiFi Raspberry Pi HAT when it was introduced in 2021. It is based on the first generation Newracom NRC7292 SoC and is still readily available today from various distributors such as While more expensive than some other alternatives, the readily available aspect makes it still an option for evaluating 802.11ah Halow Sub GHz WiFi, especially the Newracom ecosystem. However, support is a little lacking. On-line reviews show a common frustration with documentation and source-code being years out of date. Alfa Network has a pre-built

Electronics Hardware

Evaluating 802.11ah HaLow using the ESP32-S3 & FGH100M-H

At the time of publishing, one of the easiest ways of prototyping or evaluating a 802.11ah HaLow client without having to spin your own PCB is using the commonly available Wi-Fi HaLow Transceiver for Seeed Studio XIAO (SKU: 109100041). This board is available from suppliers such as SeeedStudio, Aliexpress and DigiKey. The PCB is populated with a Quectel FGH100M-H HaLow module. This module operates in the 915MHz ISM band and according to the latest Product Brochure (V8.6) from Quectel has FCC (United States), RCM (Australia & New Zealand) and Anatel (Brazil) regulatory certification. The FGH100M-H is based on the Morse

Embedded Linux

Building OpenWrt for the Seeed Studio WM6108 802.11ah HaLow Radio

The Seeed Studio Wio-WM6108 mini-PCIe module is a popular choice for creating a 802.11ah HaLow router. The mini-PCIe card can be inserted into the WM1302 Raspberry Pi Hat and attached to a Raspberry Pi. Seeed Studio have a pre-built OpenWRT Image on their Wiki page, but it is a bit outdated and based on Morse Micro’s 2.7-dev release. They also don’t provide any guidance to how to build your own updated version. This article shows how to build an OpenWRT image (based on Morse Micro’s 2.11-dev release) and what changes are necessary for the WM6108. It is aimed to be

USB

Adding a TCPC to Zephyr for USB Power Delivery

The Zephyr RTOS has support for USB-C Power Delivery through the software port of the Google ChromeOS Type-C Port Manager. USB Power Delivery is a protocol used on USB Type-C connectors to negotiate power at different voltage levels – typically 5V, 9V, 12V, 15V, 20V, but can be as high as 48V/240W with the new PD revision 3.1. As USB-C becomes the universal standard for low power chargers, it allows different devices such as phones, laptops, LCD screens, mini PCs, lights, label printers, bike lights etc to use a common charger, reducing e-waste and end-user confusion of what plug pack

Electronics Hardware

Review: Gatetop Low Voltage 12 – 48V DC/AC E27 Light Bulb

A couple of weeks ago, we reviewed the Heetech Low Voltage 12 – 85V DC/AC E27 Light Bulb. While it had a large input range of 12 to 85V, the luminous output started to dim as the voltage fell below 13.0V. If operated on a 12V battery, the reduction in light intensity was noticeable as the battery’s terminal voltage reduced throughout the night. It was also advertised and marked as 9W, but only consumed 7 to 8 watts. At that stage, it was time to try a different product and see if we could find anything better. I ordered two

USB

Review: USB-PD 65W Fast Charging Module (XPM52C)

This USB-PD (Power Delivery) Charging module is based on the XPM52C 65W USB-PD Multi-protocol Buck Converter. It allows USB devices (mobile phones, tablets, laptop computers, cameras etc) to be efficiently charged from a low voltage DC power source (8 to 30V DC) such as 12V/24V battery or power station. While my interest was in the USB-C power delivery capability, the device supports a range of legacy fast-charging protocols: This module is available from your usual cheap electronics sources such as AliExpress, Amazon, and Banggood. As the vendors normally don’t list the main part in their descriptions, search for “PD 65W

Electronics Hardware

Review: Heetech Low Voltage 12 – 85V DC/AC E27 Light Bulb

In off-grid systems, it can make sense to use a low voltage DC light bulb, instead of having the overheads of a DC to AC inverter – in terms of capital cost, quiescent (idle) current, conversion efficiency and risk of electrocution. For example, in a shed or other de-attached structure you could have a small 12V or 24V PV Solar system and run your lighting directly from that source. LED bulbs exist in standard E27 (Edison screw, 27mm) and B22 (Bayonet cap, 22mm) that can be powered from lower voltages – typically 12V, 24V or 48V. We review one such

USB

Review: USB-C Power Delivery Trigger Board (CH224)

Depending upon their capability, USB-C PD adapters and chargers can source a variety of different voltages and currents. This is typically 5V, 9V, 12V, 15V and 20V up to 100W (for PD version 3.0). The adapter will initially provide either 5V (to support legacy protocols) or no voltage at all (if USB-C PD only). To obtain 5V or a higher voltage, the sink device needs to request this. For USB Power Delivery, the mechanism is that the source (adapter) will advertise its capabilities through a series of PDO or power delivery objects and the sink will request the desired voltage

Zephyr

Using STM32 HAL with Zephyr: Setting the Brown Out Reset Threshold

The Zephyr RTOS has good support for the STM32 family, but every now and again you need to access something that is not supported. In my most recent experience, I needed to set the Brown-Out Reset (BOR) thresholds on a STM32WLE5CC. Adding vendor or device specific functions can break Zephyr’s code portability between devices and should only be done as a last resort. Where possible, use Zephyr’s supported API. Documentation The STM32 HAL (Hardware Abstraction Layer) and STM32 LL (Low-Level Drivers) comes bundled as a module with Zephyr. The source can be found on Github at https://github.com/zephyrproject-rtos/hal_stm32 with some basic

Embedded Linux

Measuring DC Voltage, Current, Power, Energy & Charge with a Raspberry Pi

Do you have a requirement to measure the voltage, current and power drawn from a battery or by a device using a Raspberry Pi? Perhaps you are also seeking to measure energy consumed (watt/hours) or charge (amp/hours) to determine state of charge (SoC) like a coulomb counter? If the answer is yes, then one of the easiest ways of achieving this is via a dedicated I2C sensor wired into the Raspberry Pi. Hardware One of the more popular sensors for measuring voltage and current is the digital power monitors from Texas Instruments. At the time of writing, the portfolio included

Zephyr

DeviceTree Overlays on Zephyr RTOS: Adding I2C or SPI

After 18 months developing with the Zephyr RTOS, I’m starting to become a strong proponent. In my opinion, one of the key advantages of the Zephyr RTOS is the hardware abstraction. It allows applications to be written for Zephyr that are platform independent and can be moved between different boards including different manufacturers of microcontrollers. In a world still suffering from chip shortages, it has been a breath of fresh air. The Zephyr application (project) contains the application source code while the board files detail the hardware and GPIO assignment, or essentially, how the printed circuit board is wired. This

Electric Vehicles

Prototype IEC61851 / J1772 EVSE Interface

This is a prototype IEC61851 / J1772 EVSE (Electric Vehicle Supply Equipment) Interface intended to connect to a 3.3V micro-controller of your choice. It was originally designed to piggyback on the Electric Vehicle Charge Controller PCB (shown above) and utilise the on-board Microchip dsPIC33 MCU. Firmware for the dsPIC33 is currently working. Code is now being developed for the ESP32. The ESP32 has WiFi capability and this will enable the EVSE to retrieve electricity market pricing or instantaneous PV solar generation data. Below are selection of open source designs for EVSE. Some have been through multiple revisions and make a

Electric Vehicles

IEC61851 / J1772 Electric Vehicle Charge Controller

This device acts as the vehicle when connected to an EVSE (Electric Vehicle Supply Equipment) and negotiates the supply of power. It can be used in EV (Electric Vehicle) conversions, or in applications where you want to obtain power from public charging infrastructure – i.e., battery trailers to replace dirty and noisy generators, electric watercraft etc. Both hardware and firmware is provided as open source. The provided firmware will allow the EVCC to successfully request power and obtain the maximum obtainable current. Boiler plate code is available for the CAN interface and some firmware development would be expected to interface

Electronics Hardware

INA226 DC Voltage/Current/Power Monitor

A breakout board for a DC Voltage/Current/Power Meter based on the popular INA226 36-V, Bi-Directional, Ultra-High Accuracy, I2C Current/Power Monitor with Alert.  While many INA226 breakout boards are available from eBay/Banggood/AliExpress (e.g. CJMCU-226) they do not allow for easy connection of the bus voltage. In addition, we list different shunt resistor values you can use to customise the current range to best suit your application. Specifications Design Notes The device is powered via a separate 2.7 to 5.5V power supply connected to J3. Typical power consumption is just 330uA @ 3.3V.  The signed 16-bit bus voltage register has a least significant bit/resolution

Software

What is MQTT?

MQTT stands for Message Queuing Telemetry Transport. It is a lightweight protocol designed for efficiently transporting messages between M2M or IoT devices. It uses a publish-subscribe model where devices publish information to a broker, and any number of clients can subscribe to them. For example, a temperature sensor device in the home could publish the temperature to a topic, for example /home/indoor/temperature. The air conditioning system could then subscribe to this temperature and switch on and off when the value exceeds programmed thresholds. It might also be desirable to have an indoor temperature display. This device could also subscribe to

LoRaWAN

LoRaWAN: Installing Basic Station and connecting to The Things Network V3 Stack

With the migration of The Things Network to the version 3 stack, I thought it was an opportune time to upgrade my Raspberry PI based gateway from the legacy Semtech packet forwarder to Basic Station. Basic Station LoRaWAN gateway maintainers should be using secured and encrypted connections to the LoRaWAN Network Server (LNS) rather than the old legacy packet forwarder using UDP packets. Semtech provide opensource software called LoRa Basics™ Station for this purpose: Basic Station exchanges data as JSON encoded objects over secure WebSockets.  The gateway identifies itself with a secret API key, ensuring it’s authorised. In addition to

CAN - Controller Area Network

Review: Huawei R4850G2 Power Supply 53.5VDC, 3kW with CAN

The Huawei R4850G2 is a very capable 48V Telecommunications grade power supply available brand-new at cheap surplus prices (normally under $100 USD). Rated at 3000W, it can deliver a considerable 56.1A when powered from a suitable 200-240V rated AC source. The CAN2.0B interface allows for online monitoring and/or adjustment of the output voltage and current. Given the power supply is a Telecoms spare part (most likely for a Huawei mobile phone Base Terminal Station), a surprisable amount of official documentation exists on the hardware from the manufacturer: But when it comes to the CAN communications protocol and operation, the best

Electric Vehicles

ESP32 DIN Rail Module

I’ve been wanting to automate my EV (Electric Vehicle) charging. It’s a long story for another day. I had started out with a high level RS485 interface into my EVSE (Electric Vehicle Supply Equipment) and hit some ‘bugs’. A month later, it turned out much easier to fall back to KISS principals (Keep it Simple, Stupid) and directly turn on and off the power when I needed too. While my EVSE is currently set to charge at a paltry 10 amps, I wanted something a little more robust than a cheap ESP8266 based Smart Plug adapter. Designed to a price