Adjusting this schematic to remove the two 9v batteries.

Discussion in 'General Electronics Chat' started by Bod, Jun 27, 2019.

  1. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    I am following a guide to allow you to input sound into the Arduino (https://www.instructables.com/id/Arduino-Audio-Input/). It is a pretty simple schematic however it uses two 9v batteries in series. It is all well and good when testing, but in my actual circuit, I don't want two batteries floating around - It uses the batteries to power the Arduino (through VIN) and also to power the chip (I have the TL082).


    How can I get rid of the batteries and use the Arduino's 5V supply? I have a feeling it is quite simple however I can't get my head around it. I can power the Arduino with 12V if need be.

    FO7166GH7HY7X7T.LARGE.jpg

    Thanks,
    Bod
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    5,076
    1,934
    First, it uses the two batteries as a dual supply for the op amps. Audio is AC, and the op amp needs both a positive and a negative power supply.

    So you would have to add circuitry to create a virtual ground and likely need something to create sufficient voltage for the TL082.
     
  3. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    I see.

    Will these batteries have to be replaced? I will assume they do and that is why I want to remove them.

    Is this something that can be used and just have one input supply?
    Virtual-Ground-Inverting-Amplifier-using-Opamp.jpg
     
    Joël Huser likes this.
  4. KeithWalker

    Member

    Jul 10, 2017
    266
    83
    What are you planning on doing with the audio once it reaches the analog input? Are you going to digitize the audio waveform or just detect it's presence? What is the source of the input to the op-amp?
     
  5. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    I am going to process the incoming audio, an like most, adjust LEDs in turn.

    The audio is coming from a mono 3.5mm audio cable.
     
  6. KeithWalker

    Member

    Jul 10, 2017
    266
    83
    If you want to digitize the waveform, this circuit should do what you want. Use the 5 volt supply from the Arduino. The output, with no input signal will be approximately 2.5 volts which can be connected directly to the analog input. Adjust R2 to give a good amplification without clipping.
    This circuit should do what you want. Use the +5V supply from the Arduino. The output will be at approximately 2.5 volts DC. Adjust R2 for maximum gain without clipping.
    TL082amp.jpg
     
    cmartinez and Joël Huser like this.
  7. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    Awesome, I will give that a try!

    Bod
     
  8. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    @KeithWalker
    I am in the process of putting it together. I believe the numbers around the chip are wrong (on the schematic you provided). It says VCC is pin 7 but on the actual TL082 datasheet, pin 8 is VCC. This is the same with the other pin markings.
    It doesn't make that much difference because I am just changing where I put the inputs to the correct pins, just thought I'd mention it.

    EDIT: also, last question, where does the audio go in. I assume that the audio ground goes to the unmarked wire that connects to the - of the opamp. And the audio signal - does that go to the wire below with a label of +5v?
     
    Last edited: Jun 27, 2019
  9. BobTPH

    Senior Member

    Jun 5, 2013
    1,735
    444
    A TL082 will not work with a single 5V supply. You need a rail-to-rail opamp for that circuit to work.

    Bob
     
  10. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    5,076
    1,934
    Maybe a TLV2462 instead, available from Adafruit.
     
  11. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    7,843
    2,208
    In post #6, the corner frequency for the non-inverting bias network is 68 Hz. That's a bit high unless you don't care about the bass frequencies. At a minimum, increase the 0.1 uF bypass capacitor to 1.0 uF.

    Also, please use reference designators in all schematics. There are two 0.1 uF capacitors on the schematic, and now the TS has to guess which one I mean.

    Also, the inverting input coupling capacitor creates a high-pass filter with a corner frequency of 1.6 kHz. That is even worse for bass and midrange frequencies. Better to increase both capacitors to 10 uF.

    ak
     
  12. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    Thanks for all the replies,

    I have just tried it out and it doesn't really work. Before I go for the TLV2462 because they are quite pricy, especially in a DIP package, is there any other circuit with the TL082 I can use that will do the job?

    Bod
     
  13. BobaMosfet

    AAC Fanatic!

    Jul 1, 2009
    634
    149

    There isn't much to understand. The two 9V batteries are in series, and are supplying 18V. +9 and -9, for true A/C operation of the amplifier. You cannot just use the 5V of the arduino.
     
    Last edited: Jun 27, 2019
  14. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    They are providing a +- 9V supply, so in series.

    And how should I do this though - it seems like components are connected in the middle of both of them, which is confusing me as to how I should use a wallwart supply.

    Bod
     
  15. Bod

    Thread Starter Member

    Sep 18, 2016
    234
    6
    I know it is very crude but is this what you mean?

    FO7166GH7HY7X7T.LARGE.jpg
     
  16. MrChips

    Moderator

    Oct 2, 2009
    18,703
    5,941
    1) Eliminate the batteries and use the 5V supply.
    2) Select an opamp which will work on a single 5V supply.
    3) Select the appropriate input and output bias voltages.

    I can provide more details when I get the chance to examine this more closely.
     
  17. BobaMosfet

    AAC Fanatic!

    Jul 1, 2009
    634
    149
    Why is it confusing (see my earlier post). You have +9 and then -9. A range of 18V.
     
  18. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    5,076
    1,934
    Depending on why your processing sound in the Arduino, there are envelope follower circuits available. You can get involved in precision rectifier circuits, bipolar supply op amps an filters.

    But if all you need is coarse following of the audio signal, then I have this project on the site. The professionals will tear it apart. Some will say it doesn’t/can’t work. But I’ve been using it for 10 years. The linked project even has an alternative circuit.

    I present it as is. It works with a single side supply op amp. And the published versions give you a 0V to 4V output, sufficiently wide to process audio by the Arduino. I’m working on replacing the LT1013 with a TLV2462, which has a rail to rail output.
     
    Joël Huser likes this.
  19. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    5,076
    1,934
    What do you consider pricey?

    It’s less than a cup of Dunky’s...

    (New England coffee that’s wicked pissah)
     
  20. BobTPH

    Senior Member

    Jun 5, 2013
    1,735
    444
    Here you go, 33 cents.

    MCP6002

    Bob
     
Loading...