The act of converting AC into DC is called rectification.There are two basic types of rectification: full wave, and half wave.Full wave rectification takes 4 diodes and flips the lower half of an AC waveform upside down and superimposes it over the upper half:Half wave rectification only uses 1 diode, and effectively cuts off the lower half of the waveform:The Arduino has a single diode in-line with the power input jack to protect the system against reverse polarity connections. This diode acts like a half wave rectifier.A capacitor after a rectifier smooths off the peaks and troughs of the waveform:If the ripple voltage remains above the minimum level of the voltage regulator, then all will be well. The ripple voltage, however, is a function of the current drawn - the more current you draw the faster the capacitor will discharge and the more ripple you will get.You will be fine running with an AC adaptor at low currents, but there will be a cut-off level where you will start to get glitches and voltage drops on the 5V line when you draw too much current.
So my question is, is that will I need to bias the guitar's AC signal into a positive AC signal instead of a +/- 0-1v or should that not matter? It will be sharing a 9V DC line, so it will still have power, I just don't want the guitar's AC signal to mess up my arduino.
For the AC over DC, that makes me feel better about whether or not it would fry my arduino. The only thing though, I was unable to effectively do capacitive coupling for the guitar's signal. When I would apply the DC to it, it would just stop any sound. I was using a small cap (don't have any 1 farad non-polarized lying around) so that may be the issue, but if not, have I then done something wrong?
I would prefer to utilize a single mono cable (They are easy to come by, and if anything happens on stage I can easily swap it out; To make it backwards compatible without adding a proprietary jack beside the 1/4"; I don't want to use a Stereo 1/4" because I worry a roadie would put a mono in by accident and it would short my 9v to ground/I would have to add short circuit sensing circuitry to my pedalboard, which I find overkill if there is a better solution to just using a mono cable).
Current question: what would be the correct value cap to use for a 9v powered system(I may use diodes to half/full rectify the signal to stay at about 10v then regulate it before the arduino, or figure something out), that also has a min resistance of 8k ohms, max of 25k ohms?
The math for this is fairly simple,
? = R * C? = 5*10-5 s (I got this by inverting 20 kHz, your target value could be different)R = 8000 ? (lowest possible load is the worst case)Solve for CC = 5*10-5 s / 8000 ? = 6.25 nF
I would need 16 bit ADC and DAC at a minimum and would preferably use a 24 bit set,
I don't have a scope unfortunately. And I tried that, but it did the same thing. I think I just can't find the right cap/resistor combination.On my breadboard I had it like this:To pedaboard, Cap leg with resistor to ground, Cap leg to DC power, DC power, DC power to Cap leg, Cap leg w/ resistor to ground, to guitar;and of course common ground between the AC signal and DC power. I tried with smaller caps, but it would just cut out sound, and larger caps in parallel let more sound through, but as soon as DC was applied there was no sound at all, minus an oscillating whine.
I have been considering other cables. *sigh* I have so many mono 1/4 cables as backup, I'd hate to have to switch to another type.As for a midi cable, that is a good idea; but the music I play, we tend to not have any use for midi..(YET! until I build a midi tracker for my guitar, but thats another story).I have considered using a Stereo 1/4 cable. On the tip would be the guitar's signal, ring would have the ground, and the shield would have power.I would swap the ground and power only if it wouldn't make it sound horrible. And all I would need is a short sensing circuit on my pedalboard, basically measuring the resistance between the DC and ground. The arduino would do a test on startup and make sure the resistance is >100 ohms, then enable the DC power. So it could sense a mono cable plugged in instead, and automatically disable the power.But then I'd have to buy some Stereo cables, and they may be less common on stage.
This is the math: | V _________---/ d(0.0)b \---> ^Right over my head.. ha
How would I know which frequency to drown out for the AC? I may be wrong, but I though DC was a low frequency.
How did you invert 20khz into 5*10^-5 ?
And to what scale would I use the resistor to ground the cap?
Since it would be a cutoff for (above?) 20khz, would that alter all sound above it? (fm frequencies for communication between arduinos)
Honestly it shouldn't be over your head. It's true deriving the the RC time constant formula involves calculus. However using it to get a capacitor value in this case only requires solving for a single unknown using algebra. This is only 7th or 8th grade math, and you've demonstrated a grasp of mathematical concepts at least as, if not more, difficult in this thread.
DC is basically zero frequency, but the confusion is really my fault. I'm an EE that doesn't work with audio much. Off hand, I do know that the range of human hearing is kilohertz in magnitude, but I didn't double check the exact range. So for my example in an effort to get something that would yield some fairly easy numbers, I ended up choosing a frequency for the high pass filter that would actually exclude the entire audiable range for most human beings. smiley-red The math is still sound, but you probably want to try something around 20 Hz , 0.05 seconds, instead.The corrected example:? = R * C? = 0.05 s (20 Hz, inverted)R = 8000 ? (lowest possible load is the worst case)Solve for CC = 0.05 s / 8000 ? = 6.25 ?F
It's my understanding that we were discussing overlaying AC on the DC power, not on any of the wires going directly I/O (should never be done because the Arduino microprocessors can only withstand about -0.5 V on these pins). If that is correct, the communication between the Arduinos will be on another wire or using wireless radio. Therefore, barring electromagnetic interference (which can be mitigated if it occurs), this AC signal shouldn't affect the Arduino serial communication by either means.
One thing though I hadn't thought of earlier. FM signals, dependent of amplification power, potential distance will vary. But if its through a shielded wire directly to a reciever, would there be such a distance factor? Or is a 'typically' low distance longer than about 30~ feet?
EDIT:I tried with a few different size caps, and the dc signal still cuts out any sound. I even tried up to 300uf in caps both parallel and series. The only thing that would make sound is when I would have atleast 200uf and be connecting another cap. When the leads would touch it would make a sound kind of like plugging in a guitar. So I think I may be getting closer, but how much higher would I need to go? Or is there another aspect I may be missing?
But the minimum load can be as low as a few hundrew ohms (volume control) or less.The new guitar I am installing this into(hopefully) will have selective bypass resistance which will cut out of the pickups.I forgot to include that info originally, since I was testing it on my currently built guitar.