Question
You are given a task to build a voltmeter that measures from 0Vdc to 200Vdc. The microcontroller can only input voltage from 0V to 5V,
You are given a task to build a voltmeter that measures from 0Vdc to 200Vdc. The microcontroller can only input voltage from 0V to 5V, therefore you need to condition the signal before sending to the microcontroller on PA5. Choose suitable resistor values to translate the input voltage to 0V – 5V. Write an AVR C program for the ATMega32 microcontroller that continuously measures the voltages on PA5 and sends a string to the USART port, which is similar to: “Voltage = x.x V”. The voltage sent must be scaled in software to be the correct value at the input of the voltage divider circuit. Assume the microcontroller is clocked by a 16 MHz oscillator and the USART port is configured for 8 data bits, one stop bit and a baud rate of 2400 bps. The ADC is configured to use the internal voltage reference and 10-bits resolution. Draw the microcontroller circuit showing the voltage divider and all the necessary components needed to have a functioning circuit.
Step by Step Solution
3.49 Rating (162 Votes )
There are 3 Steps involved in it
Step: 1
The microcontroller circuit is shown in Figure 1 The voltage divider is made up of two resistors R1 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started