I am designing the controller and data acquisition unit for a rocket engine test stand. This system needs to control a number of actuators on the test stand and also be able to transmit collected data back to the host computer where the team will be watching live data/camera feeds from safety.
The overall design requirements are as follows:
- Acquire data from ~15 analog sensors at 1KHz
- Control the actuators on the test stand including valves and ignition switches
- Transmit data back to the host computer in our shelter in real time
- Accept control from the host computer for things like manual valve actuation, test sequence modification, sequence abortion, etc.
I am not exactly sure where to begin when laying out the software for this system. I am considering using an STM32 ARM Cortex-M4 processor running at 180 MHz. I am having trouble figuring how I should approach the problem. I have considered using an RTOS system but based on what I have seen those generate large overheads as you run them faster as the scheduler has to run each tick. The other idea I'm bouncing around is a state machine combined with some timer-based interrupts for reading and then sending data back out to the PC. Any advice as to how to approach this problem to minimize code complexity would be greatly appreciated. Thanks.
EDIT: I have been told to clarify a number of things concerning the technical specs of the system.
My actuators consist of:
- 6 solenoids (controlled digitally through relays/MOSFET, and switched around once a second)
- 2 DC motors (driven with PWM outputs in a PID loop, need to be able to ramp position controllably)
- One igniter, again controlled through a relay/MOSFET
My sensors consist of:
- 8 pressure transducers (analog voltages)
- 4 thermocouples (analog voltages)
- 2 motor encoders (quadrature encoders)
- 1 light sensor (analog voltage)
- 1 Load cell (analog voltage)
Ideally all of the collected data (all of the above sensors) plus some additional data (timestamps, motor set positions, solenoid positions) is streamed back to the host computer at in real time.