https://github.com/mkwapisz2000/c-atmega328p-ds18b20-usart
This project demonstrates reading temperature from multiple DS18B20 sensors connected to the One-Wire bus on ATmega328P.
https://github.com/mkwapisz2000/c-atmega328p-ds18b20-usart
atmega328p avr ds18b20 electronics embedded microcontroller onewire sensor temperature uart
Last synced: about 2 months ago
JSON representation
This project demonstrates reading temperature from multiple DS18B20 sensors connected to the One-Wire bus on ATmega328P.
- Host: GitHub
- URL: https://github.com/mkwapisz2000/c-atmega328p-ds18b20-usart
- Owner: MKwapisz2000
- Created: 2025-02-17T15:48:40.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-02-17T15:56:35.000Z (2 months ago)
- Last Synced: 2025-02-17T16:40:41.038Z (2 months ago)
- Topics: atmega328p, avr, ds18b20, electronics, embedded, microcontroller, onewire, sensor, temperature, uart
- Language: C++
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# c-atmega328p-ds18b20-usart
**Project Description - English**
This project demonstrates reading temperature from multiple DS18B20 sensors connected to the One-Wire bus on ATmega328P. The data is transmitted via USART to a computer, allowing real-time monitoring and analysis.
Features:
- One-Wire bus communication implemented in pure C (no Arduino libraries)
- Detection and temperature reading from multiple DS18B20 sensors
- Verification of readings using CRC
- Overtemperature alarm (indicated by LED and UART message)
- Data transmission to a computer via USART
Hardware Requirements:
- ATmega328P microcontroller (e.g., Arduino Nano or standalone AVR)
- One or more DS18B20 temperature sensors
- 4.7kΩ pull-up resistor for the One-Wire bus
- USB-UART converter (e.g., CP2102, FT232RL) to connect to a computer
- Connecting wires
- 5V power supply
Usage Instructions:
- Compile the code in an AVR C-compatible environment (e.g., Atmel Studio, PlatformIO, AVR-GCC).
- Connect the DS18B20 sensors to the One-Wire bus (PD2) with a 4.7kΩ pull-up resistor.
- Connect the ATmega328P to the computer via a USB-UART converter (TX – RX, RX – TX, GND – GND).
- Open a serial terminal (e.g., PuTTY, Tera Term) set to 9600 baud.
- Temperature data from each sensor will be sent to the terminal every second.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Opis projektu - Polski**
Ten projekt demonstruje odczyt temperatury z wielu czujników DS18B20 podłączonych do magistrali One-Wire na ATmega328P. Dane są przesyłane przez USART do komputera, co pozwala na ich monitorowanie i analizę w czasie rzeczywistym.
Funkcjonalność:
- Obsługa magistrali One-Wire w czystym C (bez bibliotek Arduino)
- Wykrywanie i odczyt temperatury z wielu czujników DS18B20
- Weryfikacja poprawności odczytów poprzez CRC
- Alarm przekroczenia progu temperatury (sygnalizowany diodą LED i przez UART)
- Przesyłanie danych do komputera przez USART
Wymagania sprzętowe:
- Mikrokontroler ATmega328P (np. Arduino Nano lub standalone AVR)
- Jeden lub więcej czujników DS18B20
- Rezystor pull-up 4.7kΩ dla magistrali One-Wire
- Konwerter USB-UART (np. CP2102, FT232RL) do podłączenia komputera
- Przewody połączeniowe
- Zasilanie 5V
Instrukcja użytkowania:
- Kompiluj kod w środowisku obsługującym AVR C (np. Atmel Studio, PlatformIO, AVR-GCC).
- Podłącz czujniki DS18B20 do magistrali One-Wire (PD2) z rezystorem 4.7kΩ pull-up.
- Podłącz ATmega328P do komputera przez konwerter USB-UART (TX – RX, RX – TX, GND – GND).
- Otwórz terminal szeregowy (np. PuTTY, Tera Term) ustawiony na 9600 baud.
- Dane o temperaturze z każdego czujnika będą wysyłane co sekundę do terminala.