Hello all.
Disregarding any hardware requirements at the moment I am checking to see if my Uno can run the following and what means would be ideally recommended to achieve that
In the code I want to use engineering units in tables and curves
I need to pickup RPM from a cars ignition coil signal (0-5v square wave), this is a once per cycle signal (so rpm is double this signal)
I need to setup a curve for a differential pressure sensor (0-5v, 0-700kpa)
I need to setup a curve for a pressure sensor (0-400kpa)
With these three inputs I want to create a controller who runs a PID loop that controls a PWM output at a fixed frequency (25Hz) into a transistor that operates a solenoid.
The basic function is that it reads RPM and differential pressure and looks up a base duty cycle from a 3d table then applies PID correction to the base duty cycle and outputs that to the PWM output,
The PID loop error comes from a 3d table that has RPM and Pressure sensor as axis's the values in the table are differential pressure targets
The PID loop will only use PI for this
For the P and I output I want to have lookup curves that are unlinear so that I can control the effect of error on either P or I.
I believe the following steps are generally best to tackle this
- Get analog sensors and rpm input to give engineering units that are monitor-able over serial
- Write code without PID and just read from the base 3d table and output to PWM (needs to interpolate between cells in the table).
- Add PID target table and PID loop and PI error curves
Not required but would be nice to have
Is there any means of also creating an PC interface to the Uno where in I can get feedback values (rpm, pressure values, pid values and output duty cycle) and directly adjust the tables without having to send the whole code back in?
Is something like this already available that I can adjust ?
any guides would be helpful thanks.
Gunni