Replies: 11 comments 15 replies
-
|
Fantastically helpful information - thanks!! Quick recap of my response on the other forum:
Following the instructions here I tried these:
A difference I noticed between the micropython instruction using esptool and the mp-image... instruction is that the former specifies a base address of zero. I've now run out of time to explore more today, so I'll get back to this some time later. And this is the most amazing piece of software - you've created something wonderful! |
Beta Was this translation helpful? Give feedback.
-
That is great news! Excellent, that makes configuring easy.
Is this the message? This would indicate that MicroPython is running ok, but the partition with the file system is corrupt, as it may well be after resizing the flash memory with the mp-image... tool. Now reboot the microcontroller, for example pressing control-D or pressing the RST button. The VfsLfs2 command should have reformatted the file system. To check MicroPython now sees the 16MB of memory, enter the following at the REPL prompt: The output should be Did that work? Thank you very much for the nice comments. Let's get your organ working now, to justify those nice comments :-) good luck! |
Beta Was this translation helpful? Give feedback.
-
|
Great! I read the attached text file, everything seems ok!
That's probably because Thonny is already connected to the board. To use mpremote, you need to stop Thonny. While the board is in boot mode, it usually has another port, so mpremote can now see the board.
The IP address is probably dynamic, i.e. assigned by the router. Normally, home routers always assign the same IP address to the same board, based on the MAC address of the board, so it behaves like a static address. I found that handy, because on older Android phones the name (i.e. "organ.local") does not work in the browser, but the IP address always work (i.e. http://192.168.100.57/ or whatever). You can see the assigned IP address in the startup log or with "System" button. |
Beta Was this translation helpful? Give feedback.
-
|
Hi again. I'm ready to try a bench-test of ESP32-S3 midi out to Orgautomatech decoder board. Can I just check with you to make sure I'm doing the right things?
Is there anything else to connect between ESP and Board? I have a test setup with the board driving valves, MIDI output from Raspberry Pi 5 via a USB to MIDI serial converter. And I've created a test file in Cakewalk (Windows PC, not Pi) to test the valves individually and together, so I'm feeling quite pleased that it's time to bring the ESP into play.
|
Beta Was this translation helpful? Give feedback.
-
|
Hello,
MIDI is activated by current, not by voltage. The receiving circuit is a optocoupler. The current to the optocoupler has to be limited. Connecting the ESP32 GPIO directly could draw too much current. These are the official specs for MIDI: https://midi.org/5-pin-din-electrical-specs The connection should be (according to the standard): graph LR;
GPIO10-->Ra[33Ohm]-->DIN4
GND --> Rc[10Ohm] --> DIN5
According to the calculation in the standard, the current that the ESP32 would have to source is about 5mA, which well within the capabilities of the ESP32. The polarity is important. I believe this should also work: graph LR;
GPIO10-->R[47Ohm]-->DIN4
GND --> DIN5
Unfortunately I have no Organautomatech board, and can't test this.
Yes, that's the same model I am using. 100p should work perfectly well. You have to set that value in the "General configuration" page. Both output A and B of the sensor should be connected. On the "Pin and MIDI configuration" page you need to specify the two pins.
Looks nice!! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
I think that circuit would work, but the signal would have to be inverted (can be done in MicroPython). In the meantime, I finally could spend some time setting up a MIDI over serial connection successfully. I have connected a sound synthesizer via MIDI to the ESP32-S3. It took me some time to make it work, but finally sound came out of the synthesizer and no components were burnt in the process :-) Here are the details: https://github.com/bixb922/umidiparser/blob/master/midi_over_serial/midi_over_serial.md I'd be very happy to get some feedback. |
Beta Was this translation helpful? Give feedback.
-
Oh yes, that was fun. I was far too eager to see how it works, very suddenly the crank organ went from "I can make one flute sound" to "there is music coming out of the thing"!! But I should have been much more careful with the pipes. Although the crank organ sounds well, I am considering to building the pipes again to have a similar intonation for all.
I'm sorry. In the section titled tinkering just I tried to document some things I tested.
Yes, I think that is correct. I had many gripes with the pin numbering. There are so many diagrams on internet that are plain wrong. I included some links in the documentation with correct plug numberings. The numbering on your diagram seems to be the solder side of a male plug, right? It's ok to use a male plug, that one will go directly into the MIDI IN of the board. In any case, if you reverse pins 4 and 5 by accident, nothing bad will happen neither to the Organautomatech board nor to the ESP32-S3.
Thank you very much!! That certainly was an error and part of my confusion. I have now updated the document and I sincerely hope that I got it right!
Me too. And I still have to look thrice and am still unsure if I got pin numbering right!!! I started testing with a wrong pin numbering diagram on internet, and it took me many hours to make the circuit work. Finally I got lucky reversing the pins 4 and 5... Good luck! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I am sorry about that. That's due to an old version of 64_note_midi_over_serial.json, that does not match the software and had no "pin numbers". Please get the current version with The "General Configuration" will not be overwritten (i.e. WiFi configuration will be preserved). Use the "Pinout and MIDI definition" page to select "64 notes MIDI over serial data" again and press "Save scale", because the install_data will reset that definition. When you load the "Pinout and MIDI definition" page you should see:
The Organautomatech manual says "When it receives a note on the right channel but out of range (too low or too high) the red LED flashes." I agree that most probably the channel number does not match. The "64 notes MIDI over serial data" definition that was provided uses channel 1. You now should be able to define other channels on the "Pinout and MIDI configuration" page, reset the microcontroller and check. However, the if the note is out of range, then I don't know what's wrong. The "64 notes MIDI over serial" should match the factory note definition of the Organautomatech board. With the definition provided, the software sends all MIDI notes in the MIDI file (regardless of the original channel number in the file) of the range MIDI number 48 (C3) to MIDI number 111 (Eb8) to the Organautomatech board, changing the original channel to the channel set in the "Pinout and MIDI" definition. A test that you can make is enter the "Tuner" page and press "Play scale" and/or "Test all pins". "Play scale" will send all MIDI notes 48 to 111 to the board, on the defined channel. That should at least move some solenoids. It will play the scale up and down several times at increasing speed. "Test all pins" will do exactly the same thing, but it operates at a more physical level, the result should be the same in this case. As an additional test, this short program plays middle A (440Hz) on all channels. Save that to a file, say from machine import UART
from time import sleep
uart = UART( 1, baudrate=31250, tx=10, rx=9)
for channel in range(16):
print("Now playing A 440 MIDI 69 on channel", channel+1)
uart.write( bytes( [0x90+channel, 69, 127] ))
sleep(1)
uart.write( bytes( [0x80+channel, 69, 0] ))
sleep(1)I hope this helps. Good luck! |
Beta Was this translation helpful? Give feedback.







Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm answering a post from another forum here:
Very interesting! I have only used a Windows PC and now a Mac, and I think using a Raspberry Pi 5 as a PC is amazing! Great you worked that out!!
The log shows that the microcontroller is connecting alternately to a router or hotspot called
wifi_SSID_2andwifi_SSID_1. Status 201 means "No access point found". These are the default names.I checked again today. I installed the software on a "fresh" ESP32-S3. Then I selected the option to see all available WiFi networks on my cell phone and on my PC. On the list of available WiFi networks I can see
esp32s3, can you see that too? This WiFi network is published only for about 2 minutes after reboot and goes away if nobody connects to save energy. You can connect with a cell phone or a PC, and will be asked the standard password which currently ispassword. This way to connect is provided mainly for initial configuration.The drivers are installed together with MicroPython. If they were not, you would get message that the
networkmodule is not available. To check the Wifi, please usempremoteto get the REPL prompt, i.e. the>>>prompt. You are now connected to MicroPython and can enter Python statements. Enter the following:You should get a list of available WiFi networks where the microcontroller can connect.
Yes, 8Mb will work also, but with less capacity for tunes. With the latest version of the
mp-image-tool-esp32things are easier. This is what I did this today to convert the MicroPython image to 16 Mb capacity: At the command prompt (in your case, on the Raspberry Pi 5), install the mp-image-tool-esp32 utility:Now you should put the ESP32-S3 in firmware update mode, i.e:
Now you can convert a MicroPython .bin image and load it to the board in one go, what worked on my Mac is:
The .bin file is the latest release of MicroPython, downloaded from their site.
-f 16Mmeans "set flash size to 16M", and "--resize vfs=0" resizes the file system.--flashdoes the same job asesptool.pyand sends the image without any further step to the ESP32-S3./dev/cu.usbmodem14201is the USB serial port on my Mac where the ESP32-S3 is connected, you have to substitute with the port on your Raspberry Pi.I wasn't aware of this latest version of the
mp-image-tool-esp32. It has improved a lot, there are lots of options now.esptool.pyisn't needed anymore, and it even does somempremotecommands.Connecting to the
esp32s3allows to configure the WiFi network properly, inserting the names of your home WLAN. You also could do this to configure the WiFi on the Microcontroller:mpremote cp :/data/config.json ./vior some text editor of your choosing and set the values ofaccess_point1,password1,access_point2andpassword2to your home WLAN and cell phone hotspot respectively,mpremote cp config.json :/dataBest regards, hope this helps one step further. Please post how it goes.
Beta Was this translation helpful? Give feedback.
All reactions