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...

Ted: That's great! So our starting point is something like this:

I think that will help to make this project a bit easier to implement.

But I think we need to clarify some operational details that I'm not sure I learned from the previous parts of this discussion. So let me ask some questions.

If a train is moving forward to begin with, the initial depression of the pedal will put it in neutral and it will stay that way until the pedal is released again. And if the train is initially in neutral, the first depression will put it either in forward or reverse depending on the part of the e-unit cycle that is currently engaged. There is no feedback on direction so we don't know what state the e-unit is in at the start. Do I have that correct?

Do you plan to have it in a known state to begin with? If starting in neutral, you can go forward or reverse as long as you hold the foot switch down. Let it up and the train returns to neutral. Is that the desired operating situation?

Also, will you need to be able to change the operating cycle to the opposite state? That is, if neutral is the normal starting state, will you need to be able to change it to the other way around; as in foot switch not depressed, train moving forward?

And remember, you only get one chance to create a good first depression.

Attachments

Images (1)
  • mceclip0
Last edited by Consolidated Leo

bi-slope breadboard

Here's a brute-force approach in action:

The normally-closed spring-loaded lever switch on the left is meant to simulate the pedal switch.  The circuit is powered by 5V DC.  The circuit drives a 5V DC relay module (about $1 on eBay, free shipping from Asia).  The COM and N.C. relay contacts would be used to drive the secondary circuit; the relay fires for about 0.2 sec when the pedal is pressed and again when released.  You can hear the relay firing or watch the red LED on the relay module turn on and off.

bi-slope timer with holdoff

This uses 3 garden-variety digital logic IC chips (maybe 25-50 cents each) and a dozen or so resistors/capacitors...so maybe $3 or so in parts including the 5V relay module.  The "trick" if anything is dealing with what I call the re-trigger holdoff requirement.  When pedal is pressed, the relay fires for 0.2 sec (settable by changing a resistor value).  But if the pedal is instantly released, you must wait some interval (settable by changing a resistor value) before firing the relay again.  This allows the secondary circuit to "digest" the first relay action so the subsequent relay action is recognized as a separate command.  This trigger holdoff is demonstrated in the video where the lever is quickly pressed/released.  The circuit queues up the release such that the second relay firing is delayed.  A related requirement is to inhibit multiple triggers which is shown in the video when quickly pressing/releasing the switch...yet only one pair of relay firings goes thru.

Going thru the circuit logic is tedious so I'll leave it at that and in any case it appears this is not an O-gauge train application (?).  There are some i's to dot and t's to cross if someone were to actually attempt to build this or commit to a PCB design from OshPark or wherever. 

This could be cobbled together using eBay $3 timer/relay modules and a handful of loose components (diodes, resistors, capacitors) but would be fairly bulky and run over $10.

Bottom line.  If an Arduino or similar is a viable option, that's what I recommend with this one! 

Attachments

Images (2)
  • bi-slope breadboard
  • bi-slope timer with holdoff
Last edited by stan2004

Correct.  Well, if you swap the resistor and capacitor, on power up the + supply provides the high logic level for the reset until the cap charges and holds it low from then on.

There's an issue with the simple R-C reset circuit wrt what happens when you instantly turn off power and you have this charged capacitor. Where does the capacitor discharge to?  For example, if you restore power too quickly (like in less than a second), that capacitor may not have discharged and hence there would be no reset.  But in practice, and to keep things simple, this should work for digital IC chips you'd buy today due to so-called input protection diodes that quickly and safely discharges the capacitor back into the power supply.

Last edited by stan2004

Wow Stan, that's amazing.  I'm not an EE and I've never built anything like this.  Is the white substrate called a "breadboard?"

In order to better describe the problem I started to depict a signal trace for the primary and secondary circuits showing the "on" and "off" in each as a square pulse from 0 to 1.  This got me thinking about the "resolution" of the system, i.e., minimum duration and re-trigger holdoff, etc.  It inspired this basic-like program which describes the logic/behavior I'm trying to achieve.

0010 REM A and B are variables representing the state of the footswitch.  Can be boolean or integer.

0020 REM there should also be global variables for the polling interval, relay open, and relay closed times.  Omitted for clarity.

0100 A = Poll(footswitch) : REM return value is either 0 or 1. Default state is closed so initially A=1

1000 REM ** Main routine **

1100 Wait 0.1 seconds : REM this time may need to be adjusted

1110 B = Poll(footswitch) : REM poll the footswitch again and store result in a different variable "B" the same type as "A"

1120 IF B=A THEN 1100 : REM no change detected in the state of the footswitch, so don't do anything with the relay.  Wait a little and poll again.

1200 REM Subroutine ** State of the footswitch has changed **

1210 A=B : REM update the stored reference variable with the "new" state of the footswitch

