Jump to content

Recommended Posts

Posted

Hi all,

this is my very first topic into midibox forum, and it deals with my very first MIDI project. Hope to be in the right place (and forum section) ;)

Using a simple 32bit microcontroller (STM32), purpose of my project is to build a little (max 5x5x5cm) controller for my piano/synth.

More in details, this is my question: since STM32 has GPIOs high level to 3V3 (and not 5V), can I drive a midi IN through this midi OUT?

In attach a simple schema.

If needed, and allowed, I can also attach a link to the original website which gave me that schema.

Thank you all

jerry

post-11054-0-80915800-1341403973_thumb.j

Posted

Why don't you have a look at the schematic of the Core32 (STM32 based)? Midi Out looks the same to me.

Hi Shuriken,

that's the original website :)

It should work, but when I send whatever midi message*, piano/synth becomes mute (as if volume goes down to zero, or disabled internal tone generator). After midi cable disconnect, volume becomes normal.

My doubt was about the current loop, because midi high level (5V) doesn't generate current flow, while STM32 high gpio level (3V3) is able to produce a current flow (5V-3V3=1V7). Maybe midi pin 4 should be connected to 3V3 (and not to 5V)?

thanks again

jerry

* program change (after bank select), or identity message, or others...

ps:sorry for my accademic english :)

Posted

Hi all,

I have an invisible update about my project :)

In attach there's a screenshot showing what happens when I send it an IdentityRequest message (0xF0, 0x7E, 0x7F, 0x06, 0x01, 0xF7).

my board MIDI out -> piano MIDI in (identity_request message)

piano MIDI out -> oscilloscope

As you can see, there's a strange squared waveform. it takes about 80ms.

After this, forever, there's a pull-down, every 30ms.

I hope ID_msg is correct. I'm sending it over 7F/all channel, this way I'm sure it replies :D

Is there some macroscopic mistake by my side?

Thanks

j

post-11054-0-85359300-1341506911_thumb.j

Posted

Solved!

this schema (http://www.ucapps.de/mbhp/mbhp_core_stm32_v2.pdf) is wrong.

Using an STM32, since its gpio high level is 3V3, MIDI pin 4 (power supply) must be 3V3.

Using another microcontroller, with gpio high level @ 5V, for example STM8, MIDI must be 5V.

So: power supply (MIDI pin 4) and micro's gpio high level must be @ same voltage

That's my opinion

Thanks

j

Posted

Hi,

no, the schematic isn't wrong: I've configured the Tx pin in Open Drain Mode

Accordingly a logic-1 will set the pin into high-impedance state, and the voltage level will be pulled to 5V.

This is the preferred solution for MIDI.

Yes: if you configure the pin in Push-Pull mode, you've to connect the 220 Ohm resistor to 3.3V, but I strongly recommend to change the pin configuration instead.

Best Regards, Thorsten.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...