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:
- Controller board
- Power Supply
- Load cell (weight sensor) such as the SparkFun HX711 with this sample Arduino Library. See also non-arduino , and ST forum
- Temperature sensor
- Other atmospheric sensors
- Enclosure
- Mounting hardware
Yes, the ST USB Driver needs to be installed manually.
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
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
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
See Table 4 ARDUINO® connector pinout on page 31 of the B-L475E-IOT01A (UM2153) User manual:
See also:
- Statasys Grabcad Community Propane Tank
- STM32 Discovery Kits
- ST-LINK, ST-LINK/V2, ST-LINK/V2-1, STLINK-V3 USB driver signed for Windows7, Windows8, Windows10
- ARM MBED DISCO-L475VG-IOT01A (B-L475E-IOT01A (this is where the link on the OTG file points)
- Mouser B-L475E-IOT01A Data Brief
- Mouser Discovery Kit for IoT Node (this is the front and back of the insert card in for the shipped product)
- Mouser STMicroelectronics B-L475E-IOT01A Discovery Kit for IoT Node
- STM32Cube MCU Package for STM32L4 series and STM32L4 Plus series (HAL, Low-Layer APIs and CMSIS, USB, TouchSensing, File system, RTOS)
- VisualGDB Developing STM32 projects with Visual Studio tutorial
- STM32L4 Discovery kit IoT node software
- STM32L4 series of ultra-low-power MCUs
- The FreeRTOS™ Reference Manual
-
Microchip AVR035: Efficient C Coding for AVR
My original README follows:
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
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)
Once you've uploaded the image, this tool can be helpful for getting Lua code onto your device:
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.
Connect your thermocouple to the ESP8266 (see pics for pinout)
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
Once you find the device, click on it, and scan for open ports. You should have port 80 open:
If you found the ESP8266 on your network, upload the thermocouple.lua file:
If everything is working, you'll see the temperature on your phone! (temperature shown in Celsius)
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.