[Richard Hawthorn] sent us in this interesting fail, complete with an attempted (and yet failed) clever solution. We love learning through other people’s mistakes, so we’re passing it on to you.
First the obvious-in-retrospect fail. [Richard] built a board with a temperature sensor and an ESP8266 module to report the temperature to the Interwebs. If you’ve ever put your finger on an ESP8266 module when it’s really working, you’ll know what went wrong here: the ESP8266 heated up the board and gave a high reading on the temperature sensor.
Next came the clever bit. [Richard] put cutouts into the board to hopefully stop the flow of heat from the ESP8266 module to the temperature sensor. Again, he found that the board heats up by around four degrees Celcius or nine degrees Farenheit. That’s a horrible result in any units.
What to do? [Richard’s] first ideas are to keep hammering on the thermal isolation, by maybe redoing the board again or adding a heatsink. Maybe a daughterboard for the thermal sensor? We can’t see the board design in enough detail, but we suspect that a flood ground plane may be partly to blame. Try running thin traces only to the temperature section?
[Richard]’s third suggestion is to put the ESP into sleep mode between updates to reduce waste heat and power consumption. He should be doing this anyway, in our opinion, and if it prevents scrapping the boards, so much the better. “Fix it in software!” is the hardware guy’s motto.
But we’ll put the question to you
electronics-design backseat drivers loyal Hackaday readers. Have you ever noticed this effect with board-mounted temperature sensors? How did you / would you get around it?
Fail of the Week is a Hackaday column which celebrates failure as a learning tool. Help keep the fun rolling by writing about your own failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.
There are a few AVR microcontrollers with onboard temperature sensors. These temperature sensors are neither accurate nor precise, but they do work for a few use cases. [Thomas] came up with a little bit of code that runs on all AVR microcontrollers, and is at least as accurate as the sensors in the rare AVRs that have them.
Although not all AVRs have a temperature sensor, they do all have RC oscillators, and these RC oscillators are temperature sensitive. By combining the RC oscillator and watchdog timer, [Thomas]’ code can get a vague idea if it’s getting hotter or colder.
To prove his code works, [Thomas] took an ATtiny13A chip loaded up with a few bits of code and placed a heated coin on it. The chip was programmed to turn on an LED when it detected a rise in temperature, and predictably, the LED lit up. With a coin chilled in a bowl of ice water, another bit of code ran, flashing the LED.
While we’re sure it’s neither accurate nor precise, it does have its uses – overheating protection or a simple thermostat. You can check out a video of the code in action below.
Continue reading “Measuring Temperature On An AVR Without A Sensor”
[bhunting] lives right up against the Rockies, and for a while he’s wanted to measure the temperature variations against the inside of his house against the temperature swings outside. The sensible way to do this would be to put a few wireless temperature-logging probes around the house, and log all that data with a computer. A temperature sensor, microcontroller, wireless module, battery, case, and miscellaneous parts meant each node in the sensor grid would cost about $10. The other day, [bhunting] came across the exact same thing in the clearance bin of Walmart – $10 for a wireless temperature sensor, and the only thing he would have to do is reverse engineer the protocol.
These wireless temperature sensors are exactly what you would expect for a cheap piece of Chinese electronics found in the clearance bin at Walmart. There’s a small radio operating at 433MHz, a temperature sensor, and a microcontroller under a blob of epoxy. The microcontroller and transmitter board in the temperature sensor were only attached by a ribbon cable, and each of the lines were labeled. After finding power and ground, [bhunting] took a scope to the wires that provided the data to the radio and took a look at it with a logic analyzer.
After a bit of work, [bhunting] was able to figure out how the temperature sensor sent data back to the base station, and with a bit of surgery to one of these base stations, he had a way to read the temperature data with an Arduino. From there, it’s just a data logging problem that’s easily solved with Excel, and [bhunting] has exactly what he originally wanted, thanks to a find in the Walmart clearance bin.
[BaronVonSchnowzer] is spinning up some home automation and settled on an inexpensive ambient temperature sensor which is sold to augment the data a home weather station collects. He found that the RF protocol had been reverse engineered and will use this information to harvest data from a sensor in each room. In true hacker fashion, he rolled his own advances out to the Internet so that others may benefit. Specifically, he reverse engineered the checksum used by the Ambient F007TH.
He got onto this track after trying out the Arduino sketch written to receive the sensor’s RF communications. One peculiar part of the code turned out to be a filter for corrupt messages as the protocol’s checksum hadn’t yet been worked out. Figuring out how the checksum byte owrks wasn’t an easy process. The adventure led him to dump 13k samples into a spreadsheet to see if sorting similar sets of 5-byte message and 1-byte checksum would shed some light on the situation. The rest of the story is some impressive pattern matching that led to the final algorithm. Now [BaronVonSchnowzer] and anyone else using these modules can filter out corrupt data in the most efficient way possible.
The 1-Wire protocol is usually found in temperature sensors, but you’ll also find it in chips ranging from load sensors, a battery sensor and LED driver that is oddly yet officially called a ‘gas gauge’, and iButtons. It’s a protocol that has its niche, and there are a few interesting application notes for implementing the 1-wire protocol with a UART. Application notes are best practices, but [rawe] has figured out an even easier way to do this.
The standard way of reading 1-Wire sensors with a UART is to plop a pair of transistors and resistors on the Tx and Rx lines of the UART and connect them to the… one… wire on the 1-Wire device. [rawe]’s simplification of this is to get rid of the transistors and just plop a single 1N4148 diode in there.
This would of course be useless without the software to communicate with 1-Wire devices, and [rawe] has you covered there, too. There’s a small little command line tool that will talk to the usual 1-Wire temperature sensors. Both the circuit and the tool work with the most common USB to UART adapters.
[jimmayhugh] is a homebrewer and has multiple fermentation chambers and storage coolers scattered around his home. Lucky him. Nevertheless, multiple ways of making and storing beer requires some way to tell the temperature of his coolers and fermenters. There aren’t many temperature controllers that will monitor more than two digital thermometers or thermocouples, so he came up with his own. It’s called TeensyNet, and it’s able to monitor and control up to 36 1-wire devices and ties everything into his home network.
Everything in this system uses the 1-Wire protocol, a bus designed by Dallas Semiconductor that can connect devices with only two wires; data and ground. (To be a fly on the wall during that marketing meeting…) [jimmay] is using temperature sensors, digital switches, thermocouples, and even a graphic LCD with his 1-wire system, with everything controlled by a Teensy 3.1 and Ethernet module to push everything up to his network.
With everything connected to the network, [jimmay] can get on his personal TeensyNet webpage and check out the status of all the devices connected to any of his network controllers. This is something the engineers at Dallas probably never dreamed of, and it’s an interesting look at what the future of Home Automation will be, if not for a network connected relay.
This homemade glove and gesture controlled rover was created by [electro18]. It can send temperature, battery level, and object distance to the LCD panel on the wrist. Instead of a typical joystick, this wireless system taps into an embedded accelerometer to maneuver the robot like magic.
The main chassis platform is made of clear acrylic and has additional acrylic strips fixed to the edges for additional strength. A LM35 temperature sensor is wired to the front that monitors the environments that the rover explores. An HC-SR04 Ultrasonic Rangefinder acts as the eyes of the machine. The photodiode is covered with an adaptation of a 6mm heat shrink tube to avoid false readings. Once hooked up and turned on, the robot can be controlled with the futuristic power glove consisting of two parts. An accelerometer strap and a display strap are the biggest parts. The project shows that it is relatively easy to make a system like this. Other items like quadcopters and tiny water boats could be controlled with a similar type of setup.
A video of the axis glove maneuvering the vehicle on a slope can be seen after the break:
Continue reading “Axis Glove That Controls a Robot”