Hello world! This is a toot from an #esp32 again!
Hello world! This is a toot from an #esp32 again!
It's a great day when trying to make some code/transfer optimization you end up fixing bugs you don't know you had, make memory usage divide by two and doing the transfer optimization that was planned.
Ok everything is around the same buffer and it's usage with the hardware but still.
I can advance on other parts now.
Hello world! This is a toot from an #esp32
Porting EspStackTraceDecoder to python because that's far preferable (to me
Boosting #ESP32 - C3 SuperMini #WiFi: A Simple and Effective #Antenna Mod
-> https://peterneufeld.wordpress.com/2025/03/04/esp32-c3-supermini-antenna-modification/
#diy #electronics #knowhow #tutorial #knowledge
Now in stock on Lectronz: ESP32 Data Logger w/RTC & SD https://lectronz.com/products/esp32-data-logger
#ESP32 #I2C #Sensors
I'm looking for a way to toot pictures from an #esp32. (To be more precise: an esp32-cam.)
The only library I found hasn´t been updated for a couple of years and doesn´t work with pictures.
Writing a library myself is too complicated, so what to do now...?
Soil Nutrient Monitoring System Using NPK Sensors Based on Wireless Sensor Network (WSN) and IOT
ESP32 eBooks
https://bokfive.com/esp32
For more follow @bokfive
Ever needed to tri-state an #esphome GPIO?
HIGH and LOW not enough for your projects?
Need a bit of high-Z or dual-use the pin as Input?
Here's my solution:
Simple Antenna Makes for Better ESP32-C3 WiFi - We’ve seen tons of projects lately using the ESP32-C3, and for good reason. The mi... - https://hackaday.com/2025/04/07/simple-antenna-makes-for-better-esp32-c3-wifi/ #wirelesshacks #esp32-c3 #antenna #ca-c03 #rssi #wifi
ESP32-A1S Audio Kit
I’ve had this “audio development kit” based on the ESP32-A1S for some time, but haven’t actually done anything with it so far.
But I had a query about adding MIDI so dug it out for a quick look. It turns out it isn’t actually as easy as it ought to be!
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to microcontrollers, see the Getting Started pages.
ESP32-A1S Audio DevKit
The ESP32-A1S is a curious beast. As far as I can see it is a system-on-module from “AI Thinker” that combines an ESP32 (the original one) with an audio codec. Originally it supported the AC101 but more recent devices now support the ES8388 as I understand things.
Many of the provided IO pins come directly from the ESP32 itself, but there are several others that come from the built-in codec section.
From the module’s specification:
There is information about these modules and the dev boards that use them, but it is a bit distributed and not always obvious which version of the boards are being discussed.
These are the main references I’ve found so far for the ESP-A1S itself:
And for the “AI thinker” ESP-A1S Audio Dev kit that is commonly available:
This is designed for use with the Espressif Audio Development Framework – https://github.com/espressif/esp-adf – (not to be confused with the original IDF) but I’ve not spent any time looking into how to use it at the moment.
But here are some references for using the ADF for when I get that far:
As I find out odds and ends about this board, I’ll start adding them here.
Audio Kit GPIO Breakout
The first thing I had a look at was the GPIO header at the top of the board that seemed quite useful for adding extra circuits (particularly MIDI).
There are two GND and 3V3 pins, TX0 and RX0, and then the following IO pins: IO0, IO5, IO18, IO19, IO21, IO22, IO23. Finally a RST pin.
Unfortunately there are a number of limitations with the use of these pins:
I must admit that considering the number of IO pins on an ESP32, and maybe a few less broken out on the ESP32-A1S, but still plenty, it seems an odd choice to provide an IO breakout with so many of the pins already assigned to a function on the board…
As RX0/TX0 map onto the USB comms port, it is quite useful to be able to use alternative IO pins for serial MIDI if required.
The technique described in my ESP32 Simple MIDI Monitor appears to work fine here for configuring Serial2 for MIDI, although as previously mentioned, only IO22 is actually not used for anything else. In this example, I’ve configured GPIO22 for RX and a dummy (GPIO20) for TX.
#include <MIDI.h>
MIDI_CREATE_INSTANCE(HardwareSerial, Serial2, MIDI);
void setup() {
MIDI.begin(MIDI_CHANNEL);
Serial2.begin(31250, SERIAL_8N1, 22,20);
}
Closing Thoughts
To be continued…
Kevin
I'm having a look at an ESP32-A1S audio kit that is widely available.
There is what looks like a handy GPIO breakout on the board.
Until you realise that 4 of the pins are pulled high for use with the buttons; 1 is a strapping pin and has to be left floating to use the built-in audio codec; 1is the shutdown pin for the amplifier; and 2 are the USB RX/TX link so their use is limited too.
So from the 9 IO pins broken out, only one is (as far as I can see) actually free to use!
#ESP32-A1S
New on Lectronz: LILKA assembly kit: DIY console created in Ukraine https://lectronz.com/products/lilka-assembly-kit-diy-console-created-in-ukraine by @autkin
#ESP32 #Gaming #Retrocomputing
Using a Cheap 5V MIDI Interface at 3V3
I had a query about using one of the common Arduino MIDI Shields with an ESP32 and when I looked into it, this is where I got to.
Warning! I strongly recommend using old or second hand equipment for your experiments. I am not responsible for any damage to expensive instruments!
If you are new to Arduino, see the Getting Started pages.
Parts list
Arduino MIDI Shield
These shields are available very cheaply and designed to plug directly onto an Arduino Uno. They are a variation of an original Olimex open source design (details here) but details of the specifics of this shield seem pretty sparse. But it isn’t too complex to figure out.
Essentially it is a 6N139-based 5V MIDI IN circuit and a non-buffered 5V MIDI OUT and THRU. The boards include a switch to cut off RX from MIDI to allow for sketch uploading. There is often a footprint for a button for RESET which may or may not be populated, and there is a block of breakout connectors for all the Arduino’s IO pins.
I did eventually happen upon an uncredited schematic in a random online cloud service file storage, so I’ve copied it over here.
And mapping this over to the board itself I found this PCB diagram. Note this has a URL for “soliddigi” on it, but that doesn’t seem to exist (or do anything) that I could see.
But whilst on the topic of this board, we can map out the IO pin breakouts for future reference too by simply examining the underside of the board:
From this we can see the following pinouts for the board.
Anyway, back to MIDI…
Converting MIDI IN
The output (to the Arduino) from the MIDI IN circuit of this board is a UART RX connection pulled high to 5V. The easiest way to drop that to 3V3 for use with a 3V3 logic system is to use a resistor divider as shown below.
The MIDI shield will still need to be powered by 5V but the output from the RX pin will now be dropped by the ratio 33K/(22K+33K) which is approximately 0.6. So 5V x 0.6 = 3V.
The choice of resistor for this specific application is relatively arbitrary as it is the ratio that is important, but it should be remembered that this is connecting both the optoisolator’s output (RX) and the microcontrollers IO pin (GP19 above) to GND so there will be limits on the amount of current that can be sourced from the two IO pins and that can be sunk into GND.
Converting MIDI OUT
Converting MIDI OUT isn’t quite so easy unfortunately. If the MIDI interface had included a buffer, like the 74HCT14 I’ve used in the past, then no conversion would be necessary – a 3V3 logic signal can drive that directly and the output would be a 5V signal to the rest of the MIDI circuit.
But it doesn’t – it is a directly connected 5V-expecting MIDI OUT circuit involving two 220Ω resistors. If this is driven from a 3V3 level then it is unlikely that there would be enough current to drive the optoisolator at the other end of the MIDI link.
The basic calculation goes as follows (see my MIDI Connections Cheat Sheet for details of the circuits) – this assumes one 220Ω resistor on the receiving side and two on the sending side as per the MIDI spec, and a typical 1.7V drop across the optoisolator.
For 5V operation, from Ohm’s law: Current = (5 – 1.7) / (220+220+200) = 5mA
For 3V3 operation: Current = (3.3 – 1.7) / (220+220+200) = 2mA
This is why the MIDI spec recommends 10Ω and 30Ω resistors for a 3V3 logic OUT circuit:
For proper 3V3 operation: Current = (3.3 – 1.7) / (220+30+10) = 6mA
Really, the easiest method, assuming the MIDI connectors/hardware are required to be used “as is” would be to include a 74HCT14 (the HCT variant, not the HC version) as a buffer by passing the 3V3 signal through two of the inverters.
But at this point, as this is just a couple of resistors, I’d probably look to remove the two 220Ω resistors in the OUTPUT circuit and attempt to patch in a 10Ω and 30Ω instead with the 30Ω pulling up to 3V3 rather than 5V.
Patching the Shield
Given all the above, I believe it is possible to patch this shield to support 3V3 logic operation by performing the following:
WARNING: All of this is theoretical. I’ve not actually done it myself.
Step 1: Remove R3, R4, cut RX track.
Step 2: Add resistors.
Note: I don’t believe that anything has to be done to the THRU as it is taken directly off the RX side of the 6N139, so that will continue to work (as I understand things) off the 5V circuit directly.
Closing Thoughts
Given the number of off-the-shelf 3V3 MIDI boards now available, I suspect in most cases acquiring one directly would be the better option to the above.
But having said that, these boards are available so cheaply and widely that it is worth considering. Also, there are 3V3 logic level boards in Uno form factor, so having a 3V3 version of the shield would be useful in any case.
But I repeat, other than testing the resistor divider on RX, I’ve not tested any of the modifications to the board itself. Do let me know if you’re brave enough to give it a go
At some point I might make my own 3V3 Uno format shield PCB…
Kevin
Im using espnow protocol to link sensors to a pure data patch #esp32 #espnow #puredata #uidesign #design #arduinoide #interface #interfacedesign
Revisiting my Duppa LED Rings this time using Waveshare Zero format devices to support USB MIDI CC controllers.
https://diyelectromusic.com/2025/04/06/duppa-i2c-midi-controller-part-4/
My #ESPHome setup for the #mmWave presence sensor is ready!
As config took some digging, here’s my setup: