TK. Posted December 12, 2019 Report Share Posted December 12, 2019 Winter time is DIY time - and this year I decided to explore the capabilities of the ESP32 platform. There might be synergies with MIOS32, but I'm very sure that I won't fully integrate this Microcontroller into the MIOS32 ecosystem --- this hasn't been considered 10 years ago when I started with the 32bit platform, and it would take too much time to make everything compatible (with many compromises - e.g. no native USB support, and we know that this is important for best performance!) However, I think that ESP32 is a pretty good companion device to a STM32F4, hence potential candidate for future MIDIbox enhancements. E.g. the NodeMCU ESP32 available at Reichelt for 10 EUR supports Dual-Core (!) @240 MHz with WiFi and Bluetooth, 512k RAM, 4MB external Flash, incl. USB programmer on PCB - compare this with a PIC18F*! ;-) I started with Bluetooth, and the result can be found here: https://github.com/midibox/esp32-idf-blemidi This so called "BLE MIDI" service should work with any OS which supports this protocol. So far only tested on MacOS and iOS... but it should also work with Linux and Win10. This will be the basis for further experiments at my side - I'm able to communicate with the device via MIOS Studio. :-) (however, application download has to be done with the ESP32 ecosystem - means: the appr. esptool.py based bootloader) In future also a WiFi connections as demonstrated in Pedalino might be possible, but I'm not there yet - focus is on the application itself, knowing that the MIDI interface options won't be so fast like known from the STM32F4 based platform. E.g. how accurate can we control a Motorfader with the PWM LED outputs of a ESP32? If it works, it could be connected like a MBHP_MF_NG module via traditional UART based MIDI to a MIDIbox NG. And will it be possible to control a SRIO chain? Might be interesting for a future BLM16x16+X with (only) optional WiFi and Bluetooth connects. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Hawkeye Posted December 13, 2019 Report Share Posted December 13, 2019 Very cool development, well done! While the girls in the house insist on automatically shutting down the WiFi network at bedtime "so they can sleep better" :), i can see why wireless connections would be cool, maybe also in a ProgrammA context :). Many greets, Peter Quote Link to comment Share on other sites More sharing options...
ilmenator Posted December 13, 2019 Report Share Posted December 13, 2019 Nice to see some new playground projects coming along! And more than useful, I think this could be a crucial extension which could bring new life to the community! I'm excited! Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 13, 2019 Report Share Posted December 13, 2019 (edited) Capabilities and inside features are awesome!.. 512k RAM :-) hummm Do you think you will be able to find the time, during this harsh winter, to migrate the mios32 bootloader to the HAL( F4 ;), so that this magnificent OS that we love so much will become almost eternal? Hihi In any case thank you and have good time with DIY and experimentation... So good to read that! :) Edited December 13, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
TK. Posted December 13, 2019 Author Report Share Posted December 13, 2019 No, I won't have the time for a fully adaption to MIOS32, especially considering incompatibilities, missing resources and last but not least, potential additional user support which I can't give thereafter. And concerning bootloader: the native solution of the ESP32 ecosystem is working well, no real need for an adaption. Therefore I provide the projects "as is" and independent from MIOS32 - but you will find some things known from MIOS32 later, and the projects will be somehow integrated into the MIDIbox platform - but please don't expect so much "flawless compatibility" that we know from MBHP_CORE_STM32/MBHP_CORE_LPC17/MBHP_CORE_STM32F4... Times have changed, today powerful DIY platforms are already available, so that it makes sense to adapt to the workflow of the corresponding users - I'm flexible and see the possibility to reduce efforts at my side ;-) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Zam Posted December 14, 2019 Report Share Posted December 14, 2019 Hi all Look promising Especially if RTPM via wifi is implemented Best Zam Quote Link to comment Share on other sites More sharing options...
TK. Posted December 14, 2019 Author Report Share Posted December 14, 2019 Should be possible -> https://github.com/lathoub/Arduino-AppleMIDI-Library Good progress at my side: I'm now able to control motorfaders, and the accuracy is much better than ever before, because dedicated PWM outputs are used (which are normally intended to fade LEDs), clocked at non-audible 20kHz range. Some work is still required to get it compatible with MBHP_MF_NG, but maybe I can show the difference in 1..2 days via video. My test setup: a NodeMCU hooked on the MBHP_MF_NG board with a quick&dirty adapter board, communicating via Bluetooth (the MIDI sockets are currently not used - unfortunately ESP32 pins are not 5V tolerant) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Zam Posted December 16, 2019 Report Share Posted December 16, 2019 On 14/12/2019 at 8:23 PM, TK. said: I'm now able to control motorfaders, and the accuracy is much better than ever before, because dedicated PWM outputs are used (which are normally intended to fade LEDs), clocked at non-audible 20kHz range Hello Thorsten That's interesting, what is the max possible clock speed ? Best Zam Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 16, 2019 Report Share Posted December 16, 2019 (edited) Hi Thorsten, Is it possible to do not pair the two devices and create a network with it? If a device can broadcast to several others devices and also receive(merge) from them too? Is there a kind of receiving state or meter, to be able to manage the distance between the devices? Best Bruno Edited December 16, 2019 by Antichambre Quote Link to comment Share on other sites More sharing options...
TK. Posted December 16, 2019 Author Report Share Posted December 16, 2019 3 hours ago, Zam said: That's interesting, what is the max possible clock speed ? Depends on the desired resolution for the duty cycle. The timers are clocked at 80 MHz Means: with 20 kHz we could have 4000 different "speed levels" (but actually I'm currently only using 64 speed levels, which is sufficient) 3 hours ago, Antichambre said: Is it possible to do not pair the two devices and create a network with it? If a device can broadcast to several others devices and also receive(merge) from them too? Is there a kind of receiving state or meter, to be able to manage the distance between the devices? At least I know that MacOS and iOS don't allow this. If I take the device with one computer, it appears as "offline" on the other (and vice versa). Seems to be intended, that only a point-to-point connection is allowed. Yes, there should be some kind of meter available, here a link to the driver documentation: https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/bluetooth/ Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Zam Posted December 17, 2019 Report Share Posted December 17, 2019 8 hours ago, TK. said: Depends on the desired resolution for the duty cycle. The timers are clocked at 80 MHz Means: with 20 kHz we could have 4000 different "speed levels" (but actually I'm currently only using 64 speed levels, which is sufficient) Ok ! don't know what is the agenda or if any major MFNG update is on the road (which I can help on by the way...) I suggest to factor at least 10 the clock in case of hybrid system (analog close to or in the fader...) let say 312.5kHz , which correspond to 256 speed level (you have room over 64...) also a value over 192kHz (HD audio) I mean If it's easy don't hesitate to change this... Best Zam Quote Link to comment Share on other sites More sharing options...
TK. Posted December 17, 2019 Author Report Share Posted December 17, 2019 19 hours ago, Zam said: Ok ! don't know what is the agenda or if any major MFNG update is on the road (which I can help on by the way...) Good question! Currently it's mainly a learning vehicle for me to explore a new microcontroller and corresponding software. And now I'm also learning KiCad to enter the schematic (and maybe also the Adapter PCB) - currently only for my own interest. If you would like to play with the project as well, you are welcome of course! :) I will bring it at least to a state that others can use an adapter board on their existing MBHP_MF_NG, can connect via traditional MIDI but also Bluetooth and maybe also (later) rtp MIDI, but I can't promisse anything else. And at this point in time it especially needs "real life testing" before it's build by others. 19 hours ago, Zam said: I suggest to factor at least 10 the clock in case of hybrid system (analog close to or in the fader...) let say 312.5kHz , which correspond to 256 speed level (you have room over 64...) also a value over 192kHz (HD audio) I mean If it's easy don't hesitate to change this... Was worth a try: I used 200kHz and it works like 20kHz - don't see a big difference on the motor handling itself - but probably in an analog system: 20 kHz: 200kHz: The "noise" that we see here comes from the higher ADC resolution (faders are scanned at 12bit instead of 10bit) and messy ground on my vero board - this should become better with a PCB. But it doesn't impact the smooth movements. Of course, most interesting would be if it works so smooth like your 89MotionN: At least I see a potential cost benefit ;-) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Zam Posted December 18, 2019 Report Share Posted December 18, 2019 Hello Thorsten I have something like "MF_HD" in head since time but don't start because of no more real need for me (I have my motor driver) It's hybrid, between MF_NG and My 89MotioN, in all aspect probably (cost, quality and performance) Your two AD scan from fader servo seem to show improved noise at 200kHz. Best Zam Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 18, 2019 Report Share Posted December 18, 2019 Thorsten, Have a look at this:https://www.synthtopia.com/content/2019/12/16/cme-debuts-widi-master-a-wireless-midi-over-bluetooth-adapter/ Best regards Bruno Quote Link to comment Share on other sites More sharing options...
TK. Posted December 19, 2019 Author Report Share Posted December 19, 2019 Cool, I like CME :) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Antichambre Posted December 19, 2019 Report Share Posted December 19, 2019 Just now, TK. said: Cool, I like CME :) Best Regards, Thorsten. Yes you already own a small keyboard if I remember well. ;) Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted December 20, 2019 Report Share Posted December 20, 2019 I wanted to post this some time before but I'm not really sure if this is a helpfull information but I was thinking about if it's possible to connect this one with the midi in/out pins of the core and feed it with 3,3v http://www.hobbytronics.co.uk/wireless/btmodule-bt05 Quote Link to comment Share on other sites More sharing options...
TK. Posted December 20, 2019 Author Report Share Posted December 20, 2019 I can't recommend this solution; it only transfers via a serial protocol, which then has to be converted by a computer into MIDI messages - this is error prone. Today we would prefer the BLE MIDI protocol, which is natively supported by many operating systems, and considers special MIDI features such as continuous SysEx streams. And this is possible with a simple ESP32 controller, which is available for the same (or less) price - and on top of this WiFi should be possible as well. Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Noise-Generator Posted December 20, 2019 Report Share Posted December 20, 2019 Allright, now I understand Quote Link to comment Share on other sites More sharing options...
TK. Posted December 22, 2019 Author Report Share Posted December 22, 2019 My first KiCAD project - I don't miss xcircuit and Eagle & I'm happy that other people can now edit the files with state-of-the-art open source SW as well :-) Best Regards, Thorsten. P.S.: ordered at OSHpark - let's see if the circuit works like intended next year :) Quote Link to comment Share on other sites More sharing options...
Zam Posted December 22, 2019 Report Share Posted December 22, 2019 2 hours ago, TK. said: My first KiCAD project - I don't miss xcircuit and Eagle & I'm happy that other people can now edit the files with state-of-the-art open source SW as well :-) KiCAD is great ! Glad you switch Best Zam Quote Link to comment Share on other sites More sharing options...
TK. Posted January 1, 2020 Author Report Share Posted January 1, 2020 While waiting for the PCB I worked on the "Apple MIDI" protocol which allows to transfer MIDI messages over WIFI (and Ethernet - known from this project: As a second project I consider to create a universal "MIDI bridge" device for MIDIbox projects which supports UART, Bluetooth, WIFI and SPI, maybe also CAN. So, it can be connected via SPI port J28 to a MBHP_CORE_STM32/F4/LPC17 instead of the MBHP_ETH module, or alternatively via UART (e.g. also to PIC based projects) giving us wireless connections :) The latency is not so nice - expect ca. 5 mS + some jitter - it won't be really suitable for sending MIDI Notes, but it will be very nice for MIDI controllers. Another topic which needs to be explored: if the antenna is strong enough to send/receive in a metal case, like MIDIphy MBSEQ V4+ Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
latigid on Posted January 1, 2020 Report Share Posted January 1, 2020 Great work! The universal solution will be much appreciated as we have spare UARTs on the upcoming BLM :) Quote Link to comment Share on other sites More sharing options...
TK. Posted January 1, 2020 Author Report Share Posted January 1, 2020 I think that a ESP32 could handle the BLM16x16+X code internally, no need for a second core :) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
TK. Posted January 6, 2020 Author Report Share Posted January 6, 2020 Short update: the ESP32 based MBHP_MF_NG can now communicate with BLEMIDI over Bluetooth, Apple MIDI over WIFI, and traditional MIDI via UART -> https://github.com/midibox/esp32-idf-mfdrv Still some work to do, but I think that this is a pretty good basis for other MIDIbox projects - special focus was on reliable SysEx transfers and routing between different MIDI interfaces. This major challenge is solved! :-) Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.