USB thermometer, mixed results. MP707 - Digital USB Thermometer Making a high-precision usb 1 wire thermometer

Answer

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry"s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five http://jquery2dotnet.com/ centuries , but also the leap into electronic typesetting, remaining essentially unchanged. It was popularized in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

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:

ATmega8 microcontroller (very preferably without the “L” at the end).
Temperature sensors DS18B20, needed without the PAR index at the end, otherwise max. the temperature will be +85 degrees.
Quartz 12 MHz.
2 22 Pf capacitors and one power supply capacitor (10V and at least 100 Mf, because USB has terrible voltage drops on the power line).
2 resistors 68 Ohm, 1 resistor 200 Ohm, 1 resistor about 2.2 - 4.7 kOhm, 1 resistor 10 kOhm and 1 resistor 1.5 kOhm.
2 zener diodes 3.6V.
USB plug or connector.
Light-emitting diode.
Well, and the signet or breadboard on which all this will be assembled.

Device diagram:

The scheme is very simple. On the left are all 4 USB pins. Capacitor C3 is the same power supply capacitor. Zener diodes VD1 and VD2 reduce the voltage on the data line to 3.3V. The DS18B20 sensor can not be placed on the board, but brought to the desired location; in general, the wire length can be up to 100 meters, but I do not recommend more than 50 m. The LED changes its state (lights up/goes out) each time temperature measurement is started. If it blinks at a chaotic speed, then the temperature sensor is working normally, if it constantly lights up or does not light up, there is a problem with the sensor (wrongly 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:

If you assembled the device correctly and flashed the MK correctly, then when connecting to a 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 indicate the path. When the driver is installed, restart your PC. Then run the program USBThermometer.exe. If the device is not connected, then instead of the temperature it will be written “Not connected.” and when dragging, the window will freeze a little every second because the program will update data about connected devices every second until it finds this thermometer. If you connect the device, the message “Thermometer connected” will pop up in the tray, the window will no longer freeze, and you will see this:

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

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

I tested this thermometer on several desktop PCs, laptops and netbooks under operating rooms Windows systems Home Edition, Windows Professional and Windows Vista. Everything worked great! Only on Vista, when the temperature on the temperature sensor is below -9 and above 99 degrees. The letter “C” (where the temperature is in Celsius) was not visible because I chose the font to display the temperature “Comic Sans MS”, but I don’t think that this is a problem for anyone.

Program, firmware, sources, driver, printed circuit board: Download (500 kB)

P.S. If you do not have a programmer and you need a microcontroller already flashed or you want to buy a ready-made thermometer, then contact me by e-mail: devices2000 (stsoback) ya.ru

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

65 nanometers is the next goal of the Zelenograd plant Angstrem-T, which will cost 300-350 million euros. The company has already submitted an application for a preferential loan for the modernization of production technologies to Vnesheconombank (VEB), Vedomosti reported this week with reference to the chairman of the board of directors of the plant, Leonid Reiman. Now Angstrem-T is preparing to launch a production line for microcircuits with a 90nm topology. Payments on the previous VEB loan, for which it was purchased, will begin in mid-2017.

Beijing crashes Wall Street

Key American indices marked the first days of the New Year with a record drop; billionaire George Soros has already warned that the world is facing a repeat of the 2008 crisis.

The first Russian consumer processor Baikal-T1, priced at $60, is being launched into mass production

The Baikal Electronics company promises to launch into industrial production the Russian Baikal-T1 processor costing about $60 at the beginning of 2016. The devices will be in demand if the government creates this demand, market participants say.

MTS and Ericsson will jointly develop and implement 5G in Russia

Mobile TeleSystems PJSC and Ericsson have entered into cooperation agreements in the development and implementation of 5G technology in Russia. In pilot projects, including during the 2018 World Cup, MTS intends to test the developments of the Swedish vendor. At the beginning of next year, the operator will begin a dialogue with the Ministry of Telecom and Mass Communications on the formation of technical requirements for the fifth generation of mobile communications.

Sergey Chemezov: Rostec is already one of the ten largest engineering corporations in the world

The head of Rostec, Sergei Chemezov, in an interview with RBC, answered pressing questions: about the Platon system, the problems and prospects of AVTOVAZ, the interests of the State Corporation in the pharmaceutical business, spoke about international cooperation in the context of sanctions pressure, import substitution, reorganization, development strategy and new opportunities in difficult times.

Rostec is “fencing itself” and encroaching on the laurels of Samsung and General Electric

The Supervisory Board of Rostec approved the “Development Strategy until 2025”. The main objectives are to increase the share of high-tech civilian products and catch up with General Electric and Samsung in key financial indicators.

Beginner Radio Amateur Competition
“My amateur radio design”

Scheme and software a simple USB thermometer on an ATmega8 microcontroller, which a novice radio amateur can assemble with his own hands

Competition design for a beginner radio amateur:
“USB thermometer on microcontroller ATmega8″

Hello dear friends and site guests!
I present to your consideration the second competition entry.
Author of the design - Grigoriev Ilya Sergeevich.

USB thermometer on ATmega8 microcontroller

Good afternoon everyone! I wanted to build a thermometer in order to know the temperature either at home or outside the window. My side is sunny and the usual thermometer is very lying, heating up.
I started digging the Internet. As always, there is a lot of unnecessary, too complex, costly stuff.
Finally, I found a scheme I liked, according to which I began to make a USB thermometer.

So here's the diagram:

For assembly we will need:
♦ MS Atmega 8 and a cot for 28 legs
♦ Temperature sensor DS18B20
♦ Resistors (I have 0.5W):
- 10k
- 4.7k
- 68ohm *2pcs
- 1.5k
- 200ohm
♦ Conders
- 22pF *2pcs
- 100uF at 16V electrolyte
♦ 2 zener diodes at 3.6V
♦ Quartz resonator 12MHz
♦ LED
♦ A piece of one-sided PCB 5*5cm

We start everything with markings on the PCB, then cut it out
By the way, I used to struggle for a long time with cutting out the necessary pieces with a stationery knife, it was long and tedious... I recently ordered diamond cutting wheels for a Dremel on ebay. In a second...vvzhik and cut off!


10 pieces of these circles are 100 rubles (for searching - 10X 20mm Emery Diamond Coated Double Side Cutting Discs with 2 Joint Lever).

Then, we print the diagram on the magazine, then heat it with an iron, then soak it:


Then we etch, wipe off the toner, drill:


And then we start collecting:


Atmega 8-16PU in a crib:


We wash the board from flux, because... I used active and it really spoils the view:


Next I took up the sensor. I decided to make 2 sensors. The first one will be short and located in the room. The second one I will make long and put it outside.


We insert the sensor into the connector according to the pinout.

Now we need to flash Atmega. We take the one I made earlier and upload the firmware.
In SinaProg we need to set fuses:


NECESSARILY! Before connecting, check the board for short circuits!!!

We insert the board into the USB and an unknown device immediately appears:



We go to the device manager, find an unknown device and update the driver.
During installation, a window will appear where we select – “Install this driver anyway”
After this, a new device will appear in the device manager:


And the LED will start blinking randomly. This means that the device is working correctly!
Next, we launch the program to track the temperature.

If the error unable to write to C:/temp/USBThermometer_config.ini begins to appear repeatedly, then go to drive C, turn on all folders visible and, if any, temp folder, then create a notepad there, call it USBThermometer_config and change its extension to .ini . If there is no folder, then create it first. After that my error disappeared. If you created a folder, you can hide it so that it does not interfere.

The program is simple and understandable.
Main window:


Mini window, can be used as a gadget:


That's all. I spent very little money and time on everything! The sensor was around 90 rubles and I already had almost all the change. Now I have a home electronic thermometer with the ability to measure the temperature at home and outside.

MP707
Digital USB Thermometer
1410 rub.

The block will allow the radio amateur to receive a multi-channel digital thermometer connected to a PC via USB port. Essentially, it is a USB 1wire adapter with additional functions. 2 external actuators (for example, two BM146) are connected to MP707 and 2 loads are switched depending on changes in the temperature value from any 2 (two) of 32 temperature sensors (temperature control is carried out), which are connected to the line in parallel. The distance to the last temperature sensor is 100 meters.
IN offline mode work MP707 does not require connection to a PC and can receive power from any network adapter+5V with USB connector.
Supply voltage +3.6…5V (for example, from a standard lithium cell power supply) can also be supplied via J2 to the Vdd point.

I re-read all the information, saw the BM1707.cmd and example.ftp files. But I don’t know what to substitute in [ftp server name] or [full path and file name on the server]. I tried different things - he doesn’t want it. Show me what you put in these lines?
BM1707.cmd:
ftp -n D:\Temp\example.ftp
example.ftp:
open ftp.narod.ru
user usbsergdev _password_
put D:\Temp\BM1707.html /BM1707/BM1707-html.html
close
- Replace the username usbsergdev with your own,
- your password is also yours.
- Naturally, the html file should be located where indicated,
- the BM1707 directory must also exist on the server.
- Also read about ftp access on the website www.narod.ru, they changed something there for new users...

- How to configure the thermostat from another external temperature sensor?
Assign an active temperature sensor to operate the thermostat, for which please follow these steps:
- Select the program type "Table".
- Select the desired temperature sensor with the left mouse button.
- Right-click on "Current Thermostat Sensor".

I connected external sensors DS1820 and DS1822, but I can’t set the temperature measurement accuracy. After performing the procedure for changing the accuracy, the message “temperature measurement accuracy is set for all connected sensors” appears. What can be done?
- This is possible due to the lack of such a setting in some temperature sensors. Please check the operation of the device with DS18B20 temperature sensors.

I would like to see the ability to select a control sensor for each thermostat output in future versions.
- You can increase the number of control channels using MP710 together with MP701.

In MP707 standalone mode, the thermostat does not work - the ON signal is on. (heater), although the upper threshold is set to +30°C and the sensor is heated to +34°C. When connected to a PC everything is fine. What am I doing wrong?
- If you have connected additional temperature sensors, they need to be registered in the device. To do this, please enter: Control --- Thermostat --- Set.

I connected a temperature sensor to the device at a distance of 5 meters - it works fine. Then I connected it at a distance of 40 meters - the device does not see it! But the stated distance to the last temperature sensor is 100 meters over category 5 twisted pair cable. But my distance is 40 meters! At the same time, even TWISTED PAIR, or NOT TWISTED PAIR, but the device does not see the temperature sensor! What can be done?

When connecting temperature sensors at a considerable distance (more than 20 meters) from the base unit, it is important that the connecting wires have the least resistance, i.e. were copper and not too thin, for example, MKESH-3x0.5 http://www.cable-msk.ru/catalog/mkesh/. Therefore, twisted pair cable category 5 for laying computer networks- not the best option.

Digital temperature sensors DS18B20 have the ability to connect them to a bus (parallel to each other). Each sensor has a unique serial number, assigned to it at the factory during manufacture. This allows each sensor to be addressed independently of its physical location on the bus. Together with the device, you can use both DS18B20 and DS18S20, DS1822, DS1820 (with accuracy reduced to +-2 degrees). Thermal sensors are “attached” to certain loads by software. The distance to the last temperature sensor on the line is up to 100 m. If the line length is more than 10 meters, you should use the connection of temperature sensors according to a THREE-WIRE circuit(using three wires). Recommended cable: Category 5 twisted pair cable CAT5 (100 MHz frequency band) - four-pair cable for installation local networks And telephone lines(supports data transfer speeds up to 100 Mbit/s) - eight lines that are twisted in pairs (twisted pair) - four twisted pairs. For each signal, use a separate twisted pair, both wires of which are connected to each other. Total: out of four twisted pairs: one pair is connected to VCC (power), one pair is connected to DQ (data), one pair is connected to GND (common). A total of 3 twisted pairs out of four are used.

Requirements for connecting digital temperature sensors:
- The line must have one beginning and one end. In this case, several “ends” are missing (NOT A STAR!).
- A controller is installed at the beginning of the line.
- The last temperature sensor is installed at the end of the line, the distance to which is up to 100 meters;
- Between them there are intermediate temperature sensors.

- Thanks for the advice! Everything really worked on the 110 meter cable (it didn’t work anymore)!
1) Replaced R5 with R5=5 kOhm trimmer (the resistance at which became 1 kOhm).
2) Set at the end of the line Add.=1 µF ceramic + Cadd.=47 µF electrolytic.
3) Set C=47 uF at the beginning of the line from the controller side. It wouldn't work without him.
4) The diode did not short-circuit.

