Author Topic: Syntherrupter - A Feature-rich, Polyphonic Interrupter  (Read 7272 times)

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #60 on: August 04, 2020, 02:08:07 PM »
Hello futurist,


As I said I'm still getting used to UI but for now everything works nicely and it isn't difficult to set the exact values I want
Happy to hear that!  :D

Min ontime is planned, but as part of a more advanced feature (see https://github.com/MMMZZZZ/Syntherrupter/issues/5). It‘ll be interesting to get this to work with the duty cycle limiter...
This means that it will take me quite some time.

I‘d GUESS that you‘re around 20% duty. That’s a pretty common value for MIDI operation - especially with such high pitches like in Popcorn.
10% is commonly assumed to be safe for DRSSTCs, and if your peak current is not at the very edge of what your IGBTs can handle, 20% should be ok. But keep an eye on the temperatures! IGBTs, wiring, MMC and inner turn of the primary tend to get hot.
Another thing you might consider: my DRSSTC handles 25% duty without problems, but my fuses don‘t. For single phase input I have the limit at around 8%.

For the min offtime you have to watch your primary current with your oscilloscope and see how long it takes the primary current to ring down to 0 after the ontime ends. It depends on so many things that I cannot estimate it for you. It‘s like asking „at which ontime will the OCD trip“.
The purpose of the min offtime is to prevent any ontime while there‘s still current from the last one. Since two ontimes can follow each other with only microseconds inbetween, you could be hard switching at peak current otherwise. Pretty much all drivers switch „hard“ at the beginning of an ontime to get the oscillation started (and thus receive feedback).

Btw yesterday I finally found a way to test the MIDI In feature but it didn‘t work. However, I‘m not sure what‘s the reason. Looking at the serial data with my scope I don‘t recognize any MIDI commands... I‘ll let this aside for now, make some last improvements to v3.1.0 and start working on the feature mentionned above.

Edit: I attached "my" Popcorn MIDI file. Haven't found a better version yet. The only thing I modified are the MIDI Programs to use the ADSR curves I liked. For this reason you should set the Note Ontime to 1/3 or less of the coil's max ontime. If this is too low for your coil, you can increase it, but this will affect the sound (probably not much). Except for the percussion channel 9, you can pass any of the other channels to the Syntherrupter. Even all if you like.
Oh... and one thing you didn't mention in your last reply: To what value did you set the MIDI Voices limit on the "Settings->Coil Limits" page? It's the number of notes the Syntherrupter will at most play simultaneously on that coil. If you have no idea what value you should chose, 8 is a good start (and the default value I think).



Kind regards,
Max
« Last Edit: August 04, 2020, 06:40:27 PM by Max »

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #61 on: August 05, 2020, 08:01:11 PM »
Finally! Guys i recommend you to buy the display from mouser or some other local store, i waited for almost 3 weeks for it to arrive, but it's finally here. It works like a charm. I need to find some nice enclosure for it. Thank you Max for sharing the project with us! :)


 
I tried my DRSSTC I on about 50% the power, since it's already so loud it can be heard in the whole street, soon i wanna try it on full power.


Though i think there are some glitches or maybe they are features and i didn't fully understand the GUI. I hope i can provide some further feedback soon.

Offline Mads Barnkob

  • Administrator
  • High Voltage Expert
  • *****
  • Posts: 1516
  • Karma: +27/-0
  • Denmark
    • View Profile
    • Kaizer Power Electronics
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #62 on: August 06, 2020, 10:51:43 AM »
Finally! Guys i recommend you to buy the display from mouser or some other local store, i waited for almost 3 weeks for it to arrive, but it's finally here. It works like a charm. I need to find some nice enclosure for it. Thank you Max for sharing the project with us! :)




Did you make a output board yourself? Where you have the two optical emitters sitting.
http://www.kaizerpowerelectronics.dk - Tesla coils, high voltage, pulse power, audio and general electronics
https://www.youtube.com/KaizerPowerElectronicsDk60/join - Please consider supporting the forum, websites and youtube channel!

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #63 on: August 06, 2020, 12:59:03 PM »
Hey Mads,
Yes i quickly designed it in EasyEDA. My previous interrupter was a mess, and i actually even fried it because of it. So i wanted a clean build with minimum wires, hence a PCB was born :)
I added some extra headers to connect some switches for safety and LEDs for indication.

