Open Source MIDI to Music 5000 using STM32

discuss both original and modern hardware for the bbc micro/electron
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

And here it is:
DSC_4142.JPG
Not yet boxed, not with its blinkenlights attached, but it works :) A couple of resistor values need tweaking but that's about it. There's a button to select the channel (it'll then only respond to whichever channel it next sees), or else it can respond to any MIDI channel, and there's a MIDI activity light to give you gentle blinking MIDI comfort that MIDI data is indeed flowing.

A few are going to go out for testing shortly. Hopefully no one will find anything awfully wrong with it :?

d.
jasonl
Posts: 48
Joined: Wed Mar 27, 2019 9:22 am
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by jasonl »

Neat! =D>
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

jasonl wrote: Thu Aug 08, 2019 9:47 amNeat! =D>
Thanks :)

And finished!
DSC_4151.JPG
Video of it behaving itself here: https://www.youtube.com/watch?v=dfU4WedfRpU
cmorley
Posts: 1871
Joined: Sat Jul 30, 2016 8:11 pm
Location: Oxford
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by cmorley »

Great work Daniel! :D
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

And they're done :)

- I do have a few for sale... See the upcoming post in the trading section!

d.
Attachments
DSC_4343.JPG
User avatar
gslug
Posts: 91
Joined: Sat Mar 26, 2016 7:24 pm
Location: Bermondsey
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by gslug »

Got one back in December and finally got around to setting up a Beeb to have a play with it, only to find that I've lost the audio output cable for the Music 500. :(

Update: soldered a replacement cable. All good. Thanks Dainel! :D
matthewnorth
Posts: 17
Joined: Wed Aug 19, 2020 1:08 pm
Location: Plymouth, Devon UK
Contact:

Re: Prototype MIDI (input) Interface for Music 5000

Post by matthewnorth »

Hi there,

Im going to try and make this soon, I have a blue pill board, a 3.3v reg and opto coupler etc.

I have looked at all of your github, but there is so much stuff there , I just would like to know what is the code I need to upload to the bluepill board, do I have to upload more than 1 file ? Im very new to this. I did also order up some PCBs that I managed to make from your github files, though being all surface mount I dont think ill ever be able to make one!!!

Thanks in advance

matt
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Prototype MIDI (input) Interface for Music 5000

Post by danielj »

matthewnorth wrote: Fri Dec 02, 2022 11:01 am Im going to try and make this soon, I have a blue pill board, a 3.3v reg and opto coupler etc.
Hello - you'd posted this in the wrong topic so I've moved it. That other topic was indeed an M5K-MIDI interface, but quite an expensive one. This is the thread for the one I made. It's a fair while since I ran this off a bluepill. This thread might give you some pointers though? I'll have a proper read back through everything and see if I can remember tomorrow.
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

Code: Select all

  * Pins used: Userport PB0-7 (even pins 6-20) are on GPIOs PB4,6-12
  * Userport CB1 (pin 2) -> Clk, GPIO PB13  (SPI2) - add external 10k pullup to 5V
  * Userport CB2 (pin 4) -> MOSI, GPIO PB15 (SPI2)
  * MIDI serial in (3.3V) -> GPIO PA3  (USART2)
  *
  * PA5 - Button (to ground) to program channel,
  * PA4 - LED (active low, 560R to 3.3V) to indicate programming mode
 
OK - it is just as in the readme - program the bluepill with that code (compile with arm-none-eabi and then get it on the bluepill however you tend to get things onto it). Then the wiring up is as above ^^^. There's a serial output from your midi optocoupler circuit, just hook that to PA3. PA5 is to a switch which connects it to ground, the only other really important bit is that 10k pullup to 5V on PB13. It won't work without that.

I don't have the cubeMX stuff set up anywhere so I can't directly test compiling at the mo.

Let me know how you get on!

d.
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

Just as an aside - is there any interest in another run of these? They wouldn't be as elaborate as the original ones, probably just a bare PCB with on board SMT LEDs and tactile push-buttons (there was an awful lot of fettling involved in casing them and crimping wires etc). Could add header pin holes so people to break those bits out and case it if they really wanted to. Unsure of price at the mo as I've not priced up a BOM, but probably similar to, or a bit less than, whatever I did them at last time.
chrissawer
Posts: 182
Joined: Mon Aug 10, 2020 9:04 am
Location: West Yorkshire, UK
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by chrissawer »

