Home > Basic Circuits >Sensor Circuits > Design circuit of voltage inverter using PWM

Design circuit of voltage inverter using PWM

Source: InternetPublisher:酷到被通缉 Keywords: Voltage Inverter Updated: 2024/09/26

This example describes a circuit that uses a small microcontroller sensor module with only three connections: 5Vdc, an RS-232 data output, and ground. A dedicated single-voltage level translator or DC/DC converter may be too expensive, but the design still needs to provide ±3V at 1mA to drive the data pin. Since spare PWM (pulse-width modulation) outputs on a 5V microcontroller can drive ±5mA at nearly 5V, a PWM voltage converter consisting of a BAT54S dual-series Schottky diode, two capacitors, and a current-limiting resistor can provide the negative voltage (Figure 1).

  Figure 1. The diode and capacitor provide a negative voltage.

  Figure 1. The diode and capacitor provide a negative voltage.

The microcontroller's PWM output drives the converter with a 1kHz, 50% duty cycle, 0-5V waveform. When the PWM output is 5V, it charges C1. The lower diode in D1 is forward biased, connecting the terminals to ground. When the PWM output is low, it forward biases the upper diode in D1, transferring the charge in C1 to C2. At the same time, it connects the positive charge terminal of C1 to near ground potential, thus reversing the charge. When the PWM output goes high again, the cycle repeats.

Since D1 has a minimum voltage drop of 0.2 V, it is impossible to get -5 V from 5 V, so each phase loses 0.2 V and the voltage output is approximately -4.6 V. Current limiting resistor R1 is only required in designs where the driving microcontroller is sensitive to current transients during switching or where the switching transients can interfere with the microcontroller's analog inputs.

The PWM time base is 1kHz, so the values ​​of each component must be adapted to this frequency. If other frequencies are required, the new component values ​​must be calculated using the formula C=1/(10×F×R), where C is the value of C1 and C2, F is the PWM switching frequency (Hz), and R is the total resistance of the PWM output drive circuit.

When calculating the total resistance of the PWM output, the rated drive value of the digital output must be taken into account. The value of R can be simply replaced by V/A, where V is the drive voltage of the PWM output and A is the drive current of the output (A). For example, the original values ​​for this design are: R = V/A = 5V/0.005A = 1kΩ, and C = 1/(10×F×R) = 1/(10×1kHz×1kΩ) = 1×10-7, which is 0.1μF.

This circuit can also be used as a negative voltage power supply for ADC/DAC and a dual power supply for op amps. For analog applications, it may be necessary to add filtering or a low-power regulator at the output to filter out the transient voltage of the switch.

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号