Electronics Project: Active Load

Project: Active load with microcontroller – Part 1: Requirements

This time I would like to write about a project of mine: A (simple) active load with support from a microcontroller.

There are times when you need a dummy load to test and validate some equipment or part of a schematic, e.g. a power supply. In the past I just used some power resistors as a load but this solution is very inflexible. Often you don’t have the right resistors at hand or you must switch resistors when you want to change the simulated load.

It would be nice to have a simple and cheap active load which solves the above problems. My design approach relies on the great Re:load 2 project by Arachnid Labs. I added a STM32 microcontroller with USB support and LCD to my own design. This way I can use my active load as a standalone device which shows me all important pieces of information on the display. Or I can connect a computer via USB to the device and let the PC control and monitor the simulated load.

Here are the requirements:

  • Power supply from around 3.3V to 40V
  • Should be powered by device under test
  • Alternative power supply via USB
  • Maximum dissipated power: Around 12W permanently at room temperature
  • Maximum current: 3A
  • Robust (protected from overvoltage, overcurrent and overtemperature conditions)
  • Device under test should be connected via banana plugs or screw terminals
  • A PC should be able to monitor the actual current and control the desired current via USB
  • Small display to monitor actual and setpoint current
  • Rotary encoder to change setpoint current
  • Small (5×10 cm)
  • Measure temperature at heatsink

Read further on as I write about the hardware design details in part 2.


Howto: Hand solder an MSOP IC with exposed pad

I recently had to solder a special MSOP IC with an exposed pad to a PCB. The device was a LT8610 which is a 2.5A synchronous step-down regulator. The exposed pad is needed to lower the thermal resistance and it is internally connected to ground. That’s why you should really solder the exposed pad to the PCB.

It is important to notice that these kind of IC packages do not lie flat on the PCB when they are not soldered yet. The IC stands on its pins and the exposed pad has no contact to the pad on the PCB.

I decided to solder the IC using a cheap hot air soldering station, a flux pen and regular tin-lead solder. These steps worked quite well in my situation:

  1. Apply (a lot of) solder to the thermal pad on the PCB. Don’t touch the other pads yet. The objective is to apply just enough solder so that the remaining pins of the IC lose contact to the pads on the PCB. That means that the IC only lies with its exposed pad on the thermal pad of the PCB.
  2. Use flux pen on the PCB and the IC.
  3. Place the IC on the PCB as exactly as possible. The flux helps by glueing the IC to the PCB a little bit.
  4. Set the hot air soldering station to ~240 °C.
  5. Apply hot air around the IC for at least a minute. Don’t point the nozzle to just one location. Use circular motions while heating.
  6. Set the hot air soldering station to ~350 °C.
  7. Apply hot air to the IC and around it until the solder on the thermal pad under the IC pulls the IC flat onto the PCB. Then continue for another couple of seconds.
  8. Lower temperature again and continue heating the PCB for a couple of seconds.
  9. You are basically done. Solder the remaining pins with a soldering iron as usual.

This should to the trick, at least it worked for me. By using this method you avoid overheating the IC or the PCB because you notice the moment when the solder melts again and pulls down the IC (capillary action). I believe that this method could also be used with QFN or DFN packages. In this case (instead of step 1) you should probably make sure that all pads on the PCB contain roughly the same amount of solder before applying hot air.

Happy soldering! 😉

Software development

Howto: Remanent data after microcontroller software reset

I recently needed to write a special bootloader for the STM32 controller. One requirement was the ability to explicitly start the bootloader from the application. In this case the bootloader stays active until the next power cycle or when a firmware upgrade has been successfully applied.


RFM69 C++ driver library for STM32 (and other controllers)

I recently developed a protocol agnostic driver library for HopeRF’s RFM69 modules. Protocol agnostic means that you get full control over the module and the data packets that you want to send or receive. You can use this library for receiving packets from existing commercial devices like temperature sensors, or you can set up your own RF network using your own protocol.


Connecting an external RAM to a microcontroller the easy way through pin swapping

In some applications you need greater amounts of RAM. Microcontrollers like the STM32 only have around 20 to some hundred kilobytes of internal RAM. So what do you do if your application needs require some megabytes of RAM, for example in high speed data acquisition systems?


Figuring out the power level settings of HopeRF’s RFM69 (H)W modules

I have been developing a sensor and actuator network for a while now using HopeRF’s cheap RFM69 HW modules. These modules use the licence-free ISM and SRD frequency bands (433 MHz resp. 868 MHz) to send and receive packets and they cost around 5€ per module. HopeRF sells them in two different flavours: RFM69W and RFM69HW (RFM69CW and RFM69HCW also available in a different form factor).

The main difference between these two types is the maximum output power. While a RFM69W module can “only” output from -18 dBm to +13 dBm, the maximum output power of a RFM69HW module is +20 dBm (=100 mW). They are really great indoors because of their range and low attenuation compared to WIFI frequencies of >2 GHz.

There is a downside however: The datasheet is kind of… sketchy regarding some important information. Much better than the datasheet of the previous generation of RF modules (RFM12 for example), but still hard to understand in some parts. I will try to figure out the power level settings of +20 dBm RFM69HW modules in this post while comparing them to the regular RFM69W modules. Of course the datasheet contains information about setting the output power, but there are some ambiguities and contradictions. But more on that later…