Two inputs independent of each other one output.

Discussion in 'The Projects Forum' started by slvrstang, Feb 3, 2009.

  1. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    I am attempting to create a dual pedal mod for Rock Band. The purpose of this is to allow very rapid pressing of both pedals without them interfering with each other. Each pedal needs to work regardless of what the state of the other pedal is.

    I've found this circuit online and built it. It doesn't satisfy me as it seems to ignore pedal presses on one pedal if the other pedal has just been pressed.

    http://imakeprojects.com/Projects/rock-band-dual-bass-drums-controller/Gfx/high-res/h_HPIM2372.JPG

    As far as I can tell the point of this schematic is when the pedal is pressed, 5v goes into the inverter and 0v comes out. This causes the cap to charge. With 10kohm resistor and a 10uF cap this is .01s worth of charge. During which I believe, but am not certain that all the current flows into the cap and none into the inverter, causing it to put out a 5v signal for a short time which triggers the transistor and then the relay sending a single shot pulse to the real drum controller.

    I have been chatting with friends and some think that using a mosfet instead of a relay may be a better solution.

    Anyways, what I'm looking for is improvements to the schematic, and if necessary a complete reconstruction of something better/simpler/more efficient.

    Also, will a basic 9v LM7805 power supply be enough for the schematic I've linked to? I believe the relay I used draws ~300mA of current when it opens. This seems like a lot to pull from a 9v. Thanks for any help you can afford. :)
     
  2. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    Bump


    10char
     
  3. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Can you sketch and provide a timing diagram? This is an example of a timing diagram, see post#12 in this thread.

    http://forum.allaboutcircuits.com/showthread.php?t=18191&page=2

    It is good way to show the relationship between inputs and output. It does not even need to be done in scale, just a rough sketch will suffice.

    Without a timing diagram, it is difficult for others to realize what output do you actually want to get because there are two input signals and only one output in this case.

    1. How long should the circuit output reacts with a stimulus from only one petal?

    2. How should the output be if there is another stimulus arrives from petal#2 before the timing period in (1.) above ends?
     
  4. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    Here is the requested timing diagram (poorly done in paint)

    [​IMG]

    1. The circuit output should close the relay for a very short period of time. 10ms seems to be long enough.

    2. The circuit should not really receive a second input before the the output goes low again. This scenario would be a don't care.
     
  5. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Your timing diagram is good and serves its intended purposes.

    The problem with your existing circuit design is that the relay,being a mechanical device, can not be rely on to operate and release within 10mS. For that you'll need some kind of electronic switch.

    You may try using a smaller value capacitor like 1 or 2uF instead of the existing 10uF at the inverter output to reduce the relay operate timing to see if the circuit now works better.

    You can use a 9V adapter and 7805 to give you 5V regulated supply.

    If changing the values of capacitor still don't give you satisfactory result, can you experiment a bit by disconnecting the relay from the existing circuit and use just the transistor 2N3904 alone(connects collector & emitter to drum controller, emitter being common to existing circuit & controller) to see if you can operate the controller. You may need to measure the DC voltage sent out by the two contacts of the drum controller and connects the collector of 2N3904 to the positive wire.

    This configuration is called open collector and is volt free so will not send a voltage back into the drum controller and there is no risk of damaging it. What you try to do is "shorting" the two wires using 2N3904 to simulate a relay contact closure.

    If you can operate the drum controller in this way, then it is a simple matter to use just a dual monostable driving a single 2N3904 via two diodes to fulfill your needs. Else may be we have to try using reed relays or "two back-to-back connected MOSFETs" instead as they operate faster. I know in the market there are MOS static relays which operate like a relay but much faster. However they are quite expensive.
     
    Last edited: Feb 6, 2009
  6. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    Thank you for your help. I will attempt the 'open collector' configuration as I would love to not use the relay as it's rather large, loud and slow.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It may be desireable to use an optocoupler such as a 4N25 or the like. An optocoupler would keep the foot switch circuitry completely isolated from the drum machine.

    As eblc1388 mentioned, the polarity of the signal in the drum machine jack is important - along with the current required to trigger the machine.

    If you change your capacitors to 1uF non-polarized caps, you'll get a pulse of about 13mS duration.

    One problem that may arise by decreasing the pulsewidth is switch "contact bounce"
    One way to eliminate a contact bounce problem would be to replace the mechanical foot switches with optical interruptors. Another would be to use SPDT switches with the N.O. contact to 5v, N.C. to ground, and the common as the signal out. You'd need to replace the mono jacks, plugs and cables with stereo versions though.

    Another problem that may arise is making the trigger so short that the drum kit won't detect the input. Replacing the 10k pullup resistors with 50k pots wired as rheostats with a 5k resistor in series will make the pulsewidth adjustable. The 5k resistor protects against setting the pot to 0 Ohms, thus shorting the output of the inverter to Vcc.
     
    Last edited: Feb 6, 2009
  8. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    Is the charging time for a cap just RC? 10kohm x 10uF = 0.01s = 10ms?


    [​IMG]
    Is that the correct connections for the "open collector" circuit?

    The drum controller has ~2.3-2.5v on the + wire.

    If I input 5v from the circuit into the control wire(base) of the transistor, the collector and emitter should be shorted (have 0 resistance), correct?

    This is not happening. The circuit pulses 5v into the base of the transistor for ~100ms (I changed the resistor feeding the cap to 100kohm) and the transistor does nothing.


    I was under the impression that an npn transistor has 0 resistance from emitter to collector when a positive voltage is applied to the base and GND is applied to the emitter.

    Does the collector have to have the same voltage as the base for the previous statement to be true?

    c- 5v from drum controller
    b - 5v from circuit
    e - drum controller gnd

    resistance from c-->e = 0

    or would

    c - 2.3v from drum controller
    b - 5v from circuit
    e - drum controller gnd

    resistance from c-->e = 0

    also be true?
     
    Last edited: Feb 6, 2009
  9. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Yes.

    Not really. More conventional view is that transistor operates on current to the base pin, not voltage. Whatever the base current, the voltage between base and emitter is roughly about 0.65V, like that volt drop of a diode.

    Your 100K resistor value for the base is too large to saturate a transistor. A value of 1K is about right.

    A transistor requires sufficient base current in order to "saturate" the output between collector and emitter. When that happens, the voltage across the two pins is less than 1 volt (about 0.2V) or so. This would appears to be some form of short circuit to the outside world.

    No. There is still some "resistance".

    In addition, one has to limit the current to the base as large base current will simply destroy the transistor. Remember, the base always has only 0.65V to emitter. For example, to get 5mA flowing to the base at 5V, one has to use a base resistor of the value of (5V - 0.65V)/5mA = 870Ω. This is a particular case for 5V and 5mA base current, with other voltage and current values, one has to re-calculate the base resistor value again.

    Hope the above explanation is clear. I would recommend the tutorial/e-books of this site if you want more in depth explanation on these topics.
     
  10. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    [​IMG]

    I have tried the above configuration just on a breadboard and the drum controller does not recognize a bass hit when 5v is applied to the base of the transistor. In fact, it spasms and the controller hits repeated but not consistent bass hits of its own without any change to the circuit. Even just connecting the two wires from the drum controller to the c and e of the transistor cause this random behavior. If I apply 5v or gnd to the base of the transistor nothing happens and the drum controller continues to register hits for no reason.

    Could this be because of the voltage drop across the transistor?

    Maybe the drum controller has an AC signal running through those two wires? ( I have no idea why it would be AC when it's powered by AA's)

    What other way could I wire this?

    Also, I tried using a 100Ω resistor to touch the two wires from the drum controller together. This DOES produce a bass hit. Even though there is a resistor in place. Puzzling. I wish I had more information about how the internals of the drum controller function.

    I'm thoroughly stumped :(
     
  11. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Have you tried the connection like the following?

    [​IMG]
     
  12. slvrstang

    Thread Starter Member

    Sep 27, 2008
    10
    0
    I created a simulation of this circuit in Multisim and I found a potential issue.

    When running the simulation. If I place an oscope on the + side of the capacitor it shows an initial voltage of +10v dropping to 5v after about .3seconds. At this point if I give the circuit an input it drops that + side of the cap to 0v triggering the inverter and sending an output pulse for ~20ms until the cap gets to ~2v. But when I remove the input the cap jumps from whatever it is at to whatever it is at +5. So if I let it charge up to 5v it jumps to 10v when I release the input back to Gnd.

    Here is a readout of the multisim graph:

    C = Closed switch B
    O = Open switch B



    [​IMG]

    Suggestions? Is this fine since I obviously won't be able to input pulses that fast with my foot?

    Is it damaging to the IC to give 10v input like that?
     
Loading...