M0AGX / LB9MG

Amateur radio and embedded systems

  • What is inside a Mean Well DIN rail power supply

    I bought a small power supply in DIN rail form factor to provide 12V for the Waveshare RS485 to Ethernet converter mounted in my breaker panel. The exact model is HDR-15-12.

    Installation is trivial as it only has 2 screw terminals for the AC input and 2 for the DC …

    Read more...

  • Scheduling posts with Pelican

    Pelican has no facility for scheduling posts. However, it is very easy to do it with basic shell scripting and cron. I started by adding Scheduled: yes field to the draft post. Read more...

  • Practical comparison of ARM compilers

    My inspiration for this article was this thread in r/embedded. There are still many myths and misconception when it comes to the simple questions "Which compiler should I use?" or "Which compiler is the best?". I will try to share my practical experience with GCC, Clang and IAR on …

    Read more...

  • Connecting Modbus RTU to TCP with Waveshare RS485 to Ethernet converter

    I have been planning to connect my Modbus electricity meter to Home Assistant for a while. Unfortunately my Home Assistant machine is placed far away from the breaker panel and I wanted to avoid running extra cabling. Modbus RTU to Modbus TCP conversion has been a solved problem for a …

    Read more...

  • Connecting a Modbus energy meter to Home Assistant

    I have an electricity meter that supports communication over Modbus. I wanted to add it to Home Assistant. Modbus is supported out-of-the-box by Home Assistant but I could not find an end-to-end tutorial how to connect a device and how to use a Modbus sensor for energy tracking. This article …

    Read more...

  • Getting Home Assistant uptime in minutes

    My Home Assistant installation sends out several "device normal" notifications right after startup. I wanted to avoid being bombarded with useless notifications so I needed to filter out these events. The most obvious condition can be Home Assistant uptime. Basically: send a device status notification only 1-2 minutes after startup …

    Read more...

  • Water leak app notification in Home Assistant

    Home Assistant is an extremely flexible home automation solution that does not come in a magic locked-down box. The flexibility comes with difficulty figuring out how to actually do things because of so many options and different approaches (just like with Linux overall).

    I installed some Zigbee water leak sensors …

    Read more...

  • Migrating to Pelican

    Returning readers: please update your feed reader with the new RSS or Atom URL.

    Last updated 06 Aug 2023.

    I decided to migrate my blog from Wordpress to a static site generator. My main motivation, apart from just trying something new for the sake of it, was the endless stream …

    Read more...

  • Oscilloscope bandwidth benchmark

    What is the impact of oscilloscope bandwidth on the observed signals? Does a bandwidth of 25 MHz mean that a scope will display a 30 MHz signal only with a lower amplitude? Can oscilloscopes work around Nyquist with equivalent sampling? Is a scope four times the bandwidth worth four times …

    Read more...

  • STM32 stop mode & EXTI wakeup without HAL

    Low-power modes come in handy (apart from obvious power saving) when the electromagnetic emissions of an MCU have to be reduced. For example when an MCU is placed close to antenna switching relays - you definitely do not want to receive the noise from the MCU in your HF transceiver (even …

    Read more...