RU2523208C1 - Microcontroller adc with transient process in rc circuit - Google Patents
Microcontroller adc with transient process in rc circuit Download PDFInfo
- Publication number
- RU2523208C1 RU2523208C1 RU2012154630/08A RU2012154630A RU2523208C1 RU 2523208 C1 RU2523208 C1 RU 2523208C1 RU 2012154630/08 A RU2012154630/08 A RU 2012154630/08A RU 2012154630 A RU2012154630 A RU 2012154630A RU 2523208 C1 RU2523208 C1 RU 2523208C1
- Authority
- RU
- Russia
- Prior art keywords
- microcontroller
- resistor
- input
- output
- capacitor
- Prior art date
Links
Abstract
Description
Область техники, к которой относится изобретениеFIELD OF THE INVENTION
Изобретение относится к измерительной технике, в частности к аналого-цифровым преобразователям, и может быть использовано в цифровых системах для измерения и контроля аналоговых величин.The invention relates to measuring equipment, in particular to analog-to-digital converters, and can be used in digital systems for measuring and monitoring analog quantities.
Уровень техникиState of the art
Известно техническое решение, содержащее, микроконтроллер, аналоговый компаратор (АК), две RC-цепи, причем выходы первой и второй RC-цепей подключены, соответственно, к неинвертирующему и инвертирующему входам АК, вход первой RC-цепи подключен к дискретному выходу микроконтроллера, к входу второй RC-цепи подключен источник входного напряжения, выход АК подключен к дискретному входу микроконтроллера (В.Л.Горбунов. Однокристальные микро-ЭВМ. - Вычислительная техника и ее применение, 1989, №1, с.30-47.).A technical solution is known, comprising a microcontroller, an analog comparator (AK), two RC circuits, the outputs of the first and second RC circuits connected, respectively, to the non-inverting and inverting inputs of the AK, the input of the first RC circuit connected to a discrete output of the microcontroller, to the input of the second RC circuit is connected to the input voltage source, the output of the AK is connected to the discrete input of the microcontroller (V.L. Gorbunov. Single-chip micro-computers. - Computer engineering and its application, 1989, No. 1, pp. 30-47.).
Недостаток известного решения - низкая скорость преобразования.A disadvantage of the known solution is the low conversion speed.
Известен АЦП, содержащий микроконтроллер со встроенным АК и RC-цепь, вход которой подключен к дискретному выходу микроконтроллера, выход подключен к неинвертирующему входу АК, инвертирующий вход АК подключен к источнику входного напряжения. (http://www.rtcs.ru/comp/html/txt/app/Atmel/micros/avr/AVR400.htm. AVR 400 - Простой аналогово-цифровой преобразователь).A known ADC containing a microcontroller with a built-in AK and an RC circuit, the input of which is connected to a discrete output of the microcontroller, the output is connected to a non-inverting input of the AK, the inverting input of the AK is connected to the input voltage source. (http://www.rtcs.ru/comp/html/txt/app/Atmel/micros/avr/AVR400.htm. AVR 400 - Simple analog-to-digital converter).
Недостаток известного решения - низкая точность.A disadvantage of the known solution is low accuracy.
Наиболее близким по технической сущности к заявляемому техническому решению и принятым авторами за прототип является аналого-цифровой преобразователь с управляемой чувствительностью на базе микроконтроллера, содержащий: микроконтроллер, конденсатор, первый, второй и третий резисторы, первые выводы которых подключены к первому входу, встроенному в микроконтроллер, АК. Второй вывод второго резистора подключен к плюсу источника питания, вторые выводы третьего резистора и конденсатора подключены к минусу источника питания, первый резистор выполнен управляемым, и его управляющий вход подключен к порту микроконтроллера, второй вход АК подключен к источнику входного напряжения (см. пат. РФ №2298872, кл. Н03М 1/38).The closest in technical essence to the claimed technical solution and adopted by the authors for the prototype is an analog-to-digital converter with controlled sensitivity based on a microcontroller, containing: a microcontroller, a capacitor, first, second and third resistors, the first conclusions of which are connected to the first input built into the microcontroller AK. The second terminal of the second resistor is connected to the plus of the power source, the second terminals of the third resistor and capacitor are connected to the minus of the power source, the first resistor is controllable and its control input is connected to the microcontroller port, the second AC input is connected to the input voltage source (see US Pat. No. 2298872, CL H03M 1/38).
Недостаток известного решения - низкая скорость преобразования.A disadvantage of the known solution is the low conversion speed.
Раскрытие изобретенияDisclosure of invention
Технический результат, который может быть достигнут с помощью предлагаемого изобретения, сводится к повышению точности и скорости преобразования АЦП.The technical result that can be achieved using the present invention is to increase the accuracy and speed of the conversion of the ADC.
Технический результат достигается тем, что в микроконтроллерный АЦП с использованием переходного процесса в RC-цепи, содержащий: микроконтроллер, конденсатор, первый, второй и третий резисторы, первые выводы конденсатора и первого резистора подключены к первому входу встроенного в микроконтроллер аналогового компаратора, второй вывод первого резистора подключен к первому дискретному выходу микроконтроллера, введен четвертый резистор, причем первые выводы второго и третьего резисторов подключены ко второму входу встроенного в микроконтроллер аналогового компаратора, вторые выводы второго и третьего резисторов подключены, соответственно ко второму и третьему дискретным выходам микроконтроллера, второй вывод конденсатора подключен к четвертому дискретному выходу микроконтроллера, первый вывод четвертого резистора подключен к источнику входного сигнала, второй вывод четвертого резистора подключен ко второму выводу третьего резистора.The technical result is achieved in that in a microcontroller ADC using a transient in an RC circuit, comprising: a microcontroller, a capacitor, first, second and third resistors, the first terminals of the capacitor and the first resistor are connected to the first input of the analog comparator built into the microcontroller, the second output of the first a resistor is connected to the first discrete output of the microcontroller, a fourth resistor is introduced, and the first outputs of the second and third resistors are connected to the second input of the microcontroller an analog comparator controller, the second outputs of the second and third resistors are connected, respectively, to the second and third discrete outputs of the microcontroller, the second output of the capacitor is connected to the fourth discrete output of the microcontroller, the first output of the fourth resistor is connected to the input signal, the second output of the fourth resistor is connected to the second output of the third resistor.
Краткое описание чертежейBrief Description of the Drawings
На чертеже представлена структурная схема микроконтроллерного АЦП с использованием переходного процесса в RC-цепи.The drawing shows a structural diagram of a microcontroller ADC using a transient in an RC circuit.
Осуществление изобретенияThe implementation of the invention
Микроконтроллерный АЦП с использованием переходного процесса в RC-цепи содержит (см. чертеж) первый резистор 1, второй резистор 2, третий резистор 3, четвертый резистор 4, конденсатор 5 (перечисленные элементы, кроме резистора 4, являются образцовыми, и значения их известны) и микроконтроллер 6. Сопротивления резисторов 2 и 3 равны. Резистор 1 и конденсатор 5 первыми выводами подключены к первому входу АК (не показан) микроконтроллера 6, первые выводы резистора 2 и резистора 3 подключены ко второму входу АК микроконтроллера 6, вторые выводы резисторов 1, 2, 3 и конденсатора 5 подключены соответственно к первому, второму, третьему и четвертому дискретным выходам микроконтроллера 6, первый вывод резистора 4 подключен к источнику входного напряжения, второй вывод резистора 4 подключен ко второму выводу резистора 3.A microcontroller ADC using a transient process in an RC circuit contains (see the drawing) a first resistor 1, a second resistor 2, a third resistor 3, a fourth resistor 4, a capacitor 5 (the listed elements, except for resistor 4, are exemplary, and their values are known) and microcontroller 6. The resistances of resistors 2 and 3 are equal. The resistor 1 and the capacitor 5 are connected by the first terminals to the first AC input (not shown) of the microcontroller 6, the first terminals of the resistor 2 and resistor 3 are connected to the second AC input of the microcontroller 6, the second terminals of resistors 1, 2, 3 and the capacitor 5 are connected respectively to the first, the second, third and fourth discrete outputs of the microcontroller 6, the first output of the resistor 4 is connected to the input voltage source, the second output of the resistor 4 is connected to the second output of the resistor 3.
Микроконтроллерный АЦП с использованием переходного процесса в RC-цепи работает следующим образом.A microcontroller ADC using a transient process in an RC circuit operates as follows.
Микроконтроллер 6 переводит второй и третий дискретные выходы в высокоомное состояние, на первый и четвертый дискретный выходы выводит низкий уровень напряжения. Конденсатор 5 разряжается через резистор 1. Ко второму входу АК микроконтроллера 6, через резисторы 4 и 3 приложено, относительно общего провода, входное напряжение Uвx. Затем микроконтроллер 6 выводит на первый дискретный выход высокий уровень напряжения, значение которого равно U, и запускает предварительно обнуленный внутренний счетчик. Как только напряжение Uc на конденсаторе 5 сравняется с входным напряжением Uвх, на выходе АК микроконтроллера 6 поменяется логический уровень. По этому событию МК 6 останавливает внутренний счетчик, двоичный код которого пропорционален времени t заряда конденсатора 5 до уровня входного напряжения, когда Uc=Uвх. МК 6 определяет Uc, используя известное выражение: Uc=U·(1-е-е/τ), где τ = RC - постоянная времени RC-цепи, состоящей из резистора 1 и конденсатора 5.The microcontroller 6 puts the second and third discrete outputs into a high-impedance state, and outputs a low voltage level to the first and fourth discrete outputs. The capacitor 5 is discharged through the resistor 1. To the second input of the microcontroller AK, through the resistors 4 and 3 is applied, relative to the common wire, the input voltage Uvx. Then the microcontroller 6 outputs to the first discrete output a high voltage level, the value of which is equal to U, and starts a previously reset internal counter. As soon as the voltage Uc on the capacitor 5 is equal to the input voltage Uin, the logic level will change at the output of the microcontroller AK. At this event, MK 6 stops the internal counter, the binary code of which is proportional to the charge time t of the capacitor 5 to the input voltage level, when Uc = Uin. MK 6 determines Uc using the well-known expression: Uc = U · (1st-e / τ ), where τ = RC is the time constant of the RC circuit, consisting of resistor 1 and capacitor 5.
В данном случае Uc=Uвх есть результат преобразования.In this case, Uc = Uin is the result of the conversion.
Таким образом, преобразование осуществляется в течение одного цикла заряда конденсатора, что меньше времени преобразования при использовании широтно-импульсной модуляции, как это сделано в прототипе, где требуется несколько циклов «заряд/разряд».Thus, the conversion is carried out during one cycle of the charge of the capacitor, which is less than the conversion time when using pulse-width modulation, as is done in the prototype, where several charge / discharge cycles are required.
Для повышения точности измерения (преобразования) МК 6 периодически использует цикл по уточнению значения постоянной времени RC-цепи. Этот цикл заключается в следующем.To improve the accuracy of measurement (conversion) MK 6 periodically uses a cycle to refine the value of the time constant of the RC circuit. This cycle is as follows.
МК 1 выводит высокий уровень напряжения на второй дискретный выход и низкий уровень напряжения на третий дискретный выход. Входное напряжение Uвх падает на резисторе 4. Так как сопротивления резисторов 2 и 3 равны, то напряжение, подаваемое на второй вход АК, определяется выражением Uo=0,5·U. МК определяет, используя описанный выше цикл преобразования, постоянную времени RC-цепи из выражения τ=-t/lne(1-Uo/U).MK 1 outputs a high voltage level to the second discrete output and a low voltage level to the third discrete output. The input voltage Uin drops on resistor 4. Since the resistances of resistors 2 and 3 are equal, the voltage supplied to the second input of the AK is determined by the expression Uo = 0.5 · U. MK determines, using the conversion cycle described above, the time constant of the RC circuit from the expression τ = -t / lne (1-Uo / U).
Предлагаемое изобретение по сравнению с прототипом и другими известными решениями имеет преимущество: повышены точность и скорость преобразования.The invention in comparison with the prototype and other known solutions has the advantage of increasing the accuracy and speed of conversion.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2012154630/08A RU2523208C1 (en) | 2012-12-17 | 2012-12-17 | Microcontroller adc with transient process in rc circuit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2012154630/08A RU2523208C1 (en) | 2012-12-17 | 2012-12-17 | Microcontroller adc with transient process in rc circuit |
Publications (2)
Publication Number | Publication Date |
---|---|
RU2012154630A RU2012154630A (en) | 2014-06-27 |
RU2523208C1 true RU2523208C1 (en) | 2014-07-20 |
Family
ID=51215738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
RU2012154630/08A RU2523208C1 (en) | 2012-12-17 | 2012-12-17 | Microcontroller adc with transient process in rc circuit |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2523208C1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2726292C1 (en) * | 2020-01-10 | 2020-07-10 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ставропольский государственный аграрный университет" | Adc using transient process in rc-circuit |
RU2779293C1 (en) * | 2022-06-01 | 2022-09-05 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ставропольский государственный аграрный университет" | Microcontroller adc based on the transient in the rc circuit |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SU600724A1 (en) * | 1976-06-14 | 1978-03-30 | Предприятие П/Я Г-4377 | Analogue-digital converter |
SU1594692A1 (en) * | 1988-10-27 | 1990-09-23 | Читинский институт природных ресурсов СО АН СССР | Method and apparatus for a-d conversion |
RU2298872C1 (en) * | 2005-11-09 | 2007-05-10 | Федеральное государственное образовательное учреждение высшего профессионального образования Ставропольский государственный аграрный университет | Controlled-sensitivity analog-to-digital converter built around microcontroller |
-
2012
- 2012-12-17 RU RU2012154630/08A patent/RU2523208C1/en active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
SU600724A1 (en) * | 1976-06-14 | 1978-03-30 | Предприятие П/Я Г-4377 | Analogue-digital converter |
SU1594692A1 (en) * | 1988-10-27 | 1990-09-23 | Читинский институт природных ресурсов СО АН СССР | Method and apparatus for a-d conversion |
RU2298872C1 (en) * | 2005-11-09 | 2007-05-10 | Федеральное государственное образовательное учреждение высшего профессионального образования Ставропольский государственный аграрный университет | Controlled-sensitivity analog-to-digital converter built around microcontroller |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2726292C1 (en) * | 2020-01-10 | 2020-07-10 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ставропольский государственный аграрный университет" | Adc using transient process in rc-circuit |
RU2779293C1 (en) * | 2022-06-01 | 2022-09-05 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ставропольский государственный аграрный университет" | Microcontroller adc based on the transient in the rc circuit |
RU2790093C1 (en) * | 2022-11-14 | 2023-02-14 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ставропольский государственный аграрный университет" | Digital temperature sensor based on microcontroller rc-adc |
Also Published As
Publication number | Publication date |
---|---|
RU2012154630A (en) | 2014-06-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9587964B2 (en) | Capacitive proximity detection using delta-sigma conversion | |
CN204909403U (en) | Electronic clinical thermometer | |
US11609664B2 (en) | Capacitance detection circuit, sensor, chip and electronic device | |
US8144047B2 (en) | Current-mode dual-slope temperature-digital conversion device | |
CN108693400B (en) | Double-slope fractional order integral type analog-to-digital converter | |
US8324941B2 (en) | Method and apparatus for time-differential comparison of an analog signal | |
US7880661B2 (en) | Analog-digital converter and on-die thermal sensor including the same | |
Czaja | An implementation of a compact smart resistive sensor based on a microcontroller with an internal ADC | |
RU2523208C1 (en) | Microcontroller adc with transient process in rc circuit | |
CN105024699A (en) | Dual-slope integrating analog-to-digital converter based on switch capacitor feedback digital-to-analog conversion | |
RU2449299C1 (en) | Microcontroller measuring converter for resistive sensor | |
CN105242062B (en) | Fan rotation-speed detection device | |
RU2502076C1 (en) | Microcontroller metering converter of resistance into binary code with voltage-controlled generator | |
RU2298872C1 (en) | Controlled-sensitivity analog-to-digital converter built around microcontroller | |
US8779954B2 (en) | AD (analog-to-digital) conversion circuit, micro-controller, and method of adjusting sampling time | |
JP2014508357A5 (en) | ||
CN104897964B (en) | A kind of circuit and method for measuring variable resistor resistance | |
RU2726292C1 (en) | Adc using transient process in rc-circuit | |
EP3298418B1 (en) | Microcontroller with average current measurement circuit using voltage-to-current converters | |
RU2506599C1 (en) | Microcontroller metering converter with balancing of resistive bridge | |
RU2756374C1 (en) | Microcontroller capacity measuring device for embedded computing systems | |
RU2453854C1 (en) | Low-energy microcontroller-based measuring transmitter for variable resistance transducer | |
RU2491558C1 (en) | Microcontroller metering converter of resistance with controlled sensitivity | |
RU2515309C1 (en) | Microcontroller measurement converter with balancing of resistive wheatstone by method of width-pulse modulation | |
RU2781754C1 (en) | Method for measuring the temperature of the medium |