basic comparator - using mc34071p.

Discussion in 'The Projects Forum' started by Notebook64, Jul 21, 2015.

  1. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Hi
    I have a few of these and want to build a circuit using a 9v battery. I want the output to switch on an LED when 0.5v is applied to one of the inputs.

    Therefore thinking 9v on one input and 0.5 on the other. I have downloaded multis touch on the iPad and every circuit too. I know its basic chaps but really need help. Also I have a macbook, is there a better program where I could use the correct comparator for the simulation? Does labview do this?
    New to all this - just a few days.
    Thanks to the helpful
     
  2. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    1. Are you used the 9V cookies battery?
    2. Where is the 0.5V come from?
    3. Why you want to using 0.5V to applied to the input, what voltage in another status?
    4. Do you have to use the op amp mc34071p, why?
    5. What kinds of LED(V/I) are you trying to use, and how many leds?
    6. What are you trying to control the input(switch?)?
     
  3. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    9v is from a battery
    0.5v will come from another source
    I could use a 1.5v battery instead to test, so turning on the output using 1.5 would be good
    I used this op amp due to supply voltage of 9v - just read it somewhere..
    The led is marked at 12v (has a limiting resistor built in - any will do.

    when .5 or 1.5v applied (any so I can learn) I want the output to turn on the led

    when I tried it on some breadboard? - as soon as i power up the opamp I get an output straight away that turns on the led..

    Thanks for answering
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    If the led already setup at 12V when you used 9V to power it then the brightness may not enough as it should be.

    This is a op amp used it as comparator.

    mc34071p_Notebook64_ScottWang.gif


     
  5. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Thanks
    Not sure where I was going wrong - I worked out about how the voltage divider works etc. R2 10k to ground - didn't have this - just put the 1.5 onto the input. what does this do? Will try tomorrow evening.
    Thanks
    Also probably the first forum of any kind where I haven't been bombarded with people saying look on the net etc..
    Thanks for the direct answer
     
  6. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    Because I'm not sure the situation of input, only know the 1.5V will input, so I have to make sure when the 1.5V not input and then the (+)[pin 3] must be stay at low voltage to avoid the pin going floating, when the pin is floating then it could be generate oscillation.
     
  7. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Thanks again - will give it a try in the next few days
     
  8. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    If I supply the 1.5v from a battery, I connect the +ve to the input. what about the -ve of the battery?
    Thanks
     
  9. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    The label "-" on battery should be connected to Ground(GND, 0V), the GND is the common pin.
     
  10. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    I gave this a go but I was using variable pots which didn't fit into the breadboard very good. the output was a constant few volts no matter if I connected the 1.5v or not. Will try to get this going later. Thanks for the response.
     
  11. absf

    Senior Member

    Dec 29, 2010
    1,493
    373
    You can either buy special pots with pins for PCBs or solder 3 wires to the terminals of your pot and just plug the wires to your breadboard.

    The circuit by Scott should work with your mc34071 but with other comparators like LM311/393/339 you have to power the LED via Vcc, as they have open-collectors.

    Allen
     
  12. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    cheers
    replying via mobile at the moment - I bought some vero board so will solder them onto that and run wires off.

    Thanks
     
  13. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Hi Guys -
    Success ( in a way )

    VR1 I only have 10k pots, so I had a 2k resistor and placed it from the bottom of R1 to ground. I then tapped off this to the input 2 on the chip.

    connected the 9v up and then the input of 1.5v battery ---- nothing!!

    measured the input onto pin 2 and it was 1.67v

    Then I connected 2 1.5v together to get 3v and applied that and bingo - the led lit up!!!!

    Q - I also noticed with no 3v or 1.5 connected I had 1.74v on pin 3 - why was this? If I dropped the reference voltage to 0.3 as I intend this circuit to switch using 0.5v then it would already be too high?

    Therefore by altering the voltage decider I guess I control the ref voltage. thinking about it could I remove the 2 k resistor and use 2 legs of my 10k pot?
     
  14. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    Because you said that you want to use 1.5V to be the input voltage, so I setup the max voltage of common pin(between R1 and VR1) as:
    V_com = 9V(R1/(R1+VR1))
    = 9V(2K/(8.2K+2K))
    = 9V(2K/10.2K)
    = 9V*0.196
    = 1.765V

    When you change the pot value then you can follow the above calculation to get the voltage of common pin.
     
  15. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Thanks
    Changed the 2k to use 2 legs of a pot and tuned so that the Vref was 1.4v and then attacked the 1.5battery and it worked.
    Thanks again.

    The input pin 3 without a battery connected was around 1.7v but didn't light the led by turning on the output. Is this just floating? has no current? not sure what I mean - can you explain.
    Thanks
     
  16. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Hi
    can you explain - I know what a transistor is roughly - so do you with a transistor to power the led?
     
  17. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Hi
    If I change the value of the 2k to allow me to drop ref to 0.5, the led comes on without any input voltage to the comparator.. can someone help?
    Thanks
     
  18. ScottWang

    Moderator

    Aug 23, 2012
    4,857
    767
    When you adjust the Vref as 0.49V and then you need to change the Vin=0.5V, did you do that?
     
  19. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    Hi
    If I turn the ref voltage anywhere below .5v then the led comes on as there is over a volt on the input - without me connecting a supply
     
  20. Notebook64

    Thread Starter New Member

    Jul 13, 2015
    23
    0
    yes I did that but before I can turn down the ref voltage to 0.49 the led is on. This is without any 0.5 or 1.5v being applied to the input..
     
Loading...