What is the reason for the presence of two series diodes in the MP707 circuit diagram at the top? Is it possible to short-circuit them both to raise the voltage on the temperature sensor line to the nominal 5 Volts?
- The USB bus has +5V power, and the logical levels for D+/D- are 0...3.3V. The diodes form a voltage drop of 1.4...1.6V, which ensures matching of logical levels. Their shunting can lead to USB driver will perceive this as a short circuit on the data line and will stop working with the device.

- My program VM1707.exe glitched. What can be done?
- In this case:
- Delete the ini file.
- Start VM1707.exe again.

- MP707 works fine, the relays switch (click), but the LEDs do not light. What could be the problem?
- Possible reason- incorrect installation of LEDs on the board. Please install the LEDs according to their polarity.

- Is it possible to connect several MP707 to one PC and how to properly configure their joint operation?
- Yes, you can connect several MP707 to one PC. For this:
- Create separate folder on PC.
- Download (or copy) BM1707.exe no younger than version 11.
- Run BM1707.exe and read the device ID by going to View --- Management, Information --- ID USB).
- Close BM1707.exe.
- Open BM1707.ini.
- Find ID=* in it.
- Replace * with the device number (8 characters!).
- Save the file.
- Close BM1707.ini.
- Run BM1707.exe.
The ini file can be used (copied) the old one. In this case, you should add the entry ID=XXXXXXXX to the section.
To launch the 2nd copy, repeat the steps above.

When you restart the computer, the program for MP707 starts, but stops recognizing the sensors (13 sensors). You need to remove and reinsert the thermometer itself from the USB, after which it is recognized and starts working. Since the computer is remote, rebooting it after a power outage causes the temperature measurement to be interrupted, which is not desirable. How can you solve the problem?
- Install in the ini file:
AUTOTUNE=1
- Start the program.
- Close it.
- Install:
AUTOTUNE=0
- Restart your PC in normal mode.

In the "graph" mode, the temperature scale is not scaled to fit the entire range of measured values. You can only observe an interval 40-45 degrees wide and you have to move the graphs up and down to see their parts one by one. How to deal with this?
- In the ini file, set:
LeftAxis_Automatic=1

- Is it possible to connect atmospheric pressure sensors to the MP707?
- MP707 has 1 1-wire digital input (no analog inputs), so barometric pressure sensors cannot be connected to it.

- How is the temperature measurement algorithm implemented by each of the temperature sensors in the MP707?
- The temperature measurement START command is transmitted for all sensors simultaneously. Temperature readings are then read sequentially for all sensors.

It is known that in the MP707, channel 1 controls the HEATER (Lower = ON, Top = OFF) and channel 2 controls the COOLER (Lower = OFF, Top = ON). Is it possible to install channel 1 to control the chiller?
- Unfortunately, there is no way to set channel 1 operating mode in the MP707 to control the cooler.

