-
How to solve the fact that practice is different from theory
05/11/2015 at 19:49 • 0 commentsAs expected, practice is different from theory and simulation. The calculated frequency that circuit should give at 3.3 volts is 655 Hz, the real frequency, as shown by a very cheap PC based oscilloscope is 660 Hz and by a Fluke 177 multimeter 681 Hz. If we take the first value, 660 Hz, we're not too far from 655 Hz which looks actually promising. Note that the maximum voltage is exactly 10V. The frequency is a bit bigger than expected, which seems wrong, because a resistance (for example the output resistance of the LM358) should lower that frequency. Something else must be there, I will check. I'll have to search for a good oscilloscope at my university and measure that frequency again.
Anyways, I have a plan to correct/solve this error. First I need to make a simple frequency counter on my Arduino, since that's what I'm gonna use in my power supply. Then I will make about 100 measurements at different well known input voltages (from 1 to 12V) and note the frequencies at those voltages. Then I'm gonna plot those points in QtiPlot or Matlab and do a polynomial interpolation on them to get the function that describes these points. After that I can just use this function to determine the frequency with relationship to the voltage, or use it to determine some kind of equation to describe the error for the formula I calculated.
I'll also try to do some improvements to the circuit so as to minimize any quantity that could have an unwanted effect on the output frequency. I'm also thinking about limiting the minimum output voltage of the circuit, as I saw on my crappy oscilloscope (which I don't really trust) that it gets below 0V, which doesn't seem logical to me. If I manage to do that I can skip the interpolation part and make a circuit that will work even if I change the resistances.
-
What would I use a Teensy LC for?
05/09/2015 at 19:41 • 0 commentsThe whole goal of my power supply is that its central brain should be a microcontroller, which should be able to control everything about the power supply. The current Arduino I'm using only has 8 bit DAC resolution, which obliges me to make 4 separate output stages in order to control my output voltage with my desired resolution. The 12 bit DAC resolution of the Teensy LC would mean I would only need one stage to set the voltage and I could set the voltage with an even higher resolution. That would need some adapting to my filter because of the lower frequency of the PWM signal (11.7 kHz vs 31.25 kHz on my 3.3V Arduino Pro Mini), but nothing unmanageable (I assume the DAC of the Teensy board is the same as for the Arduino, in that it generates a PWM signal and not the literal voltage). However, a Teensy would greatly simplify the end circuit and give me mode power to do all kinds of things with that power supply.
So yeah, I could use a Teensy :)
-
Voltage to frequency conversion circuit
05/09/2015 at 09:25 • 0 commentsThe voltage to frequency conversion circuit is the following:
The zener diode has a zener voltage of 10V.
After calculating, the equation which describes the output oscillation frequency with relationship to the voltage Vin applied at the input, assuming Voutmax = 10V,of the circuit is:
For the given values of Rc = 10k ; C = 100n and Vin = 3V, the calculated output frequency is 518 Hz while the simulated one is 521 Hz. Not bad, the errors are probably there because of the output resistance of the op-amp. I thought of a nice method to describe and eliminate that error in the case I don't find the output resistance of the LM358.