Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

USB thermometer on the microcontroller. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Microcontrollers

Comments on the article Comments on the article

The ATmega8 was chosen as the microcontroller. Digital temperature sensor: DS18B20, which has temperature measurement limits from -55 to +125 degrees Celsius. In general, here is a list of everything you need for a thermometer:

  1. ATmega8 microcontroller (preferably without the "L" index at the end).
  2. Temperature sensors DS18B20, required without PAR index at the end, otherwise max. temperature will be +85 degrees.
  3. Quartz 12 MHz.
  4. 2 capacitors 22 pF and one capacitor for power supply (10V and at least 100 Mf, because USB has terrible voltage drops on the power line).
  5. 2 resistors 68 Ohm, 1 resistor 200 Ohm, 1 resistor about 2,2 - 4,7 kOhm, 1 resistor 10kOhm and 1 resistor 1,5kOhm.
  6. 2 zener diodes 3.6V.
  7. USB plug or socket.
  8. Light-emitting diode.
  9. Well, a signet or a mock-up on which it will all be assembled.

Device Diagram:

USB thermometer on the microcontroller. Schematic USB thermometer
(click to enlarge)

The scheme is very simple. On the left are all 4 USB pins. Capacitor C3 is the same power supply. Zener diodes VD1 and VD2 reduce the voltage on the data line to 3,3V. Sensor DS18B20 You can not put it on the board, but bring it to the right place, in general, the wire length can be up to 100 meters, but I do not recommend more than 50m. The LED changes its state (lights up / goes out) each time the temperature measurement is started. If it blinks at a chaotic speed, then the temperature sensor is working normally, if it is constantly lit or not lit - there is a problem with the sensor (incorrectly connected, non-working, or a very long wire, near which there is strong electromagnetic interference). On the right is a connector for in-circuit programming of the microcontroller.

Firmware for it - USBThermometer\MCU\USB_thermometer\default\main.hex. After uploading the firmware, you need to set the fuses correctly, otherwise the device will not work, in STK500 from AVR Studio it looks like this:

USB thermometer on the microcontroller. fuses

If you correctly assembled the device and correctly flashed the MK, then when you connect to your computer via USB, Windows will find a new device and ask where the driver is. It is located in the folder USBThermometer\windows-driver\, where you need to specify the path. When the driver installs, restart your PC. Then run the program USBThermometer.exe.

If the device is not connected, then "Not connected" will be written instead of the temperature. and when dragging, the window will "freeze" a little every second, because the program will update the data on connected devices every second until it finds this thermometer. If you connect the device, then the message "Thermometer is connected" will pop up in the tray, the window will no longer freeze, and you will see this:

USB thermometer on microcontroller

Also, which is very convenient, there is a function "Mini-window" and "On top of all windows". I usually check all 2 checkboxes and get this:

USB thermometer on microcontroller

The whole gray area is the program window in "mini-view" (the white-blue background with bulbs is the desktop). Like :) ? This is convenient because the window is small (96x198), always on top of all windows and does not interfere with other applications. In addition, the program is not displayed on the taskbar, but only in the tray, and by hovering over the program icon, you can see the temperature in Celsius:

USB thermometer on the microcontroller. Trey

I tested this thermometer on several stationary PCs, laptops and netbooks under Windows Home Edition, Windows Professional and Windows Vista operating systems. Everything worked great! Only here on whist, at a temperature on the temperature sensor below -9 and above 99 degrees. the letter "C" (where the temperature is in Celsius) was not visible, because I chose the font for displaying the temperature "Comic Sans MS", but I do not think that this is a problem for anyone.

Program, firmware, sources and driver: Download (500 kb)

PS If you do not have a programmer and you need an already flashed microcontroller or you want to buy a ready-made thermometer, then contact me by e-mail: devices2000 {stsobaka} ya.ru

I also accept orders for the development and manufacture of devices on microcontrollers, for this please contact the same email.

Author: Mikhail Brazhnikov, devices2000 {stsobaka} ya.ru; Publication: cxem.net

See other articles Section Microcontrollers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Air trap for insects 01.05.2024