- Does the MP707 keep a log file or is it intended only for monitoring?
- Yes, MP707 writes readings to 2 (two) log files:
1. With temperatures and times (See description!!!)
2. With operations completed (off by default)

- Is it permissible to use different sensors on one loop - 18B20 on the board, and 18S20 on the loop?
- Yes, MP707 simultaneously works with different temperature sensors in the line: both 18B20 and 18S20.

I connected three temperature sensors to the MP707. On the PC screen, the lines of all sensors are displayed in one (blue) color. Is it possible to change the color of each line for better perception?
- Yes, the color is determined by an entry in the ini file like:
DD000001A4BB4728_COLOR=16711680
Colors are specified in 3 bytes, 16711680 (dec) = 0xFF0000 (hex) - this is pure blue.
You can set it like this:
DD000001A4BB4728_COLOR=0xFF0000 This will be pure blue.
or
DD000001A4BB4728_COLOR=0x00FF00
or
DD000001A4BB4728_COLOR=0x0000FF
or combinations thereof.

Connected additional DS18B20 sensor for MP707. The length of the wires is 50 cm. The sensor is detected by the VM1707 program and does not display errors in the logs, but the temperature shows 127.5 degrees. When the temperature accuracy of the sensors changes, tenths of the connected sensor change, i.e. 127.5; 127.75; 127.875; 127.9735 At the same time, the standard sensor - on the board - shows the real temperature. What can be done?
- During conversion, the DS18B20 increases consumption and simply does not have enough supply voltage. The voltage drops due to R5, and conversion fails. For normal operation of the temperature sensor, please install a resistor with a nominal value of R=2.4 kOhm on the board parallel to R5.

