Welcome! Log In Create A New Profile

Advanced

Cheap Stepper Controller for Emergency Ventilator

Posted by playludesc 
Cheap Stepper Controller for Emergency Ventilator
March 30, 2020 04:44PM
Hi Folks! I've been volunteering my time creating a very cheap emergency ventilator that squeezes a BVM (bag-valve-mask, aka ambu bag) to supply Covid-19 victims with air. I have a working prototype which you can see in the video at the bottom of the post. I come from a 3D printing background, so right now I'm controlling the stepper motor with a spare MKS SBase, smoothieware, and a few lines of basic gcode (G0 X450, G0 X0, repeat ad infinitum). What I'd like to control it with is something like an Arduino Uno, a single stepper driver, and 3 or 4 potentiometers. The three pots control the depth of the squeeze, the speed of the squeeze, and the frequency of the squeeze. A current MIT project shows 4 knobs on their device, and my best guess on that is that the fourth knob controls dwell time (how long the ventilator pauses between squeezes). The problem is, I've never coded for an Arduino and barely even used one. Can I use some basic potentiometers as inputs to achieve this? Can an ATmega 328P issue enough instructions fast enough to something like a DRV8825 to drive a single Nema 17 at something close to its max usable speed? Lastly, I would love a few pointers on which resources I can find to develop the code necessary. Alternatively, if a bored Arduino pro would like to volunteer their time and just donate some workable code, that would be fantastic.

Here's a list of project goals:
  • Keep the hardware as cheap as possible
  • Drive the stepper motor and the arduino off a single 24v power supply (voltage divider for the arduino?)
  • Easily control frequency, depth, speed and dwell time of the stepper motor with knobs/potentiometers
  • Code needs to have acceleration built in to prevent exceeding the Nema 17's torque capabilities

And here is the video of the first prototype:
[youtu.be]
Sorry, only registered users may post in this forum.

Click here to login