Skip to main content

Ok, this request is way out there...

Let's start with a spring-loaded foot switch, normally closed.  When you press the pedal, the circuit is opened.  When you release the pedal, it closes the circuit again.  I want to use a foot pedal like this to control a SECONDARY circuit, with subtly different behavior.  Here's how I want the secondary circuit to work:

When someone presses AND HOLDS the pedal, the secondary circuit opens BRIEFLY, and then immediately closes again.

When the person RELEASES the pedal from a depressed state, the secondary circuit opens briefly, and immediately closes again. 

This would repeat ad infinitum.

"Briefly" in this context probably means a fraction of a second.  But to be sure that it will have the intended effect, it might be necessary to fine-tune the duration (i.e., the time the secondary circuit remains "open"), from about 0.2 seconds up to about 1.5 seconds.

I've tried researching things like this, but I'm not an EE so I'm not really sure where to start.

My first thought was to substitute a slow-action DPDT foot switch (break before make) in place of the original foot pedal.  I.e., the new foot pedal starts out as a closed circuit.  As you step down, the circuit is opened, but when you step all the way down, the circuit is closed again.  This might be a very simple way of obtaining the desired behavior.  But one problem with this approach is that the duration of the "open" window would depend on how quickly you push the pedal down.  Also, if you suddenly let off, I presume the pedal would spring back to its original state.  In that case, the duration of the "open" window upon release might be too brief.

The second approach I conceived of might involve relays and a 555 timer circuit.  I've never built anything like this, or anything else on perf board.  I have no idea what I would be getting into.  So I would prefer to find something already assembled and user-adjustable.

A third approach might involve using an arduino.  Again, I'm not an EE.  I've never programmed one or built a circuit around one.  So again, it would have to be something sold commercially, already built and configured for this purpose.

There's a lot of brainpower on this forum.  Can someone please give me a push in the right direction?  Much thanks in advance!

 

 

Last edited by Ted S
Original Post

Replies sorted oldest to newest

Ted: I have a footswitch from an old guitar amplifier to turn on reverb or tremolo. It was push on and release then push off and release.

If that type would work for you, there's a chance you could find an old one like it. Most pedals now are hooked between the guitar and amplifier rather than to the amplifier itself. But you might find something like that still. Try Fender, and other amplifier products from a music store.

Consolidated Leo posted:

Ted: I have a footswitch from an old guitar amplifier to turn on reverb or tremolo. It was push on and release then push off and release.

I have a keyboard "sustain" pedal which works like this.  However the very reason for what I'm calling the "secondary circuit" is to avoid the need to push on, release, and then push a second time to turn off.  The fact that the secondary circuit restores continuity after a brief interruption makes the target device believe that the pedal has been released (when in fact it is still being held down.)  When the pedal finally IS released, another brief interruption simulates a second push-and-release cycle.

I might buy a "slow action" SPDT or DPDT switch to fool around with and conduct some tests.  But I have a feeling that some kind of timer circuit will be required to consistently achieve the intended outcome.

Ted: You will most likely need a programmable relay module like this one that I found on eBay. This particular one uses the eBay number: (cut and paste into eBay search box)

322531852849

Note that it has a programming mode (P7) for being triggered (the foot pedal) that turns the relay off for a fixed time period and back on again. That sounds like what you're looking for. You can find the rest of the explanation on the different modes in the description on eBay. You have to scroll down to find it.

 

Attachments

Images (1)
  • mceclip0

Q1. By "fine tuning" the duration of the secondary circuit, might this duration be different for pressing the pedal vs. releasing the pedal?

Q2. When you say press and HOLD the pedal, is there some minimum duration that the pedal must be held down before the secondary circuit timing starts?

I'm imagining using 2 timer modules like the one Leo shows.  You should be able to get them for $2-3 each on eBay free shipping from Asia.  One would trigger when the pedal is pressed, the other is triggered when the pedal is released.  That is, the economical timer modules I've seen trigger on one polarity (choose positive or negative...but not both at same time). Maybe there's a timer module out there that triggers on both polarities.  Or, if you can cobble together a $1 circuit to detect either the pedal press or release and generate a positive trigger for a timer module.  Many options.

Thanks Stan

1. The duration of the open "window" in the secondary circuit should be the same for press and release.  It would be as short as possible and still provide reliable actuation of the target device.  I'm guessing about 0.1 to 0.2, seconds but if I'm wrong it would be nice to have a provision to lengthen it.

2. No.  If the foot pedal is pressed to any depth or velocity, the primary circuit opens.  This should trigger an open window of brief but fixed duration in the secondary circuit.  And when continuity in the primary circuit is restored (i.e., spring-loaded foot pedal is released), that should trigger ANOTHER open window of brief, fixed duration.  It's important that the system always produce two complete cycles, so as to return to its original state.  Both of the open periods ("windows") in the secondary circuit are the same length.  If the foot pedal is held down for a long time, it allows the user to delay the second half of the cycle.  Because the trigger event for the second half is restoration of continuity in the primary circuit, and that will happen when the user releases the pedal.

Another example, and something to consider...  if you press the pedal only partway down and then release it immediately, the secondary circuit should go from default closed to a brief open and back to closed, and then once again a brief open and back to closed.  If my guess is correct and the duration of the open window is indeed 0.2 seconds, then the minimum "resolution" of the whole system would be about a half-second.  In other words, if you press and release the primary pedal multiple times within a half-second, subsequent presses would be ignored because the delay loop is running and the system always needs to complete both cycles to restore itself to the default state.

One concern I have with the module Leo recommended, is that in my case, the footswitch in the primary circuit is normally closed.  When you press it changes to open.  However, it seems like that module (and others like it) expects a default open circuit, and a trigger event of closing the primary circuit to start the timer function.

The key piece here (and the reason I'm afraid I'll need something like an arduino to control the relay), is that RELEASING the foot pedal in the primary circuit is also a trigger event.  There are millions of switches and electrical devices that trigger on press.  But the release (and restoration of continuity in the primary circuit) somehow has to be "sensed" which completes a logical loop that executes the remaining events.  That sounds like computer logic to me.

Really appreciate all the help!!

Last edited by Ted S

@eddiem I've heard of the arduino, but I've never seen one or worked with it.  Do you know of a consumer applications module that has all of this already on a board, where the timer can be set with switches, or perhaps programmed through a USB port? 

Another thought... Maybe the arduino board could sense the change of state on the primary control, and provide the trigger for the relay board that Leo recommended?  Just thinking aloud here!

Last edited by Ted S
Ted S posted:

... It's important that the system always produce two complete cycles, so as to return to its original state.  Both of the open periods ("windows") in the secondary circuit are the same length.

Q3. Is there a minimum duration between open periods for the secondary circuit to reliably recognize that there are indeed two distinct cycles?  Example.  Say duration is 1.0 seconds.  You press pedal which starts a secondary cycle.  But you release then pedal in 1.001 seconds.  Obviously I'm simply trying to make a point with these numbers.  But in this case will the secondary circuit be able to distinguish or properly respond to the 0.001 second gap between the two 1.0 second cycles?

Q4. A related question.  Q3 asks about minimum duration between the press and release cycles.  Suppose the pedal is pressed again during the 1.0 second release cycle.  Should the system "queue up" the new press...waiting some TBD minimum duration.  Or, as you kind of discuss, should this pedal press (and subsequent release) be ignored generating no activity since it occurred while a previous press/release combo was still running?

No matter how it's implemented - ebay timer modules, 555 chips, Arduino, whatever - this all goes to the issue of context.  That is, as rkenney suggests, my questions seem nit-picking but necessary in the absence of context.  But I don't mind playing "20 questions"...I'm only up to 4 so far. 

Last edited by stan2004

Q3.  No minimum duration between cycles.  But the minimum delay between successive cycles is ultimately governed by the duration of the open window.  So if someone presses the pedal and releases it 0.1 second later, the sequence in the secondary circuit would be: Open for 0.2 seconds (estimated), close "briefly*" (0.1 seconds?)*, open again for 0.2, and then close indefinitely until the next press. 

*When the secondary circuit closes (restores continuity) after the first half-cycle, I suppose it should "poll" the primary circuit again.  If the pedal switch reads open at that point, the system should delay the second half of the cycle.  It should continue to poll or "sense" the primary circuit at rapid** intervals until it detects that continuity has been restored (i.e., pedal released), and then execute the second half of the cycle restoring the system to its original state.  **"Rapid" is basically the clock frequency of the controlling IC (if used), or even the speed of electrons in the circuit; hopefully less than 0.1 second intervals.

Q4. There's no need for a "buffer" or "debounce" in this application.  Whatever the user does with the pedal during the open window delay is irrelevant.  It's the state of the primary circuit at the end of the first half-cycle that determines what happens next.  I acknowledge that this means there would be a short but finite "resolution" to the whole system.  In other words, it couldn't effect a change of state in the target device more frequently than perhaps every half-second, etc., which is fine.

Last edited by Ted S
Ted S posted:

 

One concern I have with the module Leo recommended, is that in my case, the footswitch in the primary circuit is normally closed.  When you press it changes to open.  However, it seems like that module (and others like it) expects a default open circuit, and a trigger event of closing the primary circuit to start the timer function.

The key piece here (and the reason I'm afraid I'll need something like an arduino to control the relay), is that RELEASING the foot pedal in the primary circuit is also a trigger event.  There are millions of switches and electrical devices that trigger on press.  But the release (and restoration of continuity in the primary circuit) somehow has to be "sensed" which completes a logical loop that executes the remaining events.  That sounds like computer logic to me.

Suppose you have a SPDT relay with COM, NO, and NC terminals on the output side. You could wire the foot switch to this relay so that it is energized in the normal, resting state. With the magnet energized, there would be a connection between the COM and NO terminals.

Now when you press the foot switch and break the connection to the relay, the spring in the relay will change it to make a connection between the COM and NC terminals. This would be your trigger.

There are other, better ways of doing this than using a relay but you get the idea. It's just a bit of negative logic.

I believe that anyone with a lick of sense can master the Arduino. It just takes time, patience and a good hookup to the Internet. There's a lot of information regarding this microprocessor and the things that it can do. I can help you with it if you get stuck. I would encourage anyone to jump in and get started. It's inexpensive, it can be utilized for a multitude of electronic projects and most of all, it's fun.

Ted: I would like to add my name to the list of folks who have called for a more detailed explanation of what this is all about. I just can't get my head around the secondary circuit, primary circuit, time windows, and half cycles.

I urge you to please tell us what you are thinking about doing in a way that makes sense to those of us who are just trying to help people out with their projects. Is there something goofy about it that you don't want to reveal? We've seen goofy before and we approach it with an open mind. We are not here for the sake of ridicule.

So please tell us what you're trying to accomplish.

Q5. Is there feedback from the so-called Target device that indicates its state?  As I understand it, the secondary circuit controls the Target device. From what I can infer so far, the Target device has only 2 states which for the sake of argument I'll call ON and OFF.  You press the pedal and the Target device turns ON, you release the pedal and the Target device turns OFF.  IF (big IF) there is such a feedback signal from the Target device then it becomes a fairly simple implementation with only two conditions or "rules" to follow:

IF the Target is OFF, then generate a 0.2 sec (or whatever) pulse in the secondary circuit when the pedal goes from released to pressed.

IF the Target is ON, then generate a 0.2 sec (or whatever) pulse in the secondary circuit when the pedal goes from pressed to released.

Q6.  Is there a "fail-safe" requirement to detect a stuck state?  For example, let's say the TBD circuit detects the pedal has been pressed for 100 hours (or whatever).  This might be indicative of failure mode and, for example, the circuit should just go ahead and generate a 0.2 second pulse to the secondary circuit...or turn on a relay to activate an audible/visual alarm or whatever.  No matter the implementation (even an Arduino), if this is a mission-critical system it is common practice to include fault-tolerant mechanisms to cover corner cases and the like.

 

Thanks to everyone who has helped me so far.  Without going into tons of detail, you could say that a function on the target device is currently "latching" (press on, press again off) and I need it to be momentary.  That's the root of the problem, and the impetus for this project.

Q5. No feedback from the target device.  And yes, the desired function is as follows: While the pedal is pressed, target device is "on," and when the pedal is released, target device is "off."

Q6. No fail-safe requirement, this isn't mission-critical, medical, life safety, or high-speed machinery that would pose risk of injury.  However, it might be prudent to add some kind of "reset" button to restore the system to its default state.  Depending on the implementation, perhaps it would reset automatically if you cycle the power.

Thanks again and please keep your ideas coming!!

Last edited by Ted S

No, I guess it's not the track-side toilet lid.

As I lay in bed this morning, I kept thinking about the 200 millisecond pulse; the secondary circuit opens briefly and then closes again. That 200 ms pulse is about the right amount of time to click the e-unit on a locomotive. You want to change direction of a train with the foot switch.

I think I used 400 ms for an experiment I did some time ago. It used relays and an Arduino to detect a stop block using an insulated rail section, cycled through neutral, reverse, and back to neutral, then sat there buzzing with the lights on until some time elapsed. Another pulse and off it went. Totally driven by the microprocessor.

So, now, if I've got this right,  we should be able to help. Secrets are for old ladies.

I think I would start with a new foot switch; one that is SPDT rather than just break on push and make on release. Here's a nice one I found on eBay but you should choose one that you like. Just make sure that it is SPDT. The number is:

372481311689

With contacts in both the pressed and released positions, an SPDT will help with triggering both cycles. And while you're on eBay, consider once again the item mentioned previously; the timer relay board. The off-delay-on is what you want for that brief drop of power to the tracks.

If @stan2004 has a better way to do this (and he often does), you may want to wait a bit before committing to any purchases. If you like the foot switch that you have already, we can probably figure out something for that as well.

Attachments

Images (1)
  • mceclip0

Hahaha great minds think alike... I bought a surplus SPDT switch on eBay to experiment with.  I didn't buy the timer delay circuit, because I wasn't 100% sure it would do what I need to do.  Now I'm starting to think that if I go that route, I'll need two of them.

Deep down I feel like the solution is in the electronic realm though, not electromechanical.  To be continued...

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×