Multichannel digital thermometer connects to personal computer via USB port. It has an actuator (relay) and allows you to turn loads on and off when the temperature changes (perform thermostatting). The device will be useful for use in everyday life, at home, in the country, in the bathhouse. With its help, you can measure the ambient temperature, control the operating temperature of freezers and refrigeration units, manage various loads offline, log the measured temperature, generate a file with current readings in HTML format (that is, monitor the current temperature and state of the loads via the Internet) , control the load using a batch file.

Specifications:
Supply voltage, V 3.6…5
Current consumption no more than*, mA 50
Range of measured temperatures, 0С -55…+125
Standard temperature sensor DS18B20
Allowed number of sensors**
(can be purchased separately if desired)
Up to 32 sensors type DS18B20, DS18S20, DS1820 or DS1822
Number of load control channels 2
Channel switching current***, Ampere 5
Accuracy, 0С ±0.5
Dimensions printed circuit board, mm 55x55

Contents of delivery
Digital thermometer block assembled with installed temperature sensor DS18B20 – 1 pc. 1
Building 1
User manual 1

Description of the device operation and its connection
The central part of the device is an ATtiny45 microcontroller operating at a frequency of 16.5 MHz. Additional sensors, if necessary, are connected in parallel to DA1. Power supply is supplied via USB port J1.
The device can operate both in autonomous mode (monitoring the current temperature and controlling devices) and under control specialized program for a personal computer.
The DA1 temperature sensor is located on the device board. Electronic components near the sensor may become slightly heated during operation; the measurement accuracy is also affected by the protective heat-shrinkable shell, so small errors in temperature measurement are possible. More accurate measurements can be provided by external temperature sensors, which can be purchased and connected additionally if desired. The recommended length of the connecting line is no more than 20 meters. When the line length is close to the maximum length, you should use high-quality wire: category 5 twisted pair. In the presence of electromagnetic interference It is advisable to use shielded wire.
In standalone mode, the device does not require connection to a computer and can receive power from any 5 V network adapter with a USB connector.

Software
Download the software.
Attention! Some antivirus programs software is mistakenly mistaken for malicious (suspected viruses). In reality, this software does not contain malicious code.