I have an Arduino Mega 2560, and am having it powered by usb. I also have a color organ that I am adding into this project, as to determine the levels of frequencies from audio it receives. However, its output that i'm looking to take data from as Analog In will be at maximum +6.5v at its highest intensity.
Obviously this is not a good thing, as I have poured over other forums trying to see if the Arduino can take higher voltage than 5v. Now, I've seen many people get answers to that effect, that no you can't go higher than 5v. But, I haven't the slightest idea how to limit that, or change it.
In short, I'm needing some help figuring out how to limit the voltage to 5v max. Either by a voltage regulator, transistor, resistor, anything. I don't know what the best course of action would be, and would very much so like someone to point me in the right direction.
use a voltage divider circuit and connect your analog input between the two resistors. This will transform you 6.5V input into R1/R2 * 6.5V on the analog input.
blh64:
use a voltage divider circuit and connect your analog input between the two resistors. This will transform you 6.5V input into R1/R2 * 6.5V on the analog input.
Eyy! Thank you! I'll start researching this immediately, and begin construction as soon as I can. Thank you for the tip there friend!
Another thing to protect your pins is a current limiting resistor on the input. 10k will do in this case. Then if your input voltage goes to say 10V your pin is still safe as the clamping diodes handle the excess. Of course voltages >5V still can not be measured, the signal becomes clipped.
In your case a voltage divider is the best way to go; choose the value of the upper resistor high enough and it doubles as pin protection.
For frequency analyses: the highest sampling rate the Arduino's ADC can do is just under 10 kHz, so you can measure frequencies of no more than 5 kHz. You can make your life a lot easier by using a chip like the MSGEQ7 Graphic Equalizer Display Filter.
Hey guys! Thanks again for your suggestion! I just tested out the voltage divider circuit on my breadboard, and i had the most favorable results EVER! Everything was showing under 4.5v, which I think is perfect for the board. (Want to give the arduino some breathing room in the case something unforeseen happens) Thanks to your guy's suggestion, I'm making progress, and getting the project done!