Agriculture is one of the key sectors of the economy, and pest control is an integral part of this process. A team of scientists from the Indian Council of Agricultural Research-Central Potato Research Institute (ICAR-CPRI), Shimla, has come up with an innovative solution to this problem - a wind-powered insect air trap. This device addresses the shortcomings of traditional pest control methods by providing real-time insect population data. The trap is powered entirely by wind energy, making it an environmentally friendly solution that requires no power. Its unique design allows monitoring of both harmful and beneficial insects, providing a complete overview of the population in any agricultural area. “By assessing target pests at the right time, we can take necessary measures to control both pests and diseases,” says Kapil ... >>

The threat of space debris to the Earth's magnetic field 01.05.2024

More and more often we hear about an increase in the amount of space debris surrounding our planet. However, it is not only active satellites and spacecraft that contribute to this problem, but also debris from old missions. The growing number of satellites launched by companies like SpaceX creates not only opportunities for the development of the Internet, but also serious threats to space security. Experts are now turning their attention to the potential implications for the Earth's magnetic field. Dr. Jonathan McDowell of the Harvard-Smithsonian Center for Astrophysics emphasizes that companies are rapidly deploying satellite constellations, and the number of satellites could grow to 100 in the next decade. The rapid development of these cosmic armadas of satellites can lead to contamination of the Earth's plasma environment with dangerous debris and a threat to the stability of the magnetosphere. Metal debris from used rockets can disrupt the ionosphere and magnetosphere. Both of these systems play a key role in protecting the atmosphere and maintaining ... >>

Solidification of bulk substances 30.04.2024

There are quite a few mysteries in the world of science, and one of them is the strange behavior of bulk materials. They may behave like a solid but suddenly turn into a flowing liquid. This phenomenon has attracted the attention of many researchers, and we may finally be getting closer to solving this mystery. Imagine sand in an hourglass. It usually flows freely, but in some cases its particles begin to get stuck, turning from a liquid to a solid. This transition has important implications for many areas, from drug production to construction. Researchers from the USA have attempted to describe this phenomenon and come closer to understanding it. In the study, the scientists conducted simulations in the laboratory using data from bags of polystyrene beads. They found that the vibrations within these sets had specific frequencies, meaning that only certain types of vibrations could travel through the material. Received ... >>

Random news from the Archive

Logitech G Pro X Superlight Ultralight Wireless Mouse 25.11.2020

Logitech has unveiled the new Logitech G Pro X Superlight wireless gaming mouse, which the company calls the lightest wireless mouse for professional eSports players. The model has already been tested by the players of the Danish team Astralis in the 12th season of the ESL PRO League Final, as well as the French team G2 Esports at the League of Legends European Championship 2020.

Redesigned and specifically engineered to reduce weight while increasing performance, the mouse weighs less than 63 grams and is nearly 25% lighter than a standard PRO wireless mouse. In addition, the Pro X Superlight features more responsive 2,4GHz Lightspeed wireless technology for offline gaming and up to 70 hours of battery life. The new mouse also features large Teflon-coated feet for low friction and improved accuracy, speed and agility.

The mouse features a Logitech G HERO 25K sensor with up to 25600 DPI, the industry's first submicron mouse sensor that can accurately track motion (approximately 1/50 the thickness of a human hair) without sacrificing accuracy. According to the developers, the sensor does this without the use of smoothing, false movements and parasitic oscillations. The HERO 25K sensor uses an intelligent power management system that seamlessly adjusts frame rate based on mouse movement to minimize power consumption. At the same time, even at high resolution, HERO is 10 times more efficient than previous Logitech G sensors.

The price of the novelty is $149,99.

Other interesting news:

▪ electrical web

▪ Turbocharged GeForce RTX 3070 Ti Turbo graphics card

▪ Ointment for snake bites

▪ Liquid laser that does not evaporate in air

▪ A new method of observing the Sun

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site Aphorisms of famous people. Article selection

▪ article Correspondence of models and chassis of GRUNDIG audio and car audio. Directory

▪ article What is Pompeii? Detailed answer

▪ article Zubrovka South. Legends, cultivation, methods of application

▪ article Ultrasonic washing machine. Encyclopedia of radio electronics and electrical engineering

▪ article Easy eight. Focus Secret

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024