PDA

View Full Version : Regulated power supply problem



vladimir059@hot
- 4th December 2006, 03:18
Hello PIC guys! I made PIC controlled power supply for engraving head control(12VDC motor). I used HPWM command for output. I wrote code for basic PWM control , ADC reads value from potentiometer and change duty of HPWM command , but I don’t know how to write feedback procedure which can allow control output voltage regardless of current.
Please help me, any ideas welcome, maybe I made mistake in my circuit design that's why I provided a diagram
Vladimir.

sayzer
- 4th December 2006, 05:29
More detail could be handy here.

"...write feedback procedure which can allow control output voltage regardless of current" does this mean that you need feedback for speed no matter what the current is?

Simple RPM reading for example; if the speed is lower, then you increase the motor supply through PWM, and if the speed is higher, then you decrease it.

Is this what you asked for?

vladimir059@hot
- 4th December 2006, 05:51
Yes I need keep constant RPM of motor, but I cannot phisically control true RPM (due to design restrictions) , I can only control output voltage. If motor stall or reduce RPM, output voltage of PWM circuit will be low.
Vladimir

Luciano
- 4th December 2006, 10:25
Hi Vladimir,

(Brushed DC Motor)

See these Application Notes.

Brushed DC Motor Fundamentals
http://ww1.microchip.com/downloads/en/AppNotes/00905a.pdf
See pages 5, 6 and 7. FEEDBACK MECHANISMS / Back Electro Magnetic Flux (BEMF).

* * *

Low-Cost Bidirectional Brushed DC Motor Control Using the PIC16F684
http://ww1.microchip.com/downloads/en/AppNotes/00893a.pdf
(With Sensorless Motor Control Feedback).

Best regards,

Luciano

vladimir059@hot
- 4th December 2006, 23:29
Thank you Luciano, this information is very helpful, but most important thing I'm looking for an example of code which can I use as building block for my program. If someone wrote subroutine which is monitoring feedback voltage and changing duty of HPWM command, please let me know, I only need to know basic structure of such program.
Vladimir

mister_e
- 4th December 2006, 23:37
maybe this will help
http://www.picbasic.co.uk/forum/showpost.php?p=6302&postcount=6

at least a kick-start :)

vladimir059@hot
- 5th December 2006, 01:26
Thank you Mister E. It is all I need for beginning. I will play with this code. Please let me know how critical that op amplifier and it might be substituted somehow.
Vladimir

mister_e
- 5th December 2006, 07:23
the frequency is low and you filter it, so it's close to be pure DC. Any op-amp will work, from grandpa 741 to the most sophisticated.

lm358,tl071,tl072,lm4558,ne5532,ne5534,lm6132,max4 27,lt1001... etc etc