ESP32 LoRa sensor monitoring with web server (Long Range Communication)

Rui Santos posted detailed instructions of how to build an ESP32 LoRa sensor monitoring with web server:

In this project, you’ll build a sensor monitoring system using a TTGO LoRa32 SX1276 OLED board that sends temperature, humidity and pressure readings via LoRa radio to an ESP32 LoRa receiver. The receiver displays the latest sensor readings on a web server.

Check out the video after the break.

Project info at randomnerdtutorials.com.

JTAG debugging the ESP32 with FT2232 and OpenOCD

Erich Styger has written an article on how to use an inexpensive FTDI evaluation board as JTAG debug interface to debug ESP32 based devices:

In “Eclipse JTAG Debugging the ESP32 with a SEGGER J-Link” I used a SEGGER J-Link to debug an ESP32 device with JTAG. I looked at using one of the FTDI FT2232HL development boards which are supported by OpenOCD. The FT2232HL is dual high-speed USB to UART/FIFO device, and similar FTDI devices are used on many boards as UART to USB converters. With OpenOCD these devices can be turned into inexpensive JTAG debug probes. This article shows how to use a $10 FTDI board as JTAG interface to program and debug the Espressif ESP32.

More details on MCU on Eclipse blog.

A self-expanding ESP32 PWM board

Eric Gunnerson writes:

I’ve been working on a little ESP32 expansion board/shield for an LED project I’ve been working on. One of the nice things about the ESP32 is that it has a peripheral known as “LED control” that provides 16 independent channels of PWM for controlling LED brightness, and my project uses that capability.
One of my projects is going to require all 16 channels, so I wanted to do a board that would support 16 channels, but I also wanted a version of the board that would only support 8 channels.

Project info at Eric’s Arcana and RiderX site. It’s also up on Tindie.

Check out the video after the break.

Building and Flashing ESP32 applications with Eclipse

entries

Erich Styger shared the steps how to use Eclipse with CMake:

The current Espressif documentation integrating with Eclipse are kind of broken and did not work for me (they are changing from make files to use CMake).  The good news is that I have found a way to easily integrate the IDF with Eclipse which is documented below. Because I’m using the ESP32 in combination with the NXP Kinetis and SDK, it makes sense to have everything in the MCUXpresso IDE (I’m using the Version 11.0.0).

See the full post on MCU on Eclipse blog.

Open source hardware ESP32-ADF

esp32-adf

Here’s an open source hardware development board for Espressif audio development framework, the ESP32-ADF, from Olimex:

With ESP32-WROOM-B module with 8MB RAM and 4MB of Flash, two microphones, two 3W speakers, codec, amplifier, Lipo charger, USB with programming, Audio 3.5mm jack, ESP32-ADF board offers everything you need to start playing with Espressif Audio Development Framework.

Check out the video after the break.

ESP32 (38) – Factory reset

In the previous two posts of this tutorial, I explained how to perform an over-the-air update of the firmware running on the esp32 chip.

Sometimes you may need to revert to the factory firmware, that is the firmware stored in the flash memory when the chip was programmed. Many consumer devices have a button or a pin that, if you press it for some seconds, triggers a reset function:

A10317_image1

In this post I’ll show you how to add this functionality to your project.

Partitions

As explained in a previous post, the flash memory connected to the esp32 chip is divided into some partitions, based on a layout configured when you program the chip.

Partitions that can store firmwares are of the app type. The partition that contains the firmware programmed via USB, has the factory subtype.

The esp-idf framework includes a method to search partitions in the flash memory:

#include "esp_partition.h"
[...]
esp_partition_iterator_t esp_partition_find(
  esp_partition_type_t type, esp_partition_subtype_t subtype, const char* label);

You can specify some filters to narrow down the results (they are not mandatory, use NULL if a filter is not needed): the type of the partition, the subtype and also a specific label.

If you want to look for the partition that contains the factory firmware, you can therefore write:

esp_partition_iterator_t pi = esp_partition_find(
  ESP_PARTITION_TYPE_APP, ESP_PARTITION_SUBTYPE_APP_FACTORY, NULL);

The method returns a partition iterator, that is an object that allows to scroll through the partitions found.

If the search was successful, this object is not NULL and you can get a pointer to the partition with the method:

const esp_partition_t* esp_partition_get(esp_partition_iterator_t iterator);

After the use, it’s important to release the iterator object with:

void esp_partition_iterator_release(esp_partition_iterator_t iterator);

After having obtained the correct partition, that contains the factory firmware, you only have to flag it as the boot partition and restart the chip:

if(pi != NULL) {
  const esp_partition_t* factory = esp_partition_get(pi);
  esp_partition_iterator_release(pi);
  if(esp_ota_set_boot_partition(factory) == ESP_OK) esp_restart();	
}

Demo

In the following video you can see how to perform a factory reset. In the video you can also learn how to “count” the number of seconds a button is pressed to trigger the reset function only after a fixed threshold (3 seconds in my example). Enjoy!

Polar Coaster drawing machine

20181219_213454-600

Barton Dring designed and built a Polar Coaster drawing machine to draw custom, round drink coasters:

I recently decided to update the Polar Coaster project. The primary reason was to update the controller to use Grbl_ESP32 firmware. I also thought I could make it smaller, lighter and remove a little cost.
The old controller was not custom made and just sort of tacked onto the back. This increased the size and didn’t look very good. It had a Bluetooth module, but you still had to stream the gcode. You could use an Android app, but that was still a little awkward.
The controller runs Grbl_ESP32. This was recently updated to include pen machine features. This allows precise control and calibration of the pen servo. You can control the speed, timing and endpoints of the servo travel.

Project info at Buildlog.Net blog.

Check out the video after the break.https://www.youtube.com/watch?v=7_aS0PbP8HY

New 2.5D pen/laser ESP32 controller

20181128_204306

Bdring published a new build:

I have done several pen and laser machines lately, so I decided to create a custom PCB for Grbl_ESP32 for these types of machines. This is a small (70mm x 60mm) PCB with all the features a pen plotter or laser cutter/engraver would need.
These typically use stepper motors for the X and Y axes. On pen plotters, the Z axis is controlled by a servo or solenoid. On lasers you need an accurate PWM for laser power control.

Project info at Buildlog.Net blog and the library GitHub repository here. It’s also up on Tindie.