Connect with us

Active low or active high signalling?

Discussion in 'Microcontrollers, Programming and IoT' started by eem2am, Aug 30, 2012.

  1. eem2am

    eem2am

    414
    0
    Aug 3, 2009
    Hello,

    We have four flashing LED lamps , each mounted at different parts of a lorry.
    Each Lamp has a PIC12F683 microcontroller in it.

    The four microcontrollers all have their GP4 pins connected together by a wire.
    ….The microcontrollers use this wire to send and receive pulses to each other.
    These pulses correspond to the times at which they are flashing their LEDs on……and the purpose of this is so they can all flash there LEDs in synchrony with each other.

    My question is:

    Is it best to have an Active high pulse, or an active low pulse?

    ……here are representative diagrams of active high and of active low signalling between the PICs….


    Active High:
    http://i50.tinypic.com/214crut.jpg

    Active Low
    http://i48.tinypic.com/10za2v6.jpg


    ..So which is best?
     
  2. duke37

    duke37

    5,211
    718
    Jan 9, 2011
    I would not think it matters.
    You may however consider a fault condition and whether a high or a low fault would be best.
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    On a lorry i'd think a common failure mode could be a short circuit to chassis. This would show as Low on the PIC input. If you want to go all light flashing in case of such a fault, use active low signaling.

    Another probably not uncommon failure mode is a loose wire. In that case you will receive no signal at all. You can tie the PICs pin to ground via a pull-down resistor. The dríving PIC will have to issue a High signal when he lights are inactive. If you loose the connection, the pull-down will generate a Low at the PIC's input and the lights will flash.

    If you want to make the scheme foolproof (open or broken wire, short to ground or to Vcc, failure of one PIC etc.) you will have to incorporate a somewhat trickier scheme. You could use a simple telegram to inform the receiving PICs that the sender is still alive (life signal). This telegram should be repeated at a defined rate, e.g every 100ms. The receiving PICs observe the telegram. If after the defined period (plus a few ms to account for small irregularities) no valid telegram arrives, the connection is out of order and the receiving PICs can start flashing the lights. You could also wait for e.g. 3 consecutive missing or disturbed telegrams to reduce sensitivity to small disturbances.
     
  4. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    My question is why have multiple 'brains' doing the flashing, why not have one micro handle all the flashing patterns and simply bridge that pattern out to the other locations? Seems silly to try and sync multiple chips when one would do the job...
     
  5. eem2am

    eem2am

    414
    0
    Aug 3, 2009
    we dont know how many lamps there will be
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    9,137
    1,846
    Nov 17, 2011
    A suitable relay should be much less expensive than a PIC controller board for each lamp.
     
  7. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    That poses no more of an issue using a single micro than it does syncing with multiple micros... The same scalability can be implemented in either design...

    I suspect this pictures represents the basics of your system, 4 micros (purple) synced with a common sync wire (green), toggling relays (red) to flash the lights (blue)...

    [​IMG]

    Why not do it with a single micro like this, one micro (purple) triggers one relay (red) that relay in turn triggers any and all other relays (red) that flash the lights (blue)... No sync concerns...

    [​IMG]

    You need to add more lights, just as simple... Scalability is only limited by the rating of the one relay coming off the single micro, adjust that relay rating accordingly or run multiples in parallel and you can expand away...

    [​IMG]
     

    Attached Files:

  8. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    I think the reason for the sync arrangement is flexibility. There can't be a "master" indicator because there may be only one indicator present, and not necessarily a specific one. So the requirement is for each indicator to have its own flashing logic, and to synchronise to others only if they are present. Is that right eem2am?

    Re active high vs. active low, I'd say it's six of one, half a dozen of the other. Pullup resistors with N-channel FETs closing to ground is probably more conventional. In an automotive environment I would be concerned about common-mode voltage but with only one signalling wire, you can't do much about it.

    Have you considered using a transformer-coupled audio signal? For example, a burst of 1 kHz on every flash? The combination of high signalling voltage and a heavily filtered detection circuit might give good reliability. OTOH, in practice, I guess it doesn't matter if the indicators lose sync briefly sometimes.
     
  9. CocaCola

    CocaCola

    3,635
    4
    Apr 7, 2012
    I guess if you want to make a single design that is universal and self contained, but IMO it's more cost effective to simply sell the 'brain' module separate vs including it in every unit... And sell separate relay boards for expansion, that are lower cost vs modules with micros...

    In this instance I see an over engineered design, that serves no real benefit...
     
  10. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,174
    2,690
    Jan 21, 2010
    In retrospect, I would capacitively couple them. That way to can reference the signal to anything.

    Transfer the signal on a twisted pair and look for a differential signal. Noise will almost certainly be common-mode..
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,266
    Nov 28, 2011
    I suspect he doesn't have the option of using a twisted pair. I guess the signal will have to go through a wiring harness and that may have been defined already.
     
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

-