matthewnorth wrote: Fri Dec 02, 2022 11:01 am Im going to try and make this soon, I have a blue pill board, a 3.3v reg and opto coupler etc.
FYI I built one of these using a Blue Pill on breadboard this week. It's working a treat! Really nice to be able to play my Music 500 live with an attached MIDI keyboard. Many thanks to @danielj for making both the software and hardware open source.

The software compiled cleanly for me on Linux Mint (arm-none-eabi-gcc 10.3.1 installed via apt, STM Cube etc. not required). Alternatively it looks like there are binaries here: https://github.com/drdpj/MidiKeyboardBluePill/releases

To sanity test that the software was running I connected the LED and button first, powered via the USB port and checked that the button toggled the LED.

For opto-isolator Daniel's schematic posted earlier in the thread uses a TLP2361. However I happened to have a 6N138 to hand from a previous Arduino project, so I used the circuit from the following site running entirely on 3.3V which seems to work ok for me: https://diyelectromusic.wordpress.com/2 ... ntrollers/

The rest of the wiring is per Daniel's post from last week. At some point I expect I will transfer the circuit onto stripboard but for now I am having a lot of fun playing the Music 500. Some of the built in sounds really are spectacular, particularly through headphones.
midibluepill.jpg
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

Excellent - really pleased you got it going, and a great write up! I should say the opto-isolator I used on the PCB was simply an easy choice of surface mount device that someone had in stock. I originally used a 6N138 in breadboard version I'd put together. Any MIDI opto-isolator circuit that outputs 3.3V should work fine.
matthewnorth
Posts: 17
Joined: Wed Aug 19, 2020 1:08 pm
Location: Plymouth, Devon UK
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by matthewnorth »

Thats absolutely Brilliant!
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

matthewnorth wrote: Fri Jan 06, 2023 5:34 pm Thats absolutely Brilliant!
Clearly your initial query managed to tip me over the edge into making more :D
matthewnorth
Posts: 17
Joined: Wed Aug 19, 2020 1:08 pm
Location: Plymouth, Devon UK
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by matthewnorth »

Glad to be of service :)
matthewnorth
Posts: 17
Joined: Wed Aug 19, 2020 1:08 pm
Location: Plymouth, Devon UK
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by matthewnorth »

Mine I got today, and its flipping brilliant, even made a little tune.

https://www.youtube.com/watch?v=VBKouowSHc4
Deleted User 13996

Re: Open Source MIDI to Music 5000 using STM32

Post by Deleted User 13996 »

matthewnorth wrote: Mon Jan 16, 2023 11:02 pm Mine I got today, and its flipping brilliant, even made a little tune.
Excellent tune, plays well to the strengths of the M5000.
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

I've released a new version of the firmware for this - see the releases link on the github: https://github.com/drdpj/MidiKeyboardBluePill
There's no need to update if everything's working fine for you, but I've put some instructions in the readme if anyone has a burning desire to do so. If you're not confident in what you're doing and you start connecting 5V to 3.3V by mistake etc, etc, you do run the risk of breaking things permanently so I'd really advise against doing it unless you do know what you're doing and need to use the unit in conjunction with a setup that requires a MIDI clock to be running.
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

Just having a quick gauge as to whether there's any interest in any more of these making their way out into the wild?
User avatar
danielj
Posts: 9907
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by danielj »

Another new version of the firmware available:
https://github.com/drdpj/MidiKeyboardBluePill

No need to worry about it if everything's working, but have recently come across a keyboard that didn't work with it as it stood.
These silly cheapy ST-LINK programmers work fine for updating: https://www.amazon.co.uk/dp/B086TWZNMM/
User avatar
BlondMM
Posts: 39
Joined: Tue Jun 01, 2021 5:39 pm
Location: Dutch oaks from little Acorns grow
Contact:

Re: Open Source MIDI to Music 5000 using STM32

Post by BlondMM »

Thanx D., will give it a swing.
Image
Post Reply

Return to “8-bit acorn hardware”