Skip to content

gojimmypi/IoT_BBQ

Repository files navigation

IoT BBQ

Project for Making Embedded Systems class.

See Assignments

The Imaginary Embedded System that does not exist for the Making Embedded Systems class is the Barbeque Grill monitoring system project started (and abandoned) 5 years ago as noted below that was intially tinkered with using an ESP8266 an the LUA language, but never completed.

The IoT_BBQ system is a monitoring device to primarily measure the weight of the propane tank to ensure that when it is time to cook, that the fuel supply is not nearly empty. Having an electronic scale monitoring the weight is much more precise, accurate, and convenient as compared to the mechanical spring scales. A custom solution is also needed as the amount of available physical space is so limited, that even a bathroom scale is not practical for both size and viewing angle.

A premium version of this system will also include internal grill box temperature, as well as various atmospheric sensors, such as ambient temperature and pressure.

Some sort of information display will be needed: either a local LCD panel and/or a web interface.

Components needed include:

Yes, the ST USB Driver needs to be installed manually.

Diagram:

image

Weight Sensor

The HX711 weight sensor is powered with +3.3V and conencted to Arduino Header Pins D8 (ARD.D8 == GPIO_PIN_8 == PB2) and D9 (GPIO_PIN_9) located at CN1 pins 1 and 2, as shown on page 50 of the B-L475E-IOT01A (UM2153) User manual

HX711_arduino_header_connection

Display

The SSD1306 display is connected to I2C SCL/D15 (GPIO_PIN_15) and SDA/D14 (GPIO_PIN_14) located at CN1 pins 9 and 10, as shown on page 50 of the B-L475E-IOT01A (UM2153) User manual

SSD1306_arduino_header_connection

B-L475E-IOT01A Connections

HX711

  • PD_SCK = GPIO_PIN_2; // ARD.D8 = PB2 0x0004
  • DOUT = GPIO_PIN_15; // ARD.D9 = PA15 0x8000

GPIO_init; old HX711

  • GPIOB GPIO_PIN_8
  • GPIOB GPIO_PIN_9

HAL_TIM_MspPostInit

  • GPIOA / GPIO_PIN_0

LED

  • GPIOA GPIO_PIN_5;
  • GPIOB GPIO_PIN_14;

SSD1306

  • DC GPIOB GPIO_PIN_14
  • Reset GPIOA GPIO_PIN_8

Button

  • GPIOC, GPIO_PIN_13 (interrupt)

pwm_MX_GPIO_Init

  • GPIOA GPIO_PIN_8

ConfigureI2CPins

  • GPIOC GPIO_PIN_0
  • GPIOC GPIO_PIN_1

Pressure, Humidity, Temperature Sensors I2C. See line 364 of stm32l475e_iot01.c:

  • SCL = GPIOB GPIO_PIN_10
  • SDA = GPIOB GPIO_PIN_11

CN1

See Table 4 ARDUINO® connector pinout on page 31 of the B-L475E-IOT01A (UM2153) User manual:

CN1_connections.png

Additional Resources

See also:

Mechanical

Electronics

Development

Example Code

Coding Reference

My original README follows:

IoT_BBQ

ESP8266 Based Grill Temperature and Propane Tank Weight Project

First you need a NodeMCU ESP8266 like this one:

http://www.ebay.com/itm/400999083640

Note it has a CH340G USB chip, so works well with Windows 10

Windows Device Manager

Next, download flasher from https://github.com/nodemcu/nodemcu-flasher

In the \Resources\Binaries directory, there are Lua firmware images (one support floats, the other only ints)

config setting

Once you've uploaded the image, this tool can be helpful for getting Lua code onto your device:

http://benlo.com/esp8266/

You can read more about NodeLUA here: https://nodelua.org/

Next, you will need a MAX6675 Module + K Type Thermocouple Temperature Sensor like this one:

http://www.ebay.com/itm/400798924042

see this respository for spec sheet on MAX6675, or visit

https://datasheets.maximintegrated.com/

Note that for connection to the ESP8266, you'll need to pull CS down to ground with a 10k resistor so the ESP8266 will boot.

I soldered a resistor on the board between those pins.

soldered resistor

Connect your thermocouple to the ESP8266 (see pics for pinout)

board wiring

Once everything is connected, setup ESP8266 to connect to WiFi.

wifi.setmode(wifi.STATION)
wifi.sta.config("yourWiFiName","yourWifFiPassword")
wifi.sta.connect()

Consider security issues of hard coding password. You can configure once & ESP8266 will remember after reboot.

Next, find your device on the local network segment. For this, I use fing:

https://play.google.com/store/apps/details?id=com.overlook.android.fing&hl=en

fing

Once you find the device, click on it, and scan for open ports. You should have port 80 open:

fing scan

If you found the ESP8266 on your network, upload the thermocouple.lua file:

thermocouple.lua upload

If everything is working, you'll see the temperature on your phone! (temperature shown in Celsius)

webpage sample

Load the file in init.lua to maintain web server operations after a reboot. I found that it is best to delete the init.lua file, reboot, then load a fresh init.lua when making changes. Again, fing is handy for detecting port 80 being open or not.

Next weekend, I will work on adding the weight sensor. I used one like this:

20KG Scale Load Cell Weight Weighing Sensor +HX711 Weighing Sensors AD Module

http://www.ebay.com/itm/281916193412

feedback, comments, suggestions? contact me at gmail or twitter.

About

Temperature and Propane Tank Weight Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published