Real-time Closed Loop Controller Raffaele Cetrulo Rolando Ortega Hector Rubio
Objective To design a control application: – Simple – Real-Time – Embedded – Self-contained – Externally Controllable – In real hardware
Hardware Olimex LPC-E2294 Proto Board ( PWM LCD ARM7 TDMI JTAG Ethernet USB to RS232 Analog Input
FreeRTOS Mini Real Time Kernel – Scheduler – Concept of Tasks – Inter-task Communication Essentially a simple Cyclic Executive ARM 7 architecture port available Free!
OS Software Porting Assembly routine to start up the OS and configure interrupt vector. Configuration of timer interrupt for scheduler. Creation of tasks and/or ISRs for interfaces. – PWM, UART, ADC Putting it all together.
ARM MCU Control Loop PI Control ADC PWM Heating Element UART Temp Sensor
Linearization
FreeRTOS Task Communication Idle Task LCD Handler Control Comms HAL UART ISR UART ISR ADC ISR ADC ISR Setpoint
User Interaction Header Temp UART Header Setpoint Control LCD Handler
Walls we slammed against Ethernet communications – Had JTAG programmer/debugger trouble. – Ended up with a tool chain that only allows very small programs. – Couldn’t fit it in there – Reverted to our contingency plan: UART. But, created a Hardware Abstraction Layer that would still allow transparent Ethernet use.
Lessons Learned Some Open Source is great. Some Open Source is great if you are not on a deadline. – So it’s not always cheaper if it involves more development time.
Questions?