Connect with us

Help with using a 7404

Discussion in 'General Electronics Discussion' started by dablakh0l, Sep 19, 2014.

Scroll to continue with content
  1. dablakh0l

    dablakh0l

    11
    1
    Sep 19, 2014
    I know this must seem trivial to most of you, but my knowledge is limited to mainly power supplies.

    Recently I have been tasked with designing a power supply to run a tiny transmitter, which is not as big deal.However, the transmitter module sets its channel with the use of 3 dip switches delivering a binary logic to the micro. Unfortunately the binary logic is complimentary in respect to ground. The customer wants to bypass the module's switches with a rotary dip switch. However complimentary rotary octal BCD switches are scarce. I can get standard octal BCD switches easily.

    My question is this: If I use a 7404 family part between the standard octal BCD switch and the micro, do I need any additional parts to support it? Switch bounce is not an issue. My main concern is that I want the grounded output to be ground, but I'm not sure if I should let the input float when I don't want it grounded. i can't open the module to see what the voltage is on the pin when its not grounded.

    Does anyone understand what I'm asking?

    TIA
     
  2. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    You can turn a standard BCD switch into a complementary switch by connecting its common terminal to the opposite supply rail. Pullup or pulldown resistors may also be needed.
     
  3. dablakh0l

    dablakh0l

    11
    1
    Sep 19, 2014
    Unfortunately, I need the output to the module to see either ground, or nothing. Pulling the common to the opposite rail wouldn't accomplish this, I don't think, as I'm not sure what the micro inside the module is expecting when the input isn't grounded. I don't want to put a voltage on there if I don't need to.

    But thanks, it makes me consider a possible different option for future projects.
     
  4. (*steve*)

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

    25,500
    2,840
    Jan 21, 2010
    Then connect the common to ground...

    It sounds like the inputs have weak pull-ups so they are left open when not pulled to ground.

    Your two posts seem somewhat conflicting.
     
  5. dablakh0l

    dablakh0l

    11
    1
    Sep 19, 2014
    I need the complementary BCD output. I need the module to see ground/ground/ground for it to give me channel 0, ground/ground/float for channel 1, ground/float/ground for channel 2 etc. The rotary BCD switches I can easily get, with the common pin connected to ground, give me float/float/float at position 0, float/float/ground at position 1, float/ground/float for position 2, etc. What I am trying to do is put some circuitry between the switch and the module to make the module see ground/ground/ground when the BCD switch is in position 0, ground/ground/float when the BCD switch is in position 1, etc.

    Does that make any sense now?
     
  6. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    The module will detect the state of the switch according to the voltages on its inputs. If it needs to see "ground or nothing", then it has internal pullup resistors so that when a switch is open, its voltage is pulled up. This allows it to distinguish switch closed (input pulled to ground, voltage = 0V) from switch open (input floating, pulled up, voltage = VCC).

    This is why I said that you may need pullup or pulldown resistors. You need to connect the common terminal of the switch to VCC, and add a resistor from each line to 0V. Each resistor has to have a value low enough to overpower the pullup resistor in the module, so the input is pulled low when nothing is connected to it. Then when the switch is closed, it will pull the input high.

    This arrangement wastes power. There's no solution that will waste no extra power, but if you want to minimise the wasted power, you should avoid the 7404! It is an obsolete TTL device. You could use a CMOS device such as CD40106, CD4584, CD4069, CD4049 (all hex inverters) or a quad NOR or NAND gate IC (CD4001, CD4011), or three individual single-gate inverters. I believe triple inverters are available in SO-8 packages but you'd probably have to order a reel of several thousand.

    In any case you need pullup or pulldown resistors for the switches, unless (perversely) you use a TTL or LS gate, where the inputs have built-in pullups because of the design of the circuit inside.
     
  7. (*steve*)

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

    25,500
    2,840
    Jan 21, 2010
    Or simply have a switch that goes from 0 to 7 and tell people to pretend the arrow is pointing in the opposite direction, or to use 7 - x where x is what is shown. or reprogram the micro. or paint over the numbers with other numbers. or use three transistors and six resistors (you might be able to get away with three resistors depending on the value of the pull-ups).
     
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.
Similar Threads
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-