1220 Open the relay : REM relay is normally closed

1230 Wait 0.1 seconds : REM Keep it open for exactly 0.1 seconds to permit recognition by the target device.  (This time may need to be adjusted.)

1240 Close the Relay

1245 Wait 0.1 seconds: REM minimum time to keep the relay closed to permit acknowledgement by the target device (may need to be adjusted)

1250 GOTO 1110 : REM back to main routine- poll the footswitch again etc.

2000 END : REM note there is no exit from the loops and no returned value(s)

Obviously this is neither BASIC nor pseudocode, and I have no way to test the logic.  I'm just trying to describe to all of you what I want to happen.  Thanks for helping me puzzle through this!

For several years (before the Arduino phenomenon) DIY'ers routinely used BASIC-programmable microcontroller modules.  And I'm sure there's still a cadre of devotees still using them with great success.  IIRC one of the big players was Parallax with something like this:

basic stamp

So you'd apply some DC power.  Hook up to a terminal emulator program like Windows Hyperterm (or whatever it was called) and the 9-pin RS-232 serial port on a PC (before USB came along), and off you go.  In the example above, there is even the same white prototyping substrate or breadboarding area as you'd need to add a few discrete components to connect to the 5V relay module and the foot pedal.

But as I see it, your BASIC program as written would work just fine with my understanding of the application.  There would be some experimentation to adjust timing though I'd think some Parallax user group out there would have tips and tricks on how to use loops (FOR X=1 TO 100, NEXT X, or something like that if I remember BASIC!) or other programming constructs to achieve tune-able delays.  Then it's just a matter of how the Parallax BASIC implementation handles INPUT and OUTPUT to drive or read the level of the input and output signals at the breadboard area.

I was just looking and it appears there's been some activity in the Arduino community to implement BASIC though it appears it's more for curiosity sake than a practical solution for everyday use.

If this is a one-and-done project, and reading between the lines on your comfort zone, I don't think the discrete logic IC circuit I showed is the way to go - lots of wiring/soldering etc.  If you already have a Parallax BASIC Stamp and have used it, I'd think that would be the closest exit.  Otherwise it looks fairly spendy to buy one.  Hard to say if it's worth the investment in time (more so than $) if you've never touched or studied the Arduino approach. 

As I mentioned in a previous post, another approach is to use some TBD combination of eBay timer-relay and/or latching-relay modules and assemble them Lego like. 

relay modules

That is, you need 1 time-interval when pressing and releasing and a 2nd time-interval to delay multiple triggers so that the secondary circuit has time to recognize successive triggers.  Hence I'd think 2 timer relay modules.  Then to remember which state you're in to detect changes in the pedal, you need a 1-bit memory (e.g., a latching relay).  It might appear like a Rube Goldberg contraption but would minimize component-level assembly/soldering...and no writing Arduino code, BASIC, or what have you.  I'd think something between $10-$20 out-of-pocket if willing to wait on Asia eBay sellers.

Attachments

Images (2)
  • basic stamp
  • relay modules

Thanks Stan.  All of these solutions are out of my comfort zone, that's why I asked for help.  I know how to program in BASIC and have some experience in other languages.  But NOTHING with systems-on-a-chip like Basic Stamp, Arduino, Raspberry Pi, etc.  The cost of the Basic Stamp doesn't bother me, I was prepared to spend up to $200 to obtain a complete working device.  But where do you get an RS-232 interface these days, and what kind of software would you use to communicate through it?  Another thing I'm concerned about is the breadboard part where you wrote "a few resistors and capacitors."  That isn't too specific, and I wouldn't know where to begin.

Re: the modules, I don't care if the solution is "Rube Goldberg-esque" as long as it works.  I'll look into the ones you depicted in your post.  They're not expensive, but i'm still not sure how to hook them together, or whether they'll really do what I need.  Is the "bistable MCU" a one-bit storage system for the state of the footswitch in my example?  I'm not an EE so all of these terms are foreign to me.

I can't be the only one who has ever needed to lock and unlock a "latching" target circuit with a momentary pulse.  I guess when I posted, I was hoping that a circuit like this was commercially available.

Last edited by Ted S
Ted S posted:

... I was prepared to spend up to$200 to obtain a complete working device. 

I'm surprised you haven't been contacted by someone via private-email or whatever!  An Arduino aficianado ought to be able to whip this up (the programming part) in less than an hour.  The hardware would be maybe $10 for an Arduino module, a wall-wart DC power supply, and a few discrete components/connectors.

...But where do you get an RS-232 interface these days, and what kind of software would you use to communicate through it? 

There is an abundance of USB-to-RS-232 converter cables, dongles, or what have you for next to nothing.  Then you'd use a "terminal emulator" program.  I see that Hyperterm is no longer available for Windows 10 but there are "free" alternatives.  So when launching the Terminal Emulator program, it should allow you to set the "baud rate" of the adapter cable, then hit Carriage Return a couple of times and you should be talking to the BASIC command-line interpreter!

