If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #2424
Joined: Tue Oct 06 2009, 08:02AM
Location:
Posts: 17
Hi all,
Ive writen an arduino sketch that reads MIDI data on the serial input and uses it to generate squarewaves of the apropriate frequency (it also uses the velocity byte to set the pulse width) and i'm using it as an interrupter on Audio:Deviant's coil.
This simple monosynth works perfectly on the bench but as soon as I power up the coil the midi line picks up so much interfearance that it disrupts the communication.
The midi data is being sent from my interface, over a short butchered midi lead, through a 4n25 optocoupler, to the arduino. I found good direction on midi>arduino here
The arduino's signal is then inverted twice (as a kind of buffer) before being sent down a coax cable to the coil.
Ive tried grounding the shielding of the midi lead to AC ground with maybe slight improvement but still unusable. If I hard code a tune into the arduino (no midi control) then it plays fine and drives the coil nicely.
Ive seen on these foums that a few of you have run coils from midi before, how did you get round this issue?
Registered Member #2292
Joined: Fri Aug 14 2009, 05:33PM
Location: The Wild West AKA Arizona
Posts: 795
Try moving the arduino far away from the tesla coil and also put it in a metal box and run it from an isolated power source such as a battery, and one last thing replace the coax with fiber.
also take a look at steves old setup
Hope this helps.
Also if it's not to much to ask may I see your arduino code I have been working on almost the exact same thing for my DRSSTC and I am not the best at writing software.
Registered Member #2424
Joined: Tue Oct 06 2009, 08:02AM
Location:
Posts: 17
Thanks guys,
The link between the Arduino and the coil is ok and rejects enough inteference to work (for the moment). We will eventually replace it with fiber.
If I hard-code a melody into the arduino it plays through the coil perfectly.
The problem I'm having at the moment is with the midi data into the arduino. The midi line is opto isolated from the arduino and coil so im not sure the fiber will have a massive advantage. We need to be able to connect an unmodified midi device to the system.
where should I be grounding the shield for the midi line?
I'll try running a longer coax so that the midi controller can be further away from the coil...
Goodchild, I'll post up the source code for you when I get home.
Registered Member #1134
Joined: Tue Nov 20 2007, 04:39PM
Location: Bonnie Scotland
Posts: 351
Without a doubt, fiber optics is the way to go with these. Any amount of wire will act like an antenna, and cause all manner of badness with µC's, the worst being outputs that go high and stay high, killing FET's
My MIDI interrupters run on Arduinos too, but the signal is sent down Toslink to the DRSSTC's
I just showed a group of friends these musical coils the other day, so I'm still basking in the warm glow of extra geek points
Registered Member #1232
Joined: Wed Jan 16 2008, 10:53PM
Location: Doon tha Toon!
Posts: 881
First of all, put the micro board in a metal box to shield it from radiated EMI. Once this is done, all you need to worry about then is conducted EMI...
From a conducted EMI point of view the micro box has at least two cables going into it: The MIDI cable from the MIDI master, and the cable coming from the TC. Both of these will pick up interference and carry it inside the micro's shielded box. If you are using an external power supply for the micro then this is a third cable that will also pick up EMI and carry it towards the micro. All potentially leading to either a software crash or corrupted MIDI data.
The MIDI cable already uses an opto-isolator so unless you are breaking down the isolation barrier with several kV, I would suspect that this cable is not the problem
That leaves the interrupter cable from the TC and the power connection. You can easily investigate the potential of conducted EMI down the power cable, by powering the micro from a battery inside its shielded box. If this works, then either stick with the battery power or put a filter, ferrite chokes etc on the power feed cable.
As for the cable to the TC, this is by far the most likely offender because it goes close to the operating TC's electric and magnetic fields. As others have suggested an optical fibre connection will almost definitely fix this problem for sure.
If you replace the cable from the micro to the TC with several metres of optical fibre, you can move the micro, it's power supply and all of the MIDI cabling well out of the interfering fields from the TC.
If you are set on sticking with a wired connection, then look at filtering. In particular use a tightly twisted pair, and wrap this wround some honking great big high-permeability ferrite cores at each end of the cable. These common-mode chokes at each end won't effect the wanted differential-mode signal from the micro to the TC, but they are just about as good as you can get for blocking common-mode interference going in the opposite direction!
Just some thoughts from someone who used to work in EMC approvals. Hope this helps,
Registered Member #33
Joined: Sat Feb 04 2006, 01:31PM
Location: Norway
Posts: 971
In addition to what the other posters here said, you might want to change your optocoupler for something more suitable.
I'll quote myself from an other thread:
I have also used common optoisolators for MIDI, but this has given me a lot of trouble. It seemed to be working well together with some MIDI controllers, but would not work, or only work intermittently with others. The recommended PC900/6N138 are darlington optocouplers, so they have a much higher current transfer ratio than common optocouplers. Common optocouplers will work fine together with stronger midi outputs, but with weaker ones it will work intermittently or not at all. I tried adding an external transistor to the optocoupler, to make it into a darlington, and while this improved the situation, it still only worked with about half of the devices I tested it with.
I suppose the low gain of the 4N25 could make it more noise-sensitive too. The typical current transfer ratio of the 6N138, which is the usual choice for MIDI, is 1100%. Compare this to 50% for the 4N25.
Registered Member #2424
Joined: Tue Oct 06 2009, 08:02AM
Location:
Posts: 17
Thanks to all, I've ordered the fiber optic and some 6n138s and will report back.
Here's the source code to my arduino although:
THIS VERSION HAS STILL GOT A BUG!!!!
Ive realised that if the pulse width is longer than the interupt timer i'm using then the interupt is missed and the frequency drops a little. this version works but produces notes that are out of tune at longer pulsewidths. I'll repost with a better version when I work out how to stop it.
Apologies for the messyness of my code but it's still work in progress :)
You need to install the MIDI library from here for this to work
I also used code from the "melody" example that comes with the arduino software.
EDIT : CODE REMOVED, PLEASE USE IMPROVED VERSION BELOW.
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.