-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3V3 Logic on ESP device #12
Comments
Technically speaking you are right. Practically speaking it works. I used the 6N137 coming from Pedalino. As you noted it should be replaced by somenthing that works at 3.3V like a 6N138. If you want to propose and improved circuit it will be appreciated. |
Which schematic editor are you using? In your github project, you just provide the SVG exports. I will be easier to me to start with your schematic project. Before submit an improved circuit, I need to test it myself (I am still waiting to receive DIN connectors), and I record you that I am a "newbie" in electronics ("my" answer will be built from solution found by others on the Internet). This site seems to have a correct and tested solution : |
I am using EasyEDA. Here attached the link the project source file. |
Here is a draft proposal. Be very critical on the schematic. It is not tested for the moment. I reject all responsabilities of possible hardware destruction. Be aware, it is not my formation. https://easyeda.com/christian.foucher/pedalinomini-3v3-with-6n138-and-bss138 <-- Should not be used (this file has the #30 issue)
Schematic_PedalinoMini-3V3-with-6N138-and-BSS138_Sheet-0_20190823090030.svg.zip <-- Should not be used (this file has the #30 issue) Remarks : You can use the "MC74VHC1GT08" (2-Input AND Gate/CMOS Logic Level Shifter) like it was proposed in http://10rem.net/blog/2012/03/31/midi-module-assembly-instructions instead of the BSS138 level shifter if you prefer but it seems to be more difficult to buy. |
Apologies, I am neither a professional programmer or electronics designer. However, I see that power coming into the MIDI-IN optional zone is now 3.3V but the power coming into the MIDI-OUT optional zone remains 5V. Were you not proposing that the entire system move to 3.3 as the ESPs are not necessarily designed to be 5v tolerant? The screen runs on 3.3 anyways, not sure why it's worth keeping track of a second voltage? There is also an old reference to 5V on the ESP32 pin 15. Can you clarify the Level Converter section? Is that section only needed if adding MIDI-IN? You can have MIDI-OUT without this? Also, change the REV number in the title block and put your name on it! 😄 |
Good point. I think the MIDI-OUT port can be converted to 3.3V replacing the 220 ohm resistors with a 10 and a 33 ohm resistors. This solution can avoid the level converter. I will update my schematic with 6N138 for MIDI-IN and 10/33 ohm resistors for MIDI-OUT. |
Ugh. Actually, I'm not sure you can do this, as Midi is a 5v protocol, so on output other devices are expecting 5v. Does that sound right? I don't even know. Alternatively, you can just add the 10rem.net Midi Module to the parts list as a breakout board for anyone who needs midi-in and midi-out, with pin outs to the corresponding header on the breakout board 😄 |
Like Marosell, I think adaptation of voltage level is needed. For the moment, I can't test it for the moment, I have all components, except my 5-pins DIN connectors and USB-MIDI converter (I have been waiting for 75 days! it seems to be lost during shipping!). I don't want to start the test with my Yamaha CLP120 keyboard. |
According to the following schematic https://www.dropbox.com/s/jefwxxtufgwg0ex/esp32_Schematic%20Prints.pdf?dl=0 you can apply 5V to Vin. It is an alternative power source instead of USB. However my intention is not to power supply ESP32 using Vin pin but it is to drain 5V from Vin for MIDI. PedalinoMini need to be connected to an USB power source (or battery) to power all the accessories. MIDI has been recently update to works with 3.3V and now 3.3V is on the standard. The value of the 2 resistors (10 and 33 ohm) for a MIDI-OUT are in the standard schematic (https://forum.arduino.cc/index.php?action=dlattach;topic=566442.0;attach=272586). |
Sorry for my mistake, you are right. I mix DevelopBoard ESP32 and the ESP32 itself. |
Thank you for your information source. I will try when I have all the hardware. |
Hi All. Mike contacted me and pointed me here. MIDI over DIN is a 5v standard. There are times when you can get 3.3v to work, but that is highly dependent upon the receiving end. It will not work with all devices. You're relying on the receiving end's opto isolator to trigger at 3.3v logic levels, which is not guaranteed. There are also lots of bad MIDI references out there. There are also synthesizers and other small devices that are inline MIDI, with no other power supply, and which rely on the 5v. It's questionable as to whether or not those are in-spec, but they exist. The IC I used for level shifting was picked specifically because of the voltage ranges it supports for in/out. It's running at 5v, but the input signal is based on that from a 3v3 MCU. So it needed to be able to take a low enough ON value (3v3 logic level). There may be others than can be substituted, but I didn't find any at the time. You'll need to compare the specs for minimum "on" signal. It's a small SMD package, but it's easy to hand-solder if you leave large enough pads in your design. Here's the one I used. If you look at page 3, you can see it will trigger at 2v when supplied with between 4.5 and 5.5 volts VCC. If you want to use this for MIDI out, all you need is
Basically, just the bottom half of my schematic. This: Good luck on this project. Looks super cool! I hope my design helped. Pete |
Thanks Pete for sharing your experience. |
All, I included the above information in my test board, which I have sent to production and am waiting to receive. Test board proposes MIDI Out via:
Will report back once tested. |
Correction of the proposal in order to take into account of the MIDI out inverted connector pin 4/5 detected in #30 . https://easyeda.com/christian.foucher/pedalinomini-3v3-with-6n138-and-bss138-midi-out-pin4-5-now-ok |
You sure the BSS138 will trigger on 3.3v? I didn't have a problem sourcing the M74VHC1GT08DTT1G, available at both Mouser and LCSC without a problem. But up to you on whichever you want to use. |
BSS138 will adapt 3.3V to 5V without trigger effect. For example :
It is a well known bi-directional level shifter, like I explain in one of my first message : Sparkfun, Adafruit.
I think I should also proposed the alternative of M74VHC1GT08DTT1G on the schema. Remark : If it works well with BSS138, I won't buy M74VHC1GT08DTT1G, sorry I am "stingy". |
Using Vtx = 3.3V and Ra=33 ohm and Rc=10 ohm resistors is in the standard since 2014 but according to Psychlist1972 (see above post) is not working an all devices. |
I've test MIDI OUT with 33ohm and 10ohm circuit with my USB Midi Interface(CME WIDI X8) as well as my Kemper, it does work normally. |
Hello Alf45tar,
First Thank you for your project. I was thinking about a similar project than yours. My goal is only MIDI IN / MIDI OUT from / to Wifi network midi.
I am a professional software programmer, but I'm not an electronic engineer. I see 6N137 (High Speed Optocoupler) is powered by 5 V (the Vcc seems OK for me), but the pin 6 (Vo) of the 6N137 component is directly connected to the ESP.
I suppose that you "transpose" the electronic of the Pedalino project to the Pedalino mini, and you forget that Arduino HWs are 5V, but ESPs are 3V3 and not 5V tolerant.
I think you need to adapt the output of the pin 6 (Vo) of the 6N137. If you have an oscilloscope, it should be possible to check it.
The text was updated successfully, but these errors were encountered: