Connect with us

how to bring 12V fluctuant signal to mcu input port

Discussion in 'General Electronics Discussion' started by milen, Dec 22, 2009.

Scroll to continue with content
  1. milen

    milen

    17
    0
    Dec 20, 2009
    One option is to use optocoupler, can I instead use voltage devider to lower 12V signal to 5V (for instance R1=10k and R2=7k) + diode to cut off the voltage peaks above 12V?

    I know nothing about diodes, I start reading in wikipedia and if I am getting right I need zener in reverse biased with Vz of 5V. Maybe this one BZX55C4V7?
     
  2. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    Yes, presumably both methods, though it's hard to know for sure what you're trying to say (& do) here.
     
  3. milen

    milen

    17
    0
    Dec 20, 2009
    I try to understand how should a 12V range fluctant signal be brought to the PIC controler's input.

    Do I use optocoupler, voltage devider (10k/7k), or 5V zener?
    Diagrams are helpful, those are made by me (fell free to corretct/coment them)
    [​IMG]
    [​IMG]
     

    Attached Files:

    Last edited: Dec 24, 2009
  4. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
    Diagrams are absolutely useful, but what do you mean by fluctuant?
    From your solutions I presume it's digital in nature, but what frequencies/ speeds are involved/ needed?
    Ckt.1: Ok.
    Ckt.2: Line to MCU should of course come from emitter/pull-down.
    Ckt.3: Ok.
    Ckt.4: Zener is drawn upside down (forward biased), and needs a resistor in series at the 12V side.
    All methods apply, but optocouplers are normally only used if signal ground is not the same as MCU ground, or if spikes can occur along the ground line.
     
  5. milen

    milen

    17
    0
    Dec 20, 2009
    This will be alarm unit connected to car electrical system. Some say that durring cranking or other high power consumption voltage spikes of up to 60V can be formated.
    My alarm unit will be using 8bit PIC mcu (I thought some of 16F8xx). Those PICs allready have internal pull up resistors and protective diodes. (can I bring 12V signal directly to MCU?)



    I will only use 12V signals from door's latch switches, and 12V lock/unlock pulse from central convinience unit.

    So zener must be rotated by 180° - so it will be reverse biased?
    Resisor in series? You mean I should connect 5V reverse biased zener to the voltage divider (left diagram)

    I though that using multichanel (4) optocoupler would be the simplest way of putting all to the PCB. Would fotodiode inside optocoupler sustain the voltage spikes that are normal in car electrical system?

    Thanks for helping!
     
  6. Resqueline

    Resqueline

    2,848
    2
    Jul 31, 2009
     
    Last edited: Jan 15, 2010
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-