VOGONS


First post, by aspiringnobody

User metadata
Rank Member
Rank
Member

Credit to Ulfenknulfen here on Vogons and DLehenbauer from Github -- I'm just making this as a hobby project -- so you should inquire with Ulfenknulfen for the stereo version of his awesome Beepblaster (coming soon)! It was suggested by Dreamblaster that I start a thread to chronicle my own process through making a PCB for the first time -- so here it is! See the links below for the real development.

Beepblaster 1.0 Wavetable Module
https://github.com/DLehenbauer/arduino-midi-sound-module

After doing some reading that's way over my head, I've learned the the "right" way to run two ATMega328s from the same clock would be to use an active/canned crystal oscillator and set the bootloader low-fuse to 0xC0. Then you can input the external clock on XTAL1. However -- since doing that would make my ATMega328 not work in my Arduino Uno, and I don't want to do that, I've decided to just go forward with separate clocks for each ATMega328. It's not ideal, but apparently due do physical differences in the watchdog timer each mega can start up at different times anyway. To help keep things synced as best I can, I've reworked the PCB to keep the midi signal traces at exactly the same length. I'll post here to see if anyone has tips on changes to be made to the board (@dreamblaster, perhaps?), and then I'll order up the parts to make one. I won't have the beep-mode since that source is closed and exclusive to Ulfenknulfen's modules, but this will be something I made myself.

Attachments

Last edited by aspiringnobody on 2023-01-17, 18:42. Edited 1 time in total.

Reply 1 of 39, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

Let's make your first PCB happen !

Some general feedback :
- If you'd like detailed feedback on the forum, it may be best to add a screenshot of your schematic as well, now it is guessing for component values
- MIDI baud rate and audio signals are relatively slow (in electronics terms), trace length should not matter for audio or midi signals.
- Using 2 separate crystals may work fine, crystals are quite accurate, so both sides will be in tune. You keep traces to the crystal short, that is good.
- Alternatively you can use 1 crystal, and configure CKOUT fuse to drive the 2nd atmega using clock output. This will require different fuse settings for left and right.
- PC supply can be noisy, you may wish to add filtering, or better derive your 5V from the 12V pin, using a linear regulator like 7805 or similar. This can improve audio quality in real retro circumstances.
- The left and right indications are now on the copper layer instead of silk layer. Maybe also think of a pcb name and revision number for your pcb, and add it in silk screen (so we can see revision from the screenshots)?

Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !

Reply 2 of 39, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

Looking closer at the screenshots, 2 more comments :
- for the crystal try to route directly to the pin, avoid the redundant via (switching from top to bottom).
- try to improve the ground plane, especially where audio signals pass

Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !

Reply 3 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member
dreamblaster wrote on 2023-01-08, 08:46:
Let's make your first PCB happen ! […]
Show full quote

Let's make your first PCB happen !

Some general feedback :
- If you'd like detailed feedback on the forum, it may be best to add a screenshot of your schematic as well, now it is guessing for component values
- MIDI baud rate and audio signals are relatively slow (in electronics terms), trace length should not matter for audio or midi signals.
- Using 2 separate crystals may work fine, crystals are quite accurate, so both sides will be in tune. You keep traces to the crystal short, that is good.
- Alternatively you can use 1 crystal, and configure CKOUT fuse to drive the 2nd atmega using clock output. This will require different fuse settings for left and right.
- PC supply can be noisy, you may wish to add filtering, or better derive your 5V from the 12V pin, using a linear regulator like 7805 or similar. This can improve audio quality in real retro circumstances.
- The left and right indications are now on the copper layer instead of silk layer. Maybe also think of a pcb name and revision number for your pcb, and add it in silk screen (so we can see revision from the screenshots)?

dreamblaster wrote on 2023-01-08, 08:52:

Looking closer at the screenshots, 2 more comments :
- for the crystal try to route directly to the pin, avoid the redundant via (switching from top to bottom).
- try to improve the ground plane, especially where audio signals pass

Alrighty, here's "PCMBLASTER V1.1"

I couldn't make the schematic show the correct values (for example, my 3.9K resistor shows as 1K and won't let me change it), so I added them to the silkscreen. I'm not sure if they'll print correctly, but they should be visible on the images at least. I reworked the design to include one of those voltage modules you used on the Chill'n'Phil. I know it's overkill but it was easy for me to work with (this way I didn't need to figure out how to make a solder pad for the linear regulator to sink heat into). I'm not ready to change the fuses on my Arduino's ATMega since I don't have any way to set it back -- so I'm going to try the two crystals. As you say, they're much more accurate than the resonators my Arduino Unos use by default and it seems to work with them, so the crystals can only be better. I also fixed the copper lettering to be silkscreen. I also didn't do anything special with the MIDI traces. I had to move them out of the way for the power regulator, so they just ended up as the autorouter put them.

As for the second message: I'm not sure how to do better with the ground plane. The audio ground pins on the wavetable board are ONLY connected to the 3.3nF filtering caps -- and nothing else. I'm not sure that this provides a real ground -- although looking at the gerber files from the BeepBlaster it sure seems like it works. I know I can't connect the digital and audio grounds -- so I don't know where to get a real "audio" ground out of the system. Maybe it worked on the BeepBlaster because he wasn't using a voltage regulator??
I moved all the traces for the crystals to the top.

Thanks for your help!

Thanks for your help!

Attachments

Last edited by aspiringnobody on 2023-01-08, 16:51. Edited 1 time in total.

Reply 4 of 39, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

i really suggest you try to get schematic with values. Looking on pcb traces, it is much harder to spot mistakes:
i overlooked this at first (i thought you used vias), but now noticed you connected the crystal wrong : it has the capacitors in series between the crystal and the cpu.
that is not right, the crystal needs to be connected directly to the cpu, and the caps need to connect from the crystal pins to ground.

crystalcaps.png
Filename
crystalcaps.png
File size
7.03 KiB
Views
2155 views
File license
Fair use/fair dealing exception

Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !

Reply 5 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member

Okie dokie: I'm going to do this as two posts. This is PWMBLASTER 1.1A (the original two crystal design with the clock fixed). I moved around some traces but more or less the same design.

Attachments

Reply 6 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member

This is PWMBLASTER 1.2, which has one crystal into U1, and then sends it out on pin14 to ATMega U2's XTAL1. This will require me to figure out how to change the bootloader on my ATMegas without bricking it, but is probably the closest thing to doing it "right."

Attachments

Reply 7 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member

I went back and forth about whether or not to say anything -- but given the circumstances I think it's best to be upfront and defend myself before things escalate. I received a private message from the creator of the Beepblaster:

If you not have - please check my Readme.txt file in beepblaster.zip on my first Post.

The readme referenced is a license document -- in which the relevant section appears to be:

The Beepblaster product, based on a Waveblaster compatible connector and PWM-enabled chipset is the intellectual property of dev […]
Show full quote

The Beepblaster product, based on a Waveblaster compatible connector and
PWM-enabled chipset is the intellectual property of developer [redacted].
Any commercial imitation, copy or duplication is strictly prohibited,
and will be prosecuted. I expressly reserve the right to grant licenses.

For the record -- all I have done in this thread is recreate, exactly, the schematics provided in the original author's github repository, making what changes were needed to enable the stereo mode that I myself coded and provided freely without restriction. The original author chose the MIT license for this project, so it is freely available to anyone who wishes to use it. I have likewise provided my modifications to the code under the same license. I have not, at any point, attempted to reverse-engineer the Beepblaster's "beep-mode" and have no intention of doing so. The MIT license does not require subsequent changes to be open-sourced, so that change is property of the Beepblaster's developer. As I stated in the beginning, I think that the Beepblaster's creator should be able to profit from his creation and I was not looking to "step on his toes" -- I began this as a personal project and wasn't going to sell anything. I even wanted to buy one of his modules when they were available. I used all through-hole components to make it easy for me to make with my level of skill.

Therefore, I will be taking the following action:
I will cease development of the "PWMBLASTER" to allow the Beepblaster's creator exclusive control over his project. I am assuming his claim of copyright stems from ownership of the concept of combining this readily available open-source project with a wavetable header, so I will no longer work on any such device.

I will instead modify my design to have a MIDI input, to avoid any conflict with the Beepblaster. I will offer that midi module for sale if there is interest. I also have a "lower" fidelity mode that will be configurable via MIDI NRPN command. I'm not sure how the Beep Mode works -- but what I've done is to artificially limit the number of voices available to the synth, which works sort of like when the NES would stop playing a channel of music to play a sound effect. I'll post that change to my github repo when it's fully tested and once I make some MIDI files to turn it on and off.

I'm sorry for this wall of text, but I don't want any legal trouble so I thought it best to make the accusation public and make it clear I will no longer be working on a wavetable daughterboard. As I set out in the beginning I did not want to steal anyone's thunder. So I will willingly vacate that space and return it to its original creator. I just started this as a beginner electronics project to take advantage of the change I made to the code to allow stereo operation.

Respectfully,
AN

Last edited by aspiringnobody on 2023-01-09, 01:13. Edited 1 time in total.

Reply 9 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member
Sunoo wrote on 2023-01-09, 01:12:

Well, I was considering picking up a Beepblaster, but no way can I support that project if that’s how the creator is going to act.

I don't think we should take it that way. I know I'm not. He says in the readme that he created it with his kids. I think he really has an attachment to it, and I can respect that. That's why I've decided to stop and make a MIDI module instead. I just started this to see if I could as a challenge.

I'd recommend that people still support him, and also I'm trying to keep in mind that there is a language barrier here. I just thought it best to nip it in the bud and move on (whether it's right or wrong, I don't want to get sued, 🤣). Anything I made was always going to be inferior to the Beepblaster anyway, the beep-mode is part of what made it so cool. Two modules for the price of one.

It would be the same if I reached out to dream and bought some chips and made a "copy" of the Dreamblaster S2. It might be "legal" but it wouldn't be the right thing to do. So instead I'll work on something else. No hard feelings from me and I encourage others to also be good with it. The beepblaster is cool and he deserves to benefit from it.

- AN

Reply 11 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member

Serge,

I need a recommendation for a simple amplifier circuit I can use to isolate the digital ground of the ATMega from the audio output. Preferably one that's not SMD.

Thanks in advance!

Reply 12 of 39, by LordMortiferus

User metadata
Rank Newbie
Rank
Newbie
aspiringnobody wrote on 2023-01-08, 16:45:

[..] I'm not sure if they'll print correctly, but they should be visible on the images at least.

In Eagle you should switch the font style of your silk screen from proportional to vector - that way your print on the PCB should look like the way you see it in the Eagle board file. If you have free space on the board add some credits to the silk screen (even if this might be just for yourself as it seems at the moment - but you never know).

My guess: for AGND and DGND, I would go for a star ground at one point of the PCB, at least make sure you do not route DGND through the analog part of your board.

Reply 13 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member

So I've been making some changes to the code, and I've thought of a few things to add (I'm calling them quirk modes)

1. Sets a static patch (ignores the midi file input and makes ALL sounds EXCEPT percussion be what you've selected) -- default is 82 (sawtooth). Gives it an ad-lib FM kind of vibe (Actually more like the NES or C64). Can be changed to whatever patch you want with a special midi file.
2. Assigns a RANDOM patch whenever a program mode change is issued. The RNG has 128 "seeds" that are user selectable, so in theory each song will have 128 different modes (should always be the same set of patches on the FIRST playthrough of a song after turning each mode on). Most will sound terrible. Again, the seed is selectable with a special midi file.
3. Completely ignores the patch -- leaving all instruments at their default. If you've ever plugged in a midi device partway through a song and heard a bunch of piano type sounds -- this is what happened.

The above three can be combined with:

4. Reduced Voice mode restricts the available polyphony. User selectable between 1 voice and 16 using special midi files. Similar to the way the NES would cut out a sound channel to play a sound effect.

Can anyone else think of any cool ways to "break" midi? In theory it should be possible to lower the sample rate to get a sort of Covox type sound from it but that doesn't seem to work correctly. I'll keep working on it.

Edit: I'll have these up on github in a few days. I'm waiting on the opto-isolators I ordered to come in so I can rig up a midi interface. I should have a PCB design with a Midi port by then as well to make available.

Reply 14 of 39, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
Sunoo wrote on 2023-01-09, 01:21:

Nah, he built his project on someone else’s open source work and then goes after you for doing the same? Hard pass.

It's quite different what is happening here.

Anyone else, please let it rest and do not insult members of this forum. Thanks.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 16 of 39, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

Hey aspiringnobody,
if you change the project into a midi module with DIN connector (please better check with ulfenknulfen if that's ok?), you indeed need to add an optoisolator for the midi signal.
Many example schematics available online for that.

Your schematic would be much more readable if you'd use the ground symbol instead of explicitly routing the ground.
Also on your routing, you can consider a ground plane and just connect the grounds to that.
Not sure how it looks in eagle, but use something like this instead of routing the ground :

ground.png
Filename
ground.png
File size
1.99 KiB
Views
1872 views
File license
Fair use/fair dealing exception

Good luck, looking forward to your midi module design !

Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !

Reply 17 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member
dreamblaster wrote on 2023-01-09, 17:06:
Hey aspiringnobody, if you change the project into a midi module with DIN connector (please better check with ulfenknulfen if t […]
Show full quote

Hey aspiringnobody,
if you change the project into a midi module with DIN connector (please better check with ulfenknulfen if that's ok?), you indeed need to add an optoisolator for the midi signal.
Many example schematics available online for that.

Your schematic would be much more readable if you'd use the ground symbol instead of explicitly routing the ground.
Also on your routing, you can consider a ground plane and just connect the grounds to that.
Not sure how it looks in eagle, but use something like this instead of routing the ground :
ground.png
Good luck, looking forward to your midi module design !

I’m already being exceptionally reasonable by not making a wavetable module. He doesn’t understand that an implementation of an open source project is by definition not copyright eligible. Even if it were I’ve not used any of “his” designs as reference nor even looked at his binary, so it would at worst be clean room reverse engineering, which is legal. I haven’t looked but I’d imagine his board is identical to the open source schematic anyway.

Edit: I’ve been informed by ulfenknulfen that his implementation of stereo does not use my code and he’s has it ready for some time (closed source). I didn’t know that so apologies for making unfounded accusations.
He however is using *my* code. That’s why it’s open source: so anyone can use it.

So I really don’t care if he is okay with me making a midi module. He’s a nice guy and all and that’s why I’m respecting his wishes. But that’s as far as I go.

Last edited by aspiringnobody on 2023-01-09, 17:51. Edited 1 time in total.

Reply 18 of 39, by dreamblaster

User metadata
Rank Oldbie
Rank
Oldbie

Hey okay, let's close this topic, and focus on making your first pcb a reality !
Making a midi module adds a few parts, but the principle is the same of course.
As the original github project features a display as well, maybe you can support this too - it would look nice on the module !

Visit http://www.serdashop.com for retro sound cards, video converters, ...
DreamBlaster X2, S2, S2P, HDD Clicker, ... many projects !
New X2GS SE & X16GS sound card : https://www.serdashop.com/X2GS-SE ,
Thanks for your support !

Reply 19 of 39, by aspiringnobody

User metadata
Rank Member
Rank
Member
dreamblaster wrote on 2023-01-09, 17:36:

Hey okay, let's close this topic, and focus on making your first pcb a reality !
Making a midi module adds a few parts, but the principle is the same of course.
As the original github project features a display as well, maybe you can support this too - it would look nice on the module !

I’ve got the display working but it adds some noise to the output. Maybe it needs its own power regulator?

Also, with the audio ground as it is I can get signal if it’s hooked up to my audio interface and it sounds fine, but I don’t have sound from headphones unless I connect the audio ground to the ground pin of the Arduino. I think I need an amplifier?