Fall 2015 IoT / Battery-Operated Wireless Smart Sensors Discussions

Battery-operated wireless smart sensors (BOWSS) are one small facet of the general (buzzword) topic of the Internet of Things. On Tuesday and Wednesday afternoons from 2:30 until (4:30 or done), M5 will host discussions on various aspects of BOWSS in the Pi room.

2015-09-15 Tuesday
  • We introduced the concepts of serial communications, baud rate, and TTL (transistor-transistor logic) signaling. Most microcontrollers have a built-in serial TTL communications capability.
  • We identified the HC-05 and HC-06 as inexpensive devices that can convert a 3.3V TTL data stream to Bluetooth communications. We have not yet addressed the common issue of converting levels from 3.3V to the 5V that many older Arduino-style devices use.
2015-09-16 Wednesday
  • We discussed the nature of the IoT.
  • We introduced the constraints of battery operation, in terms both of battery power capacity (milliamp hours or mAH) and of peak power consumption.

While the concepts introduced in this discussion will be broadly applicable to many microcontrollers, the examples and the workshops will focus on the context of the ATmega328P microcontroller and generally the Arduino-style IDE. Most participants have their own Arduinos, and the others have access to M5’s Sparkfun Inventor’s Kits.

2015-09-22 Tuesday
  • We discussed the Hayes AT command set
    • Command mode, data mode
    • Escape sequence +++
    • Uses: Hayes SmartModem (1981); HC-05, HC-06; XBee; ESP8266
  • We introduced various ways sensors communicate with other devices
    • on-off
    • voltage level
    • serial over RS-232, I2C, SPI
2015-09-23 Wednesday
  • We began discussing Arduinos as the typical platform for the microcontroller element of smart sensor nodes.
  • We loaded the Arduino IDE and began working with Arduinos as the basis of our own smart sensor nodes.
2015-09-29 Tuesday
  • We talked about networks in general in the context of the ISO/OSI 7-layer protocol stack. We discussed point-to-point, multicast, and broadcast communications in local-area networks. We talked about packet routing and non-routable and broadcast subnet addresses.
  • We discussed serial communications over wires and over radio. We set up COM ports for Bluetooth connections and demonstrated the connections across two computers.
  • Wires, Bluetooth, ESP8266, XBee, and other radios can all function more or less equivalently for the physical layer
  • We walked through a simple Python script which connected, reconnected, maintained, and used the data from a Bluetooth serial connection, and discussed the slowness of restarting a disconnected Bluetooth link.
2015-09-30 Wednesday
  • We assembled some test circuitry using small shunt resistors and oscilloscopes, and  measured current and thus power consumption of various devices, beginning with the bluetooth radios and then sleeping and running Arduinos. We measured the power consumption by measuring the voltage drop across a shunt resistor and calculated current through the shunt and then power consumed by the whole circuit. We tried measuring differential voltage using the oscilloscope’s two channels (grounded only together) and the Math function to display the difference. With the channels grounded only to each other, we got much noise in the readings, and even in the difference readings. We then connected the grounds to the circuit. We were still unable to configure the display as we needed, and went back to single-channel readings.
  • We tested several circuit configurations:
    • board only, without microprocessor, to see power consumed by the indicator LED
    • board with microprocessor but pin13 LED off
    • board with microprocessor and pin13 LED on
  • We began setting up a spreadsheet with which to analyze our raw data, hoping thereby to minimize the plague of calculation errors we were making.
2015-10-06 Tuesday
  • Nobody showed up, so I finished my design for a a printed-circuit board to adapt the standard 8-pin (3.3V) ESP8266 module to an Arduino at 5V.
2015-10-07 Wednesday
  • We discussed the setup of a spreadsheet to analyze our data.
  • We looked at the spec sheet, for the ATmega328 and analyzed the digital IO circuitry to see if there was cause to suspect that an output pin’s circuitry might consume more power if the pin is set to LOW rather than to HIGH. We discussed the unidirectional and bidirectional tri-state buffers, the pull-up disable bit, the direction registers, and the sleep bit.
2015-10-14 Wednesday – SPECIAL TOPIC
  • We will discuss the analysis of sensor data for normality. I recently received a batch of 10 sensors and the first one I tested looked funny. I did a histogram of the measured values and found that the values were skipping around – temperature jumping 2 or 3 degrees and never visiting the intermediate readings.
  • We will discuss how we should handle new sensors especially from a cheap (suspect!) source.
2015-10-20 Tuesday
  • Chuck has been playing! He has an ESP8266 in his basement sending data up to the Phant server at Sparkfun. We’ll discuss how that works, from several perspectives, including
    • Flashing the ESP8266 for NodeMCU / Lua programming
    • Setting up and using the Arduino IDE with the ESP8266
    • The Phant server at Sparkfun
    • Using HTTP GET and POST transactions to send data to (in particular) the Phant server
2015-10-21 Wednesday
  • We’re about ready to look at the capabilities of the ESP8266 to run on batteries. There’s a timed sleep mode and a pin sleep mode surfaced in the Lua environment, and Chuck will be looking into them to discuss Wednesday. He will be trying to find the equivalent capabilities within the Arduino IDE, and will talk about these as well.
2015-10-27 Tuesday
  • We will be having some lightning talks from participants in ECE297DP.
  • We will be discussing networks of sensors and ways for consumers to receive the readings from the sensors. MQTT (see links below) is an emerging standard which we will investigate as a solution to this need.
2015-10-28 Wednesday
  • We will be having some lightning talks from participants in ECE297DP.
  • Chuck is working hard on building a tiny, inexpensive sensor-publisher device using an ESP8266/ESP-01, a MQ80B20 digital temperature sensor, and a couple AA batteries. We’ll discuss his success, or at least his progress.
2015-11-03 Tuesday
  • Chuck has finished some prototype BOWSS systems. He has an ESP8266 in an ESP-01 form factor operating on batteries and measuring the outside temperature at his house, sending it up to a Sparkfun Phant server at https://data.sparkfun.com/streams/jqrXbAZ2Yws4WV3zArzz/. The hardware is very simple, comprising just a battery pack, voltage regulator, ESP-01, and DS18B20 one-wire digital temperature sensor, with no Arduino involved at all. He has replicated the system using an Adafruit Huzzah and again using a knock-off NodeMCU, each of which has many more IO pins exposed.
2015-11-04 Wednesday
  • I now have a uCurrent Gold micro-current to voltage converter that I bought from David Jones (if you don’t know about EEVblog, look it up online). With it, we will be measuring the current requirements of the various ESP8266 configurations and during sleep, processing, and transmission.

Notes and Links

2 thoughts on “Fall 2015 IoT / Battery-Operated Wireless Smart Sensors Discussions

Leave a Reply

Your email address will not be published. Required fields are marked *