usb to db9 rs232 adapter cable

...Another thing I'm concerned about is the breadboard part where you wrote "a few resistors and capacitors."  That isn't too specific, and I wouldn't know where to begin.

Right.  It's just that these digital/microcomputer chips are electrically "fragile".  When attaching them to the real world like a foot-pedal switch with several feet of cable or what have you, you need to give some thought to protection from glitches, spikes, noise, and other nastiness.  Likewise, the digital signal are generally not robust enough to drive a relay which (as I understand it) you need to momentarily "open" the secondary circuit.  Hence, I suspect you'd need to add some "stuff".  But you're correct that this would need additional clarification albeit the actual cost would be modest - $1 or $2. 

...Is the "bistable MCU" a one-bit storage system for the state of the footswitch in my example?  I'm not an EE so all of these terms are foreign to me.

Right.  In the same way that you use the variables A and B in your BASIC program, you need memory to know which state you're in so that you know what to look for to interpret a change of state.

...I can't be the only one who has ever needed to lock and unlock a "latching" target circuit with a momentary pulse.  I guess when I posted, I was hoping that a circuit like this was commercially available.

Upon further reflection, I think the general concept has several applications in O-gauge trains.  I was thinking about some earlier OGR threads about things like two trains or trolleys that alternate running on the main loop and benefit from time-delays to make the action more realistic.

OK, while I still think the Arduino approach is the way to go, I'm assuming this is not in the cards.

Stand by - I ought to be able to cobble together some kind of relay/timer module concoction that does not require assembling and soldering a bucket of tiny electronic components.

Attachments

Images (1)
  • usb to db9 rs232 adapter cable
stan2004 posted:
to drive a relay which (as I understand it) you need to momentarily "open" the secondary circuit. 

I don't have the experience to say whether a relay is necessary or not.  I think you or someone on this thread suggested it and it sounds reasonable.  But, yes, the idea is that the secondary circuit (which is normally closed) opens briefly for a short but consistent window, and then closes again.

I bought a surplus SPDT footswitch and experimented by pressing it very slowly.  Unfortunately the one I bought is a common make-make switch, and what I need is a break-then-make "slow action" switch.  Even then, the duration of the open "window" would depend on how quickly the user pressed the switch down.  And it's very possible that if the switch were pressed or released rapidly, the window wouldn't remain open long enough to be recognized by the target device.  That's why I believe some type of timer circuit is needed, to ensure consistent operation.  Using a software approach also provides the needed adjustability.  Otherwise I suppose you would have to swap capacitors, resistors, etc., on a trial-and-error basis.

Really appreciate the help.  If I were to approach the engineering or computer science department at a local community college, do you suppose the dean could point me to an enterprising senior or grad student, who could build something like this for a fee?

Back in the 80s. I did. I had a question. Sent it to the college electronic dept. 

The instructor gave it to a student. Who called me and explained. Things. It was something for my Xmas train layout.

Now days. Who knows. The way things  are. Most students want the challenge. It's up to the instructor I would say. Unless. Now it has to go by way of the president.  Cause of possible liability.

Last edited by riki

So here is a potential starting point (to be clear this is NOT ready-for-primetime!) if pursuing the modular approach using modular relays.  This would be a compromise between the discrete electronic component approach and a programmable microcontroller (Arduino, Basic Stamp, etc.).

bislope relays

dual slope trigger with holdoff using ebay relay modules

In addition to the 2 relays modules from before, this used a generic basic 12V relay module and 1 garden variety 5-cent diode.

12v relay module

 And here it is in action:

As with the discrete component approach, it is too tedious to explain every signal connection.  The idea here is to simply present the eBay relay module approach which in this case does not involve soldering or handling a fistful of tiny electronic components.  As before the raw material cost would be under $10 if purchased from eBay/Asia.

Given your self-proclaimed comfort-zone, like the discrete component approach, I do NOT recommend you try this at home either!  

But I like your idea of approaching an educational institution.  For example, this would make a nice senior project if the student implemented several of the approaches with cost analysis, pros/cons, etc.  Or even if students are not allowed to operate soldering irons or touch electrical circuits because of liability or whatever, they ought to be able to simulate one or more methods and provide you with a high degree of confidence that it would work if physically built. 

Or, perhaps some clever mechanical engineering student could dream up a non-electrical solution where the foot-pedal is modified with some springs, cams, dashpots, or what have you to generate the 0.2 sec open circuit events when the pedal is pressed and again when released!

Attachments

Images (3)
  • bislope relays
  • dual slope trigger with holdoff using ebay relay modules
  • 12v relay module
Last edited by stan2004

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.
×
×