circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

July 2005, Issue 180

Solar-Powered Water Pump Controller
Cypress PSoC High Integration Challenge 2004 Contest Winner


SOFTWARE

Figure 6 depicts the pump inverter’s main software components. I implemented the system with a combination of foreground interrupts for handling time critical events and a series of background algorithms for processing the less-critical activities during the remaining time.

(Click here to enlarge)

Figure 6—The software block diagram shows the lower-level ISRs followed by the ADC sampler and periodic task scheduler, which schedules the remaining system activities.

The background processing involves a polling algorithm for collecting the ADC measurements and a non-preemptive task scheduler, which triggers at the waveform generator’s voltage zero crossing. The task scheduler operates the control loops, fault monitoring, and user interface activities.