Posts Tagged ‘design’
One thing that all us need know is that the project power requirements not only besides on efficiency and quality. Efficiency and quality are subjective terms and you (like me) break and open some market products, you’ll found some really dirty way to power up a electronic device.
Well, with that in mind I’m working in power my Samsung Infrared Decoder with a transformerless power supply. Transformerless Power Supplies, instead of use regular transformer-rectifier circuit or switched power circuitry, use direct coupling of AC line to passive components, like resistors and capacitors, to obtain a desired voltage. Yes, it’s a very dangerous idea, but you can control it and minimize risks too.
Some projects are really cheaper, and don’t require much power. Think in a microcontroller circuit that do the following things:
- Wake-up from sleeping;
- Reading temperature (ADC);
- Transmit it (802.3.15.4);
- Return to sleep;
These steps doesn’t require more that 20mA (aprox), and most market components are cheaper. But if you want to really make this cheaper and smaller, a transformer/wall adapter supply it’s a big monster. The bad news is that transformerless power supplies, not only are dangerous but less current capable of other supplies. If you need more than a few mA, your circuit will be exposed to a great risk.
The two basic types of transformerless power supplies are resistive and capacitive. You can view nice example after Google it. My idea it’s use a capacitive version. My circuit simulation is based on bellow (ignore V2 for now, I’ll explain it later):
The main rule to keep in mind is that “R1” and “XC1” (capacitive reactance) are the only input current limiters. So, more current, need other values. The other rule is to keep the supply working: keep output current requirements less than input current calculated. See:
We need to resolve the input voltage in terms of RMS (Root Mean Square) value. The voltage is the RMS value of a half-wave, because D2 rectifies it. So:
Put all it together to resolve:
I’ve chosen values to meet approximately 5V@20mA. The RMS voltage value in Brazil is 127V. The frequency is 60Hz. The zener used have 5.1V drop across.
For circuit simulation I’ve used MacSpice, a great Berkeley Spice 3f5 clone. In this circuit you view another voltage source (V2) with zero voltage output. That’s a way to measure output current on transient analysis on Spice. You can download my circuit file for run your own simulation here. The results are:
The voltage drop on zener diode and common diode D2 is determinant for output voltage. In really, I never reach desired 5V output because of voltage drop across D2. But it’s ok, most modern microcontrollers operate on a wide range of voltages. The output voltage is given by:
The next step is test a real circuit with real load. So long I’ve news, I’ll post them here.
Remember again that transformerless power supplies are naturally unsafety. After decide make that circuit, and finish it, you have in your hands live AC voltage very close to low power electronics, with is a great danger. Stay as advised.
Someone send to me a question, about how much current my OLED board consumes at all. Well, after measure with a multimeter the answer is: 660μA (aprox.) with display all ON and contrast at 0xFF (max). But this question make me thinking about how measure that current myself, without a multimeter.
When I’m in graduation (some good years ago) I made a little circuit to measure how much current my power supply project output. The circuit is based on “high-side current-sense” methodology. See my hand-drawn circuit above:
This circuit is a classic high-side current-sense, where the voltage drop across Rs resistor is isolated by a operational amplifier (op amp) in a differential configuration with unitary gain. The many implementations of technic were based on discrete components or semidiscrete circuitry. In their simplest form, such high-side monitors require a precision op amp and a handful of high precision resistors.
The resistor value should be low (like mΩ scale), to minimize power losses, but don’t be too low, because stability problems. And don’t forget about power dissipation across the resistor.
One common approach for high-side measurements has been the use of the classic differential amplifier, which is employed as a gain amplifier.
So, after reading a lot of theory, I’ve going to search my integrated differential amplifier.
Integrated Differential Amplifier
- Tiny SOT23-5 package;
- Low cost;
- 3 gain options (20V/V, 50V/V and 100V/V);
- +2.7V to 28V range of operation;
- Consumes only 30μA;
- 0.18% full-scale accuracy with 100mV Vsense input (This is equivalent to only 0.18mV input offset voltage);
The MAX4372, in a tiny SOT23-5 package is a very good device to make a current sense device. You can set the full-scale current reading by choosing the device:
- MAX4372T: 20V/V Gain;
- MAX4372F: 50V/V Gain;
- MAX4372H: 100V/V Gain;
What means 20V/V Gain? If you have 1A current flow through a 100mΩ Rs resistor, you gave only 0.1V drop. But with 20V/V, you multiply this and obtain 2V. Obviously? The design goal with Gain is thinking in terms of full scale design. If your A/D converter uses 3.3V was reference, you can consider this to check what the max current value you can measure with determined gain value.
A test circuit
I’ve designed a test circuit to test my idea. Basically is a MAX4372T with a 100mΩ Rs. I’ve mounted it in universal board, and my idea is connect it to my USB Low Pin Kit:
To test them, I’ve used a PIC18LF2520 and a great character LCD from Electronic Assembly. See my test circuit working:
The pictures show that the global idea works great. Now I need some work to improve stability and other features.
The next step is create a USB device for read, store and show the current measurements: