Hawes Amplifier Archive |
|
FET Preamplifier FAQs, Part 6 |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Questions About Arduino Microcontroller InterfacesQUESTION. I need to connect your preamp to an Arduino microcontroller. The Arduino input can't exceed five volts. I also want to isolate the Arduino from the outside world. How would I do this? (Question from Peter Laucks, 2010) ANSWER. Consider an opto-isolator. You could buy a dedicated isolator. (Example: Vishay CNY75A or 83536 from Mouser.) But the easy way is to buy the infrared emitter and detector kit from Radio Shack. The kit includes both an emitter and detector. The emitter is actually an LED that puts out invisible infrared light. The detector is an infrared phototransistor. (Kit contents actually vary. Some kits might substitute a photodiode for the phototransistor. The diode has faster response, but isn't as sensitive. For our purposes, either the diode or transistor should work.) The cost for the Radio Shack kit is only about $3.49. This DIY optocoupler can safely couple a guitar to the Arduino The circuit that I suggest has three stages. The first stage Q1 is our JFET preamp. I've dropped off the output coupling capacitor and load resistor, because we don't need them this time. This stage provides a high impedance to the guitar and amplifies the signal just slightly. The second stage Q2 has its own coupling capacitor. This stage drives D1, the infrared LED with our guitar signal. A battery or small power supply operates these first two stages. The Arduino powers the third stage. Notice that the Arduino circuit has no electrical connection to the LED circuit or preamp. This lack of connection is what we mean by isolation. Our third stage Q3 is a phototransistor. For the sake of linearity and response speed, this stage is slightly degenerative. Q3 has a gain approaching 0.99. The LED stimulates the phototransistor to send the guitar audio to the Arduino microcontroller. Your first test should be to confirm that the detector works. The book Getting Started with Arduino has the code and pictorial diagram. See pages 62 to 67. Never mind that the book uses a CdS sensor. (That would work, too, but CdS is laggy and wouldn’t reproduce music well.) You can test just the detector by aiming a TV remote control at it. Just click any button and look for a response. Make sure that you point the remote at the end or "head" of the detector. Notice Different Power Voltages. In my circuit, I’m running the LED amp on nine volts, but the detector on five volts. That doesn’t matter, because the two amps don’t connect electrically.
QUESTION. Do you have an opto circuit to isolate an ULN2004 stepper drive chip from the Arduino? (Question from Peter Laucks, 2010) ANSWER. Yes! I assume that you want the Arduino to power an opto that drives the motors through Darlington array ULN2004. See the schematic below. Here’s the circuit description: The Arduino digital output pulses an infrared LED that's in series with a 220-ohm, half-watt resistor. (One LED for each motor coil.) The resistor reduces the Arduino current to a safe value for the LED. Be sure to use a half-watt resistor here. The LED could be active-high or active-low. (The drawing below shows both versions of the circuit.)
You might prefer to use an opto array instead of discrete optos. Then I suggest the Vishay 782-ILQ615-3 from Mouser. This part comes in a DIP-16 package and includes four opto-couplers. The LEDs in this package will operate adequately with only 10 mA. Go to Page: 1 2 3 4 5 6 7 Next
|
JFET Preamp Pages
|