Power consumption is a very important parameter in embedded system designing. Lower power consumption means longer battery life. In order to know the power rating of your designed circuit, you need to know both the source voltage and the current drawn from it. This special power supply project displays both the information on a LCD screen so that you can continuously watch these parameters while prototyping your circuit. Isn’t it cool? Besides, it has an additional built-in feature, which is frequency counter.
The fixed (+/- 5 V) and variable voltage (1.2 – 9 V) sources are derived using linear voltage regulators LM7805, LM7905, and LM350. A PIC16F689 microcontroller is the heart of this project. The output voltage from LM350 is scaled to 0-5 V using a resistor divider network and then measured through an ADC channel of PIC16F689. On the other hand, the current cannot be directly measured with the microcontroller’s I/O port. It is, therefore, first converted to voltage using a shunt resistor and then further amplified the voltage signal through a non-inverting OpAmp circuit. The built-in Timer0 and Timer1 modules of PIC16F689 are used for frequency counting purpose. The prescaler for Timer0 module is auto adjusted to measure frequencies up to 50 MHz. The firmware for the microcontroller was developed with MikroC compiler.