I got a control pedal from an old sewing machine that connects to a 3.5mm jack. It fits in the audio/microphone jack of my laptop.

Is there any way that I could detect from the laptop this pedal being actioned? Is there any way extra hardware that would make this possible?

Not the real thing, but almost:

enter image description here

  • The only pedal for sewing machine I've opened was totally passive. The pedal changes a potentiometer. I think some older versions had a variable transformer inside. – UncleBod May 30 at 9:52
  • 3
    The answer is probably "it depends on the brand". It will have some electronics inside that convert how much you press into some characteristic, for example resistance (as your existing cable is not made for high current variants). When you've figured out that, ask on the electronics stackexchange how to design some extra electronics that convert this so you can connect it to an audio input. – dirkt May 30 at 9:53
  • This is about connecting generic hardware to today's machines. So moving it to EE.SE might be a good idea. – Raffzahn May 30 at 13:11
  • 1
    @Raffzahn - I agree with moving this to EE.SE, as I(and I'm sure several others) could answer this question easily, but I agree that an answer here would be out of scope of this SE. I also agree that this requires extra hardware; either a USB analog joystick adapter, a readapted USB analog joystick, or some custom hardware to convert the resistance to a low frequency AM or FM signal, which could be as simple as a single transistor oscillator or a 555 timer, and wouldn't require any coding. If he can build circuits and code, than an 8 pin microcontroller with AD and DA pins would also work... – Hitek May 31 at 3:15
  • @Raffzahn - Also, if he doesn't know hardware, then he could use a simple headphone Y-cable with the plug plugged into the audio input, and the pedal plugged into one of the jacks, and a constant frequency audio source(such as a guitar tuner that has a headphone jack) plugged into the other jack, so that the pedal gradually shunts the input from the audio generator... – Hitek May 31 at 3:39

[As mentioned. this question isn't in any way RC.SE related, as it's about generic devices and modern computers. I'll vote for moving to EE.SE and answer as if's already moved]

Is there any way that I could detect from the laptop this pedal being actioned? Is there any way extra hardware that would make this possible?

Extra hardware will do the trick - always.

Adapting it to audio input will require active electronics (an amplifier), thus you'd need a second board and a power supply.

Now, if your Laptop still holds a real Joystick port, then it might be possible by simply building a connector, as the signal might be most likely a resistive (*1), much like from an analogue (PC) Joystick. Then again, having such a port seams unlikely :)

The next best way may be to hack a USB-Joystick as interface. Remove all 'joy' ... aeh mechanical parts and hook a connector for the paddle to the input - maybe with sole analogue adaption if it uses a different ranged resistor.

The ultimate best way is to build your own controller. Like using an Arduino. Hardware would be simply adding a resistor and a connector to the analogue input. Power supply already comes with USB. The controller software will be rather simply presenting the digitized value to whatever data format / logical interface you'd prefer. Most simple would be as serial port, as handling them is already part of basic Arduino workings, Or present it again as joystick interface, more appropriate anyway for analogue data. There are plenty examples on Arduino Sites.

*1 - As DirkT already mentioned.

| improve this answer | |
  • 1
    The cheapest way would probably be to use an STM32 "Blue Pill" board from Aliexpress for about $1.70, but you'll also need an ST-Link V2 clone for $2-3 (also Aliexpress) to program it. You'll need a USB VID/PID pair but, if you're just building one for yourself, there's no harm in borrowing a random VID/PID pair for a device you're never going to install a driver for. (Read the caveats on the STU32duino wiki page for it, such as never powering it from both the USB and programmer at the same time, and bear in mind that fixing mis-spec'd USB pull-ups can be done by wiring another in parallel.) – ssokolow Jun 1 at 16:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.