Electronicdesign 2713 Xl dc
Electronicdesign 2713 Xl dc
Electronicdesign 2713 Xl dc
Electronicdesign 2713 Xl dc
Electronicdesign 2713 Xl dc

Measure Your Floating DC Voltages

May 5, 2010
How to enable a microcontroller to measure floating dc voltages to 2% accuracy.

Transformer isolation

Rectified voltage

Measuring a floating dc voltage using a microcontroller’s analog-to-digital converter (ADC), with the dc+ to dc– ranging from 2.5 to 30 V and the low side able to float as high as 120 V above logic ground, presents a major challenge.

Connecting the dc low side to the microcontroller’s reference risks ground loops. Using a resistor divider to reduce the offset would also scale down the voltage of interest, making it difficult to read accurately. Analog isolation ICs tend to be an expensive solution.

To solve these problems, start by transformer-isolating the dc voltages (Fig. 1). Then, create an ac waveform by using a spare general-purpose I/O (GPIO) line from the microcontroller to control an optoisolator (Q1) that switches the dc on and off.

Connecting a diode (D1) in reverse bias across the transformer’s primary will suppress the inductive kickback when the optoisolator turns off. Rectifying the transformer output converts the signal back to dc. Using R2 and C1 to create a low-pass filter creates a dc voltage proportional to the original ac.

The circuit uses two additional resistors, R3 and R4, for two reasons. First, they bleed charge off the capacitor that has no other path because the ADC has a high-impedance input. Second, they divide the voltage to a level within the ADC’s range. The zener diode (Z1) provides protection for the ADC.

A few notes on transformer selection and circuit layout: To protect against the possibility that the microcontroller goes astray and leaves Q1 turned on, the transformer primary’s winding resistance should be high enough to limit the input current to a safe level. In layout, take care to allow sufficient clearance distances in the isolation areas of the transformer and the optoisolator.

Test results for this circuit show that the output is quite linear (Fig. 2). A simple linear equation in the microcontroller allows dc measurements to within 2% accuracy.

Sponsored Recommendations

Understanding Thermal Challenges in EV Charging Applications

March 28, 2024
As EVs emerge as the dominant mode of transportation, factors such as battery range and quicker charging rates will play pivotal roles in the global economy.

Board-Mount DC/DC Converters in Medical Applications

March 27, 2024
AC/DC or board-mount DC/DC converters provide power for medical devices. This article explains why isolation might be needed and which safety standards apply.

Use Rugged Multiband Antennas to Solve the Mobile Connectivity Challenge

March 27, 2024
Selecting and using antennas for mobile applications requires attention to electrical, mechanical, and environmental characteristics: TE modules can help.

Out-of-the-box Cellular and Wi-Fi connectivity with AWS IoT ExpressLink

March 27, 2024
This demo shows how to enroll LTE-M and Wi-Fi evaluation boards with AWS IoT Core, set up a Connected Health Solution as well as AWS AT commands and AWS IoT ExpressLink security...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!