Ordered from JLCPCB, it had arrived in a few days :)
« Last Edit: August 06, 2020, 01:01:02 PM by AstRii »

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #64 on: August 10, 2020, 02:07:26 AM »
@AstRii:
Yay, another one working (although not very hard yet  ;D )! How much work was it to synchronize the audio track with the MIDI track? Oh, and since you're using FL Studio, could you have a quick look at the hairless midi logging to confirm that FL Studio actually sends MIDI Realtime messages (and thus that the Syntherrupter is handling them correctly)? Thanks!
Cool idea with the board! If there's a lot of interest, I can try to design one, too. Probably two versions; one like yours with a header only for the interrupter signals, and one that directly connects to the LaunchPad, which would allow for a very compact design.

Last week I found out by chance that I do have all the parts to connect my Syntherrupter to the MIDI Out of my keyboard. Aaaaand it didn't work. I'll have another look at it next weekend.

From now on I'll release the binaries for all the compatible touch screens. This not only includes the more expensive ones that Mads ordered, but also the cheaper ones. What does this mean? Nextion is in fact just rebranding displays from a company called TJC and asking at least 50% more for the same modules. Of course they prevent you from flashing Nextion firmwares to TJC panels and vice versa. But they can't prevent you from using the TJC version of their editor to compile a firmware for TJC panels. Long story short, with release v3.1.0 (non-beta ;) ) I'll provide the firmwares for all of the following displays. You can now buy almost anything that sound like it could do the job ;)
  • TJC 5" Basic TJC8048T050_011R
  • TJC 7" Basic TJC8048T070_011R
  • TJC 5" Enhanced TJC8048K050_011R
  • TJC 7" Enhanced TJC8048T050_011R
  • Nextion 5" Basic NX8048T050_011R
  • Nextion 7" Basic NX8048T070_011R
  • Nextion 5" Enhanced NX8048K050_011R
  • Nextion 7" Enhanced NX8048T050_011R
Notes:
  • The R at the end of the model number indicates that it is a resistive touch screen. Some of them are also available as N or C version. N means no touch at all (unusable for Syntherrupter) and C is capacitive touch screen, which might not work near a tesla coil. Resistive touch is "noise immune".
  • I found out that Nextion/TJC changed the actual LCD module in their panel and the backlight is now a lot weaker. Since the Syntherrupter probably won't be used that often in plain sunlight I think it's not a big issue. Just wanted to let you know.
  • Some of the ebay/aliexpress panels that are listed and shown as Nextion panels - with the nextion model number - are actually TJC panels. Simply try both firmwares if one doesn't work ;)
  • Often the _011R suffix is not part of the item description; its rather tedious to search for these displays on aliexpress and I'm still asking around for the easiest and cheapest way to get them.
  • The Nextion "Intelligent" series and the TJC X3/X5 series are not supported.
With this release I won't include the Nextion source file anymore. It was part of the release because I thought you'd need it to run the Nextion firmware in the simulator or upload it via UART. Turns out you can do this with the compiled firmware, too. Start the Nextion editor, click on "Debug" or "Upload" - depending on what you want to do, and select the .tft file you want to run/upload.

The release will be published soon; I still have to write the release notes.


