Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Teensy 4.0 Ventilator Circuit Control (DC Motor Driver)

  1. #1
    Junior Member
    Join Date
    Apr 2020

    Teensy 4.0 Ventilator Circuit Control (DC Motor Driver)

    Hi Guys,

    I am new here but definitely excited to get started on my first project!

    I am working with some colleagues to develop an open-source ventilator solution. One piece of the puzzle we are working on is creating a closed-loop pressure control regulator. The current design configuration uses a Voice Coil Actuator (effectively a DC motor), with positive current turning a pneumatic servo-valve "ON" and negative current exhausting the gas to the atmosphere. Zero current is an idle position.

    I think we want to use a Teensy 4.0 combined with an H-bridge to perform closed-loop pressure control on the pressure circuit. We want to use a PID control strategy to ultimately control the final pressure output. The feedback signal will be a pressure sensor output stage. Finally we want the tunable variables to be stored in flash memory on the Teensy 4.0.

    With that said, I am a bit stuck on the code side of things. I am very new to the Arduino family and I am curious as to where to start.


  2. #2
    Junior Member
    Join Date
    Nov 2015
    Take a look at for the analog write functions to control your H bridge.

  3. #3
    Senior Member
    Join Date
    Oct 2015
    Roma (IT, EU)
    Great project, a bit generic at the moment.

    Try breaking down the various steps "as seen by the Teensy" and it would be easier to suggest things.
    For example: which kind of signal do you have from the pressure sensor? Analog, I2C, ..?
    Also be aware that Teensy 4 has 3.3v logic level and is not 5v tolerant.

    As to store variables in flash memory, you may know EEPROM lib already, but repetita juvant

    Teensy 4.0 is not listed yet, but it has 60KB of EEPROM where you can store your variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts