Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Keyboard sustain pedal

Status
Not open for further replies.

Dan East

New Member
I have a Casio keyboard, with which I wish to use a high quality Yamaha sustain pedal. The problem is that the two use inverse logic from the other. It is a simple two conductor setup. The Casio expects the circuit to be closed when the pedal is pressed, while the Yamaha pedal does the opposite, and breaks the circuit when the pedal is down.

I cannot reverse the logic mechanically. I can definitely make a logic inverter using a PIC that would do the trick. However I do not want to have to use a power supply (battery or otherwise) to power the adapter. I will look into parasitic power if necessary.

Before I use a PIC, which seems like overkill, does anyone have any suggestion for how to invert the logic without requiring external power? The voltage output by the keyboard is a convenient 5V DC.

Thanks!

Dan East
 
YOu need to provide power references at the very least. You can make an inverter with just two transistors, but I think timing problems may arise if you do it this simply.

Or you could try some kind of weird pull-up or pull-down circuit, but this still requires a voltage reference.
 
Last edited:
If you open the Pedal, maybe, you'll find an extra pin on the switch... if so it may be just what you need to hack it.

Of course a PIC is really too much for what you need to do. A simple transistor with 2 resistors will do the job.

Another idea is to modify the keyboard... wich i suspect is not really attractive to you.
 
Last edited:
dknguyen said:
YOu need to provide power references at the very least. You can make an inverter with just two transistors, but I think timing problems may arise if you do it this simply.

Or you could try some kind of weird pull-up or pull-down circuit, but this still requires a voltage reference.

The pedal is nothing more than a momentary, normally closed switch. This isn't a digital interface, and timing-wise, latency as high as 50 mS would be perfectly fine. :)

Dan East
 
mister_e said:
If you open the Pedal, maybe, you'll find an extra pin on the switch... if so it may be just what you need to hack it.

Of course a PIC is really too much for what you need to do. A simple transistor with 2 resistors will do the job.

Another idea is to modify the keyboard... wich i suspect is not really attractive to you.

I looked at the pedal to see if I could make a physical or mechanical modification, and no option was available. Modifying the keyboard is out of the question. The keyboard provides .5 mA @ 5 V, but I do not know how much current flow is required to trigger. I guess I'll have to experiment.

Dan East
 
Hi,

Interesting topic.
If I understand your problem correctly, as you stated, it is simply a logic inversion problem. The switch in the pedal is normally closed, until you depress the pedal, then its open circuit. You want it the other way around.

I take it you don't want to use a reed relay? It'll need battery power, so a small little box with the input from the pedal and the output for the keyboard would be needed, but I can't see it being bigger than a box of matches. Also, provides perfect isolation.
The only problem I can see here is that, with the switch 'open' (pedal pressed) its open circuit. Is it pulled up or down? A simple test with a voltmeter connected to the casio's GND on the powersupply and the 'pedal in' pins would do. (Sorry if I sound patronising).

Someone mentioned making an inverter with two transistors. You can do it with one transistor and 2 resistors, providing you don't need it running at super low current.
For NPN:

E = GND
B = input via resistor
C = output, pulled high by a resistor to +v

The value would probably require experimentation, but, with 0.5ma, I guess 1k for both is a starting point. Whether the transistor is NPN or PNP depends on the polarity of the switch, or rather the voltage on each of the 'pedal in' pins on the casio is. As for 'power', does the '5v 0.5ma' come from the pedal cable itself? ie: when they are connected, 0.5ma flows, and the keyboards PSU voltage is 5v?
Off the top of my head, I can think of many ways to do this, all of which are a great deal easier, and cheaper, than using a PIC. (logic gates, transistors, Bipolar and FET, analogue switches..)

Mechanical modification of the pedal is probaly not your cup of tea, and it might not be best anyway. Push-to-break switches are used so that the pedal 'unswitches' when it is only slightly depressed, having most of the 'travel' after it has done its job. Whereas push-to-make usually have all the 'travel' before it switches (not always though).

Sorry for a long post, hope this helps in some way.

Blueteeth.
 
Thanks for the ideas. Yes, the voltage comes through the pedal connector. One problem is there is no ground. I only have two conductors to work with - I either allow current to flow or I don't. If this can be done with a transistor could you please provide more detail? I have plenty of PICs lying around, and am setup to program them. However I also have transistors lying around too, so I would rather go the simpler route if there is one.

The pedal is normally closed (conducts) and is momentarily open. I need the opposite logic.

Thanks.

Dan East
 
Hi agian,

Hmm, I was hoping you would have access to the power of the keyboard, just using 2 wires, that carry 0.5ma when connected, is tricky.

A 'PIC' would need power. You can get some low power versions, but they generally rely on 'sleep mode', where nothing much can be done, and is used when the PIC really has nothing to do except use up vital power. I don't understand why you are so eager to use them, they would use more current than a simple transistor circuit, take up space, possibly require an external osc and other external components... and the code would probably consist of 4 lines. (if -then- else type affair).

I honestly can't see a way of using the PIC's without an external power source, and even then what would it do? Someone mentioned 'over-kill', like using a PC to make an led flash.

All we need to do is 'connect' two wires. Without a 'GND' it seems we can't just connect the GND's of the circuits (medal adapter box and keyboard) and control the 'sustain' signal with logic. Now, when you connect your multimeter to each of the leads/wires, is there a voltage across them? Thats a sure way to test the direction of current flow, so we can use standard transistors (after all, they're polarity sensitive). However, any circuit thats connected to these '2 wires' would draw some current, therefore, current would flow, and so....if enough current flows (0.5mA?) the keyboard will interperet this as 'pedal off'. One other thing...if the wires carry 0.5ma (again, I'm assuming) when they are shorted, then this is the maximum current that can flow, we can't draw any more.

I'm still going with a reed relay, or an FET (very high impedence when turned off) both would provide 'some' form of isolation, however, I think both would require an external power source (albeit, a few mA, but not quite 0.5ma :/ ).

Sorry for rambling, but its one of those problems that seems simple, but is actually really difficult, unless I'm over complicating things, which happens all too often.

Blueteeth.
 
I'm pretty sure Yamaha keyboards can be programmed to change the polarity of the pedal, maybe Casio can do the same? Suggest a careful scrutiny of the user manual, or contact casio and ask.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top