Kind regards,
Max
« Last Edit: August 10, 2020, 02:09:16 AM by Max »

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #65 on: August 13, 2020, 02:09:13 AM »
Hey,
If you find the correct MIDI tracks, it's not hard to synchronize them, unfortunately majority of downloadable tracks are totally off the correct tempo and sometimes even the notes are all wrong! I usually download a MIDI track from somewhere and the vocals from YouTube, if the MIDI track has correct tempo, then it's a matter of one minute to sync them in FL studio. If the tempo is incorrect, it can be adjusted in MIDI Editor or FL Studio itself, so it takes a couple of more minutes. Sometimes the tempo is correct yet the notes are played at the wrong time anyway, in that case i adjust the timing of each note individually and that can take few hours.
I will check the hairless MIDI as you asked, when i will run the coil again. In a few days probably (I cannot run it anytime i'd like thanks to my neighbors).
The interrupter board as a shield for the LaunchPad is such a cool idea, it's a shame that i didn't think about it when i was designing the board, it would make it so much more compact and robust.

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #66 on: August 13, 2020, 07:02:24 PM »
Binaries for v3.1.0 are finally released! I tried to put a bit of structure in the ton of changes that I made during the last weeks. I hope its understandable or helpful (best case: both!). In any case, it's worth reading IMHO.
Edit: Idiot. Forgot to mention the most important change since the last beta release: MIDI In finally works. I had yet another stupid copy paste error, that's now fixed.

@AstRii
Interesting that some MIDI files are "out of the box" synchronized with the audio version, or almost synchronized. I expected that you'd always have to adjust it note by note. This actually motivates me to try it one day...

Kind regards,
Max
« Last Edit: August 13, 2020, 07:10:34 PM by Max »

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #67 on: August 14, 2020, 01:04:06 AM »
It's definitely worth the try, for example Uptown Funk by Bruno Mars i downloaded online was perfectly synced. Today i also downloaded Imagine Dragons - Monster, which needed only about 10 minutes of adjusting. I'm planning to release the songs, when i will have more of them :)
Also i noticed some strange behavior of the Syntherrupter:
On this video i scoped the interrupter signal for the coil.
You can see at the start i set it up to maximum ontime of 20us (Those blue cursors on the scope are 20us apart). Which seems to be working fine, but at about 20 seconds into the video, i changed the duty cycle.
And as you can see, the ontime of 20us is no longer applied. Seems weird to me, i thought the maximum ontime there is to set the maximum limit that the coil will never exceed, even if the maximum duty cycle is high.
I thought, that when the coil has the chance(allowed duty cycle) to use the maximum ontime, it will use it, otherwise it will restrict the ontime to keep the duty cycle limited.
Yet here it seems like it totally ignores the maximum ontime and it's only focused to keep up with the duty cycle.
Am i missing something?
« Last Edit: August 14, 2020, 01:07:33 AM by AstRii »

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #68 on: August 14, 2020, 02:12:16 AM »
Good idea with the MIDIs. Actually, TMaxElectronics and I are working on a collection, too.

Considering your video: you’re not on the latest firmware; I changed the naming of the values in your video because they’re quite misleading. What you set on the MIDI Live page is the value a single note will have if it’s velocity and the channel volume, etc are at 100% (that’s why I called it „max ...“ first). But since ADSR parameters allow volumes of more than 100% those values can be exceeded. In newer firmware versions those values are called „Note Ontime“ and „Note Duty“. I‘d have to check the release notes to see in which beta I changed it. Somewhere in the last two weeks.
Why do you have two sliders? Well, the Syntherrupter will use whatever value will result in the highest ontime. Why would you want that? Explanations below.

What you thought it was is what you specify under „Settings->Coil limits“. The values on this page are the ones that wont be exceeded under any conditions. You might want to read the first post of this topic again; I rewrote it a couple weeks ago, aiming to explain this a little more. It‘s not complete, though. If you did read it and misunderstood it, I‘ll happily take suggestions on how to make it more clear.

(Here come the more in-depth explanations about what the settings and the Syntherrupter does)

Finally, let me talk about the note duty setting on the MIDI Live page (NOT the duty limit under Settings->Coil Limits!). The idea was that if you have a pulse skipping driver like UD2.9, UD+, SimpleDriver, etc, low notes could use this. High notes easily sit at around 1000Hz, where 100us already equal 10% duty. But for low notes, in the 100Hz range, 100us is nothing (1% duty). For this reason I thought it might be useful to let them play at a constant duty instead, f.ex. 5%, which would give 500us ontime at 100Hz. This will give a lot more intense streamers.
On the other side, you don‘t want high notes playing at the same duty as low notes; it makes more sense to play them at a constant ontime, especially since the ontime determines the note volume.
Combining these two things together gives us the following: low notes should play at constant duty, because constant ontime doesn‘t give intense streamers. High notes should play at constant ontime, because constant duty wouldn‘t allow intense streamers and the volume would change too much from note to note*. When should it change between both modes? Quite simple: at the point where constant ontime and constant duty would lead to the same settings. Let‘s take your example of 20us and 2.8%. We want the frequency at which 20us would give 2.8% duty. Since f * t_on = d => f = d / t_on = 2.8e-2 / 2e-5s = 1400Hz. This means that notes above 1400Hz will play with 20us ontime (leading to duties higher than 2.8%), and notes below 1400us will play at 2.8% duty (leading to ontimes higher than 20us). If you change the volume mode from Auto (what i just described) to „relative“, all notes will play at constant duty, and in „absolute“ mode all notes will play at constant ontime. Note that this button will disappear in future versions. If you look again at the math above, you might see that a duty setting of 0 implies that all notes are played at constant ontime (the crossover frequency would be 0Hz which is lower than any note), and a ontime setting of 0 implies that all notes play at the given duty value (crossover would be at infinity, which is slightly higher than most tones). Therefore a additional mode button is not required and you can leave it on auto.

Just as a reminder: everything I described in the last paragraph, about constant duties, ontimes etc happens within the range of the coil limits mentionned above. The coil limits are independent and applied at the very end of the „chain“**. The values discussed here are the starting point. Then they are multiplied with the note velocity, channel volume, channel expression, maybe stereo (all the values ranging from 0 to 1). On top of this are the time critical effects, namely ADSR and modulation. After all these effects are applied the „MIDI stuff“ is done. All commands and settings are applied; we can calculate total duty at this very moment, and, if exceeding the limit, multiply the ontime of every note gets with the same factor so that the total duty equals to the coil limit. After this the „final“ ontimes are checked against the coils max ontime limit.
All of this happens independantly for each coil.

* This is less of an issue with low notes. At higher ontimes the volume doesn‘t really increase anymore; only the sound gets „fatter“.
** I know I should draw a block diagram of the whole thing... and write a manual for it. But time...


Hope this cleared things up!
Max
« Last Edit: September 27, 2020, 12:50:42 PM by Max »

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #69 on: August 15, 2020, 12:28:18 PM »
Important! Do not update to v3.1.0. Something went wrong when generating the Nextion release files; they will not work. As of now this means you won't be able to upload a working firmware again over USB. You'll have to do it via the SD card. This will change in the next release. For now, just stay on v3.1.0-beta.6

Edit: Fixed. https://github.com/MMMZZZZ/Syntherrupter/releases/tag/v3.1.1
I released it as new version because I changed the Tiva Firmware. As I described above it wouldn't have been possible to recover from the bad Nextion firmware by updating to a new one over USB (only via SD card) because you can't enter the update mode. With this release the microcontroller automatically enters update mode if the nextion firmware doesn't respond within 3 seconds.

Sorry for the inconvenience.
Max
« Last Edit: August 15, 2020, 04:51:36 PM by Max »

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #70 on: August 16, 2020, 05:13:19 PM »
The thing that never ever should occur has occured. AstRii found a critical bug in Simple Mode that causes WAY too long output pulses. It is almost the exact same issue I had with v1.0, and that I fixed after lots of work in v1.1. Although I'm sure it was gone, it's back for some reason. Probably since v2.0.
If you drastically reduce the BPS, e.g. from 1000Hz to 100Hz, the output can go high for a whole period, meaning for miliseconds (!). Since it is a hardware bug* none of the safety measures can prevent it.

Until I get it fixed, don't use Simple Mode. MIDI Live mode generates signals in a completely different way. Therefore it can't have this bug.

* Some timer registers don't synchronize the way they should. That causes glitches when making bigger jumps which happens if you sweep quickly though a frequency range. That's why it took me so much time the first time to "fix" it (rather mitigate it). I'll replace the whole stuff by the same code I use for the MIDI Notes. That's a complete overkill but at least it's been reliable so far.


I'm very sorry for this.
Max

Offline Mads Barnkob

  • Administrator
  • High Voltage Expert
  • *****
  • Posts: 1516
  • Karma: +27/-0
  • Denmark
    • View Profile
    • Kaizer Power Electronics
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #71 on: August 17, 2020, 08:25:24 AM »
The thing that never ever should occur has occured. AstRii found a critical bug in Simple Mode that causes WAY too long output pulses. It is almost the exact same issue I had with v1.0, and that I fixed after lots of work in v1.1. Although I'm sure it was gone, it's back for some reason. Probably since v2.0.
If you drastically reduce the BPS, e.g. from 1000Hz to 100Hz, the output can go high for a whole period, meaning for miliseconds (!). Since it is a hardware bug* none of the safety measures can prevent it.

Until I get it fixed, don't use Simple Mode. MIDI Live mode generates signals in a completely different way. Therefore it can't have this bug.

* Some timer registers don't synchronize the way they should. That causes glitches when making bigger jumps which happens if you sweep quickly though a frequency range. That's why it took me so much time the first time to "fix" it (rather mitigate it). I'll replace the whole stuff by the same code I use for the MIDI Notes. That's a complete overkill but at least it's been reliable so far.


I'm very sorry for this.
Max

There will always be errors in software, especially when you have such a wide range of user inputs available.

Good job keeping the development going at this pace, but always give your self some time to let it all settle. I do not know how much about software development you know, but using sprints and iterations is a great way to implement one function at a time or fix one bug at a time. The idea is to work on very small scopes, but take breaks in between to allow for bug finding/tracking

I received all my parts for the syntherupter and last night I ordered a enclosure for it, it will be pretty epic :)
http://www.kaizerpowerelectronics.dk - Tesla coils, high voltage, pulse power, audio and general electronics
https://www.youtube.com/KaizerPowerElectronicsDk60/join - Please consider supporting the forum, websites and youtube channel!

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #72 on: August 20, 2020, 01:06:00 PM »
Hey guys!
I filmed a video about how to create playable MIDI files for a (DR)SSTC. Of course, i'm no musician, this is probably not a correct way of doing it, but it has worked for me to edit almost any song i wanted to be playable on an SSTC.
Max's Syntherrupter handles MIDI very well, so perhaps this can help some of you to edit songs which you wanted to play :)


 


Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #73 on: August 20, 2020, 02:02:06 PM »
Thanks for the compliment!

I don‘t agree with your statement that usual DRSSTCs aren‘t able to handle multiple voices. 4 voices should be easily possible on most coils. I can only recommend you to play around. At least in MIDI Mode the safety measures are working, so there‘s no risk in playing 8 or more voices on your coil.
The reason you hear most tesla coils playing only a single voice is because there haven‘t been many polyphonic interrupters available.
Edit: The video embedded in my first post here (I Want It All) has multiple voices (around 6 I think), and the duty limit was ~10%. The ontime might not have been high enough for actual streamers, but still.

Another note considering MuseScore: it is a great source for sheets music but not so much for high quality MIDIs. The reason is that they‘re  computer generated based on the sheets and often lack nuances (every channel plays at the same, constant volume). Additionally they had to put the download function behind a paywall.
My top sources for quality MIDI files are:
  • http://bitmidi.com
    Based on a 3GB MIDI collection someone posted on reddit. Of course it contains a lot of junk, but a lot of good stuff, too - from classic symphonies to Despacito. Search function ist not great.
  • https://mydwn.cx/kar-n/
    This is the file server behind miditheka, which is pretty shitty to use (tons of ads and waiting times). However the collection is great. Well sorted, and with MIDI files I haven‘t found anywhere else.
  • http://en.midimelody.ru/
    A smaller collection, mostly high quality. Again with some files I couldn‘t find elsewhere.
  • http://www.vanbasco.com/
    This website has a search function for MIDIs. If you can‘t find a MIDI file in the collections above, sometimes this site can help you to find a site that google would never find.
Kind regards,
Max
« Last Edit: August 20, 2020, 02:07:40 PM by Max »

Offline AstRii

  • High Voltage Experimenter
  • **
  • Posts: 81
  • Karma: +2/-0
  • Czech Technical University in Prague
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #74 on: August 20, 2020, 04:18:31 PM »
You're right, that was an understatement from me, DRSSTCs are and definitely should be able to play polyphony. That was a mistake from me. For now i only do not do polyphony since my coil can only handle low ontimes, and i don't want to push it too hard.

Offline davekni

  • High Voltage Senior
  • *****
  • Posts: 560
  • Karma: +31/-0
  • Physicist, engineer (electronic), and hobbiest
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #75 on: August 21, 2020, 03:25:17 AM »
I ran 3-note polyphonic on my DRSSTC for a neighborhood July 4th (Independence Day) show, with one song at 4-notes.  I haven't figured out the transfer function of pulse-width to sound-impulse well enough, especially how it varies by time-proximity of pulses.  Most of the songs I tried sounded worse with 4 notes than 3.  Some were best with 2.  One item on my long list of projects is to measure sound vs. pulse width and spacing to design better polyphonic algorithms.  Probably depends heavily on coil details and ground target(s).  One-note-at-a-time always sounds good, so is the safe bet besides being simplest.
David Knierim

Offline Zipdox

  • High Voltage Experimenter
  • **
  • Posts: 89
  • Karma: +1/-0
    • View Profile
    • Zipdox
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #76 on: August 22, 2020, 10:21:42 PM »
I recommend LMMS for composing, it's free and open source: https://lmms.io/

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #77 on: August 22, 2020, 10:59:55 PM »
Warning: I'm prbobaly* too tired for writing a readable, structured post.  *typos not intneded ofc.  ;D

@Mads: I completely forgot to reply to your answer, sorry. I don't follow a particular developpement strategy. When I start working I usually have a list of features I want to implement which I do one by one. When I've finished "enough" features I start with testing them. This usually means that I use them with a couple different MIDI files, and try to verify the edge cases, too. After debugging them the cycle begins with the remaining features of my todo list. If I have enough verified features together which I think you should/want to have, I create a release.
Yes there will always be bugs that I haven't noticed or things that are missing. The idea is that I get the "core" extensively tested so that I (and you) can have confidence to it. This allows me to work on more complex features that are more likely to have bugs without having to fear I'll kill someones coil. It also means that I don't have to verify each release for hours with my scope attached to it, doing all kinds of duty, pulse with, ... measurements.
And it means that it's no risk for you to try any new (beta) release; worst case: unusable, but not dangerous.
So IMO it's no big deal if there's a bug in the UI, the MIDI processing, etc. Happens. But the core really shouldn't have had one - not such a severe, frequent and known(!) one. I can't remember enough details about the verification of v2.0 to find the reason how it happened. The only thing I can say is that I didn't test Simple Mode afterwards anymore since there weren't any changes (thus no chance for me to notice it after failing to notice it in first place). With v3.0.0 MIDI Live Mode got its own, new "core" that allowed polyphony, which again was heavily tested before releasing. And at least in that case it seems like I've done my job right. No critical bugs so far, only a minor issue with the duty limiter which reduced the ontime too much.

@davekni: That's something I wanted to do, too. Please keep us updated if you have any data about the sound impulse!

What I started in the meantime is by far the biggest change to the microcontroller code I've done so far. Basically I reordered and modified everything. GitHub says: 43 files modified, 2250 new lines, 1522 lines removed so far. The funny thing: pretty much all of this happens "under the hood"; nothing you'd notice. Maybe performance will even be a little bit worse.
And why then? Well the previous structure was somewhat limited, especially not capable of running different modes at the same time (more about that below). Quite a few parts had grown to the point where they really should've been rewritten.*
Sooo what will you notice once I get this done? The critical bug in Simple Mode will be gone forever. Aaaand you can keep modes running in background by holding the Return button on the touch screen. Why would you want to keep Simple Mode running when switching to MIDI Live mode? No reason. But I have ideas for new modes that would be interesting to run in parallel f.ex. with MIDI Live Mode:
  • MIDI File Mode: playing MIDI files from an SD card. Set up MIDI Live Mode and switch to MIDI File Mode to
  • Lightsaber Mode (thx Netzpfuscher for the great idea): Use a lightsaber with an accelerometer to make Syntherrupter generate the according sound effect. You have to run this while playing Star Wars MIDIs!
  • (far future:) Audio In: convert an Audio signal to an Interrupter signal
And just for the very curious people: How is this archieved? Previously each mode ran its own loop that kept the output signals for every coil up to date. While the actualy configuration of the hardware was encapsulated in a separated class, each mode had to call this class on its own and feed it with meaningful data. Since this loop is specific for each mode - and because it's a loop - it's not possible to have two modes generate output signals at the same time.
However now there's a common "core" for all modes which basically contains the polyphonic signal generation from the MIDI Live mode. Instead of being tied to MIDI Live Mode and its MIDI notes, the core presents a uniformed interface for all modes. Every mode can add or remove a tone. This separation allows that all modes can independantly of each other add tones to the common core and thus run "in parallel". Additionally this "core" runs for each coil independantly. That's most of the explanation why so much of the code base changed: migrating from "one loop per mode that handles every output" to "one loop per output that handles every mode" is like transposing a matrix. Same data but pretty much everything got a new place.

* Footnote to make this post even more unreadable: Remember when I said that you can't use direct MIDI In and MIDI over USB at the same time? That was because both UARTs ("Serials" for the Arduino fans) wrote to the same buffer. Why? because it was easier. Another "easy" thing that was not good: the whole UART hardware interfacing (interrupt handling, ...) was part of the MIDI class. All of this got replaced by a clean UART class, where each UART object has its own buffer. The MIDI class has a list of all buffers that could receive MIDI data and handles each of them independantly. No more mixing of data that doesn't belong together.


Kind regards,
Max
« Last Edit: August 29, 2020, 08:56:47 PM by Max »

Offline Max

  • High Voltage Technician
  • ***
  • Posts: 101
  • Karma: +10/-0
  • "With the first link, the chain is forged. [...]"
    • View Profile
    • My Youtube Channel
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #78 on: August 25, 2020, 01:47:53 PM »
Long story short: New code is working. And I have a question.

And here's the story:
  • Audio quality was a bigger concern for me because the code got quite a bit more complex. So I spent some time on testing and optimization. Turned out to be okayish, but honestly not as good as I wanted. The surprise for me: it's pretty much exactly as good as the old code (v3.1.1). I never really noticed it but when you're simply holding a chord on a keyboard, it's not a "consistent" sound; it sounds more like if you have some interference. I already have ideas on how to improve this. Overall it will cost more CPU time but the load gets better distributed over time, preventing the time critical sound generation from being blocked/delayed.
  • Although I pretty much copied the signal generation from the well-working MIDI, duty limiting got more complex. What previously were less than 10 lines of code are now almost 40 lines. After lots of refining it seems to work well but maybe I'll replace it in the future with another limiting method.
  • Oh, something I forgot in my previous post: I implemented basic support for noise. I mean, controlled noise like for percussion. It's still completely untested and honestly I'm curious if this works at all.
  • Although I have archieved the main goals for the redesign: new core, Simple Mode bug gone, maintained audio quality, I'll take more time til a release. I haven't verified anything with an oscilloscope yet and I feel like this needs A LOT of testing to make sure I catch every possible edge case, glich and bug. And I'll only start with testing after I've finished the major changes mentionned above.
Finally my question: What radio transmitters can you recommend for the lightsabers?
  • It should be easy to use. I had a look at the nRF24 but that thing is a beast! Way too much to configure to get the thing working. Yes, there're Arduino libraries but I don't have an Arduino and I don't want to migrate a library to a new platform. Something like the HC-05.
  • Be able to work "reliably" near a tesla coil. I honestly have no idea how much of a problem this will be or not. I hope it wont - especially since I do not need a high data rate. even the basic 9600baud/s should be more than sufficient.
  • It would be great to have one receiver for multiple transmitters. Two, three people with lightsabers, each one sending its data, and one receiver connected to the Syntherrupter.
  • Easy to obtain and not too expensive. Of course this is a feature everyone with a Syntherrupter should be able to get and I honestly don't plan to implement 10 different receivers. Since the Syntherrupter itself is by no means a cheap device I really want to keep the price for additional features as low as possible. Some transceivers cost 10$ or more which sums up pretty fast, considering you need at least two, and possibly want 3, 4, ...
So far my candidates are RFM69 and Si446x, but not sure about either one. Looking forward to hear your thoughts!

Btw. I'm seriously thinking about how I could make the Syntherrupter more affordable. The plan would be to get the cheap chinese version of the display and order only the TI microcontroller instead of the whole developpment board. The downsides: you have to order the display over a third pary firm because they're available in china itself. This makes much more sense if you order a couple of them. They'd probably be <20$ each, possibly getting the BOM costs for 1 Syntherrupter below 50$.
Programming the microcontroller wouldn't be a huge issue since it comes with its own bootloader (looks easy to integrate).
Oh, and ofc this would require the design of a custom PCB for the microcontroller... So nothing for the next weeks, but possibly for the future.


Kind regards,
Max

Offline Hydron

  • Administrator
  • High Voltage Engineer
  • *****
  • Posts: 349
  • Karma: +11/-0
    • View Profile
Re: Easy to build Polyphonic MIDI Interrupter
« Reply #79 on: August 25, 2020, 03:18:21 PM »
As for cheap transceivers, I would look into the ESP8266/ESP32 wifi based controllers. They are surprisingly cheap and wifi has no tesla coil issues - i've run a wifi link to a scope sitting ontop of the toroid of a running coil :)

High Voltage Forum

Re: Easy to build Polyphonic MIDI Interrupter
« Reply #79 on: August 25, 2020, 03:18:21 PM »

 


* Recent Topics and Posts

post Re: type of driver
[Dual Resonant Solid State Tesla coils (DRSSTC)]
oneKone
Today at 01:27:26 AM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
Zipdox
September 30, 2020, 11:47:21 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 30, 2020, 08:09:38 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
davekni
September 30, 2020, 07:28:50 PM
post Re: Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Teravolt
September 30, 2020, 06:25:16 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
klugesmith
September 30, 2020, 04:26:02 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 30, 2020, 12:08:05 PM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
klugesmith
September 30, 2020, 08:39:53 AM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
davekni
September 30, 2020, 05:39:53 AM
post Re: Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
davekni
September 30, 2020, 05:32:12 AM
post Re: Little Bee B Field / Current Probe
[General Chat]
Weston
September 30, 2020, 05:28:35 AM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
Weston
September 30, 2020, 05:24:48 AM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
Hydron
September 29, 2020, 09:50:02 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
Zipdox
September 29, 2020, 09:24:24 PM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
flyglas
September 29, 2020, 09:12:52 PM
post Re: Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
octopus1
September 29, 2020, 08:52:12 PM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
Hydron
September 29, 2020, 08:13:43 PM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
klugesmith
September 29, 2020, 08:08:22 PM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
flyglas
September 29, 2020, 07:45:22 PM
post Re: Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
klugesmith
September 29, 2020, 07:23:27 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 29, 2020, 06:46:33 PM
post Re: Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Hydron
September 29, 2020, 05:23:17 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General Chat]
KenM_Whitearc04
September 29, 2020, 03:15:57 PM
post Voltage tripler for my medium DRSSTC
[Dual Resonant Solid State Tesla coils (DRSSTC)]
octopus1
September 29, 2020, 02:40:28 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
davekni
September 29, 2020, 05:44:51 AM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
plasma
September 29, 2020, 04:13:43 AM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Max
September 28, 2020, 11:48:25 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 28, 2020, 09:56:15 PM
post Re: Easy to build Polyphonic MIDI Interrupter
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
futurist
September 28, 2020, 09:52:47 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
davekni
September 28, 2020, 09:50:44 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 28, 2020, 09:16:53 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
Zipdox
September 28, 2020, 09:09:46 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 28, 2020, 09:03:23 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
Zipdox
September 28, 2020, 08:50:33 PM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
Zipdox
September 28, 2020, 08:49:09 PM
post Re: Half bridge sstc help with troubleshoot
[Solid State Tesla Coils (SSTC)]
costas_p
September 28, 2020, 08:40:11 PM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
klugesmith
September 28, 2020, 07:36:45 PM
post Re: DRSSTC Tuning for Music vs Big Sparks?
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Uspring
September 28, 2020, 07:07:29 PM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
Zipdox
September 28, 2020, 06:41:56 PM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Zipdox
September 28, 2020, 06:28:50 PM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
klugesmith
September 28, 2020, 05:14:51 PM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Max
September 28, 2020, 04:44:56 PM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
TMaxElectronics
September 28, 2020, 10:50:31 AM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
plasma
September 28, 2020, 09:15:09 AM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
Zipdox
September 28, 2020, 09:09:45 AM
post Re: type of driver
[Dual Resonant Solid State Tesla coils (DRSSTC)]
Mads Barnkob
September 28, 2020, 08:39:30 AM
post Re: Stroboscopic photography & motors
[Digital Compact Camera]
klugesmith
September 28, 2020, 08:16:46 AM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
Zipdox
September 28, 2020, 01:27:07 AM
post Re: Polyphonic Interrupter with STM32F103C8T6 (Bluepill)
[Computers, Microcontrollers, Programmable Logic, Interfaces and Displays]
TMaxElectronics
September 28, 2020, 01:14:46 AM
post Re: Rogowski current probe
[Laboratories, Equipment and Tools]
flyglas
September 28, 2020, 12:30:58 AM

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 
SimplePortal 2.3.6 © 2008-2014, SimplePortal