I bought an L298N only to find out that at it outputs 0 volts when I write byte 0 and then jumps up to 5 volts when writing byte 1 -2 . Specs says for motors 5 to 35 volts, I did not understand that this mean starting at 5 volt.
What I need to control is an air pressure valve which regulates the output pressure linear based on input voltage 0 - 10 dc. So this is an analog device.
What is the right controller for this ? Ampere is minimal, I have to re - check but I am sure it is less than 100 milli amps.
How is the valve powered? Can you post a link or brand/part number?
Power electronics is not analog these days, its all switched because its so much more
You need to generate an analog voltage (which can be done with PWM pin and an RC low-pass filter),
then boost it to 10V using an opamp circuit.
You could put the output of the L298N through an RC filter, but the outputs of the L298 are nothing
like to rail-to-rail, so you'd get a sub-range of 0..10V.
You could level shift your PWM to 10V properly with a transistor or MOSFET and feed that output
through a low pass filter - however you have to consider the input impedance of the load being
driven to figure out the component values.