Retronics

Restoring, remodeling and creating electronic devices


µTracer (uTracer), part 7: Making a custom heater voltage and current monitor

One requirement for the heater supply module, is to present real-time measurements of the heater voltage and current. There are essentially three parts needed: a measurement device, a display and a microcontroller.

For a quite simple circuit like this, the trusty old ATMEGA328P, known from basic Arduino boards, is up for the job. I might use this MCU’s internal ADC to measure voltage and current, but for higher precision + ripple immunity, I chose the INA219 programmable power monitor, which measures voltage and current (over a given shunt resistor), communicates via I2C, and comes in a tiny SOT23-8 package.

I programmed this device to perform 32 samples of voltage and current over 17ms periods, and calculate the average values, to filter out any spurious values that might come from SMPS ripple/noise. 4 times a second, the ATMEGA asks the INA219 for updates values, and presents them in a 1.3″ display with SPI interface.

The circuit:

(Click for high resolution image)

This board receives 19.5V from the heater PSU board, and a switched regulator based on TPS54302 steps it down to 3.3V for the circuitry.

From the USB interface module described in this post, there are two signal lines:

  • One from the µTracer PIC heater PWM pin. This enables the ATMEGA to listen for PWM pulses, which indicate that heating has been turned on from the µTracer software. The PWM signal is filtered to a stable value by Q301 and surrounding circuitry.
  • One from the “high voltage” LED pin on the PIC. This notifies that high voltage is present in the µTracer circuit.

On the pin header towards the heater PSU board, there are several signal lines:

  • PSU_EN: Lets the ATMEGA switch the XL4005 on and off.
  • OUT_EN: Turns on/off the output voltage from the heater PSU.
  • CUR_LIM: Notifies the ATMEGA when the current limiter kicks in.
  • INA_VSENS: Lets INA219 sense the output voltage from XL4005.
  • INA_CSENS: Lets INA219 sense the voltage over the shunt resistor, and thereby calculate the current draw.

The ATMEGA also controls status LEDs for voltage current and heater output, which will be mentioned in the next post. Before soldering the microcontroller, you need to burn bootloader.

Finished measurement and controller board (front and back), ready to be connected on top of the heater PSU board:

Firmware for the ATMEGA is written in Arduino IDE. This is posted to the GitHub repository for this project, and can be uploaded via a USB-to-UART adapter (FTDI adapter), connected to the Firmware port of the MCU board.

In the next post, the heater PSU performance will be tested.



10 responses to “µTracer (uTracer), part 7: Making a custom heater voltage and current monitor”

  1. dear,really great job,it is possible to have gerber files for pcb of usb interface and heater psu board,measurement and controller board .many thanks
    vincenzo

    Liked by 1 person

    1. Sure. I’ve set the Github repository public: https://github.com/donpivo/uTracer. Here you’ll also find Arduino code, KiCad files and 3D models.

      Like

      1. Vincenzo Mastroianni avatar
        Vincenzo Mastroianni

        dear,
        many thanks.

        Like

  2. Vincenzo Mastroianni avatar
    Vincenzo Mastroianni

    dear,really great job,it is possible to have gerber files for pcb of usb interface and heater psu board,measurement and controller board .many thanks
    vincenzo

    Like

    1. Vincenzo Mastroianni avatar
      Vincenzo Mastroianni

      Good morning,
      I had the printed circuits made, do you have the list of necessary materials?
      Thank you

      Like

  3. Vincenzo Mastroianni avatar
    Vincenzo Mastroianni

    Good morning,
    I had the printed circuits made, do you have the list of necessary materials?
    Thank you

    Like

    1. Yes. I’ve added BOM in .csv and.xml format for the four boards, to the github repository.
      One item that is not listed i BOM, is the flat cable between MCU board and PIC Interface board. This is an 8 conductor FFC with 0.5mm pitch and connectors on opposite sides, e.g. Molex 15166-0092

      Like

      1. Vincenzo Mastroianni avatar
        Vincenzo Mastroianni

        dear, many thanks;
        I tried downloading the .csv and .xml files but they don’t open.

        Like

      2. I doublechecked, and the files seem to be in order. If you don’t have suitable software to open these files, you can read them directly from the Github web page.

        Like

  4. thanks

    Like

Leave a comment