Have anyone made a bio printer before?

I am making a bio-printer which uses liquid as printing material, so I use a solenoid valve instead of a step motor to control extrusion. However, the marlin firmware’s G-code of extrusion provides pulse wave to let the printer extrude material, my printer needs electrical level to control. Have anyone done this before or have a solution to change the Arduino’s output from pwm wave to DC current?