27. Lektion: ADC: Difference between revisions
Jump to navigation
Jump to search
| Line 11: | Line 11: | ||
print(potentiometer.read_u16()) | print(potentiometer.read_u16()) | ||
utime.sleep(1) | utime.sleep(1) | ||
</pre> | |||
Ausgabe: | |||
<pre> | |||
65535 | |||
53501 | |||
41050 | |||
4193 | |||
320 | |||
320 | |||
336 | |||
</pre> | </pre> | ||
Hier ist sehen, das beim Poti am oberen Anschlag auch der maximale Wert auf 16-bit umgerechnet (65535) gemessen wird.<br> | |||
Am unteren Anschlag wird ein Wert 320 gemessen. Umgerechnet entspricht das 0.01611328 Volt. Das ist ein Verhältnis von 208,4, also weniger als 8-bit. | |||
== Probleme beim ADC== | == Probleme beim ADC== | ||
Revision as of 16:45, 15 December 2023
Ein simples Script
import machine
import utime
potentiometer = machine.ADC(26)
while True:
print(potentiometer.read_u16())
utime.sleep(1)
Ausgabe:
65535 53501 41050 4193 320 320 336
Hier ist sehen, das beim Poti am oberen Anschlag auch der maximale Wert auf 16-bit umgerechnet (65535) gemessen wird.
Am unteren Anschlag wird ein Wert 320 gemessen. Umgerechnet entspricht das 0.01611328 Volt. Das ist ein Verhältnis von 208,4, also weniger als 8-bit.
Probleme beim ADC
- Rauschen des Schaltreglers
- schlechte Kontaktgabe beim Breadboard
- https://randomnerdtutorials.com/raspberry-pi-pico-analog-inputs-micropython/
- ADC des Raspberry Pi Pico
- ADC des ESP32
- ADC ADS1115
- https://www.ti.com/lit/ds/symlink/ads1115.pdf?ts=1693292712477&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252Fde-de%252FADS1115
- https://www.az-delivery.de/products/analog-digitalwandler-ads1115-mit-i2c-interface?variant=19034185039968
- https://www.berrybase.de/ads1115-4-kanal-16-bit-ad-wandler-breakout-board
- https://github.com/wollewald/ADS1115_mpy
- https://github.com/robert-hh/ads1x15
- https://pypi.org/project/ADS1115-mic-py/
- https://www.grzesina.de/az/blog_robotcar/ads1115rc.py
- https://how2electronics.com/ads1115-16-bit-adc-module-with-raspberry-pi-pico/