Hello,
in advance - please appologize my english - I'm not a native english speaker.
Regarding my question, I searched already this Forum and the WEB - I wasn't able to find a concret hint,
how to solve.
It is clear, that it is much cheaper to buy a LAB bench from Ebay or anywhere else - no doubt.
I setup this project bring my "LearnCurve" up in programming a picaxe AND electronic belongings.
Now - coming to my question:
I build up a LabBench which shall control Voltage and Current by a PicAxe (and later on showing the values on a display)
I pick up the idea from Guido Socher (http://tuxgraphics.org/common/src2/article379/powersupply.pdf) and
EEVBblog (http://www.eevblog.com/projects/usupply/)
- preset of a Voltage and Current value by setting the µController internal values (via buttons) [as Guido]
- output of a PWM-Signal through a low pass filter (to reduce the ripple) [as EEVBlog]
- Control the voltage and current as in [Guidos schematic / Gain ~4-5]
I prepared that circuit (shown below) and set it up on a breadboard.
I already programmed the Picaxe to send out a PWM.
The PWM is filtered by a low pass order - and the output of the lowpass filter has less then
10mV ripple and a range from 0V up to 4,4V. - so thats OK
I'm struggling now with the following topics:
1. I measured that the voltage amplification is not linear - so - how can I allign an output-voltage to a preset
Voltage ? I (tried to ) read the C-program of Guido - but I didn't get it. There are some magic values in the hardware_settings.h (U_divider 10.75 - which do not match to his circuit - R7/R8 )
What I mean is:
I have a resolution of 10Bits; If I preset a duty of lets say 512 - then it is 50% of 4,4V
My first assumptions was:
He measured the output of the R2R-Ladder and adjusted the resistor-divider at the output - so that the two
values can be compared directly.
But - as the amplification is NON-Linear - there must be an other trick.
My 2nd assumption and try was to read back the voltage after the lowpass filter and compare it with the
output-voltage (which has been adjusted before to the same value as the lowpass filter)
This worked 50:50 - because -
yes: it was now possible to control and allign the output to the value of the LowPass-Filter, BUT
the relation beween the preSetValue and the lowpass-Filter/output are not corresponding any more.
These are my measured values:
Assumption: 15V <=> 1000 (not 1023, because I wanted to keep some digits in reserve for controlling)
My 3rd assumption is: I will measure the voltage on the divider;
I know the divider-term: Lets assume it will be R17=4k / R18=1k => Divider-Term = 5
That means: at an output of 15V - R18 will have 3V.
3V are corresponding to a resoultionvalue of 614 (if 5V <=> 1024).
But this needs a absolute stable reference for the PicAxe ? Doesn't it ?
It would be great, if anybody can help me or give me some hints.
Thanks in advance
Albatros
Remark:
Instead of the Transistor-Amplifier - I tried also a similar circuit with OpAmps - with the same result)
And here the circuit
in advance - please appologize my english - I'm not a native english speaker.
Regarding my question, I searched already this Forum and the WEB - I wasn't able to find a concret hint,
how to solve.
It is clear, that it is much cheaper to buy a LAB bench from Ebay or anywhere else - no doubt.
I setup this project bring my "LearnCurve" up in programming a picaxe AND electronic belongings.
Now - coming to my question:
I build up a LabBench which shall control Voltage and Current by a PicAxe (and later on showing the values on a display)
I pick up the idea from Guido Socher (http://tuxgraphics.org/common/src2/article379/powersupply.pdf) and
EEVBblog (http://www.eevblog.com/projects/usupply/)
- preset of a Voltage and Current value by setting the µController internal values (via buttons) [as Guido]
- output of a PWM-Signal through a low pass filter (to reduce the ripple) [as EEVBlog]
- Control the voltage and current as in [Guidos schematic / Gain ~4-5]
I prepared that circuit (shown below) and set it up on a breadboard.
I already programmed the Picaxe to send out a PWM.
The PWM is filtered by a low pass order - and the output of the lowpass filter has less then
10mV ripple and a range from 0V up to 4,4V. - so thats OK
I'm struggling now with the following topics:
1. I measured that the voltage amplification is not linear - so - how can I allign an output-voltage to a preset
Voltage ? I (tried to ) read the C-program of Guido - but I didn't get it. There are some magic values in the hardware_settings.h (U_divider 10.75 - which do not match to his circuit - R7/R8 )
What I mean is:
I have a resolution of 10Bits; If I preset a duty of lets say 512 - then it is 50% of 4,4V
My first assumptions was:
He measured the output of the R2R-Ladder and adjusted the resistor-divider at the output - so that the two
values can be compared directly.
But - as the amplification is NON-Linear - there must be an other trick.
My 2nd assumption and try was to read back the voltage after the lowpass filter and compare it with the
output-voltage (which has been adjusted before to the same value as the lowpass filter)
This worked 50:50 - because -
yes: it was now possible to control and allign the output to the value of the LowPass-Filter, BUT
the relation beween the preSetValue and the lowpass-Filter/output are not corresponding any more.
These are my measured values:
Assumption: 15V <=> 1000 (not 1023, because I wanted to keep some digits in reserve for controlling)
My 3rd assumption is: I will measure the voltage on the divider;
I know the divider-term: Lets assume it will be R17=4k / R18=1k => Divider-Term = 5
That means: at an output of 15V - R18 will have 3V.
3V are corresponding to a resoultionvalue of 614 (if 5V <=> 1024).
But this needs a absolute stable reference for the PicAxe ? Doesn't it ?
It would be great, if anybody can help me or give me some hints.
Thanks in advance
Albatros
Remark:
Instead of the Transistor-Amplifier - I tried also a similar circuit with OpAmps - with the same result)
And here the circuit
Last edited: