How to hook up 7-pin DIN cable for toggle switch to control servo motor?

Hi,

I have a 7 pin MIDI cable that is hooked that is the connection for my toggle switch (picked up from random parts). I want to use this toggle switch to control my servo motor. But I have no idea how to properly hook up my 7-pin MIDI cable and servo motor to my Arduino Uno. Any help or direction would be very helpful.

Capture

This question had me a bit confused because it uses the word MIDI in the title and seems to be nothing to do with MIDI.
MIDI stands for Music Instrument Digital Interface which is clearly not what your problem is about. You might be confused as a real MIDI cable uses a similar connector type known as a DIN connector, but in the case of MIDI it is a 5 pin 180 degree connector. But there are many different types / pin numbers of DIN connectors.

I am guessing that you have a 7 pin DIN connector.

There is no standard way to connect a servo motor to a 7 pin DIN switch, you can use any pins you like. Making it compatible with the way another random piece of equipment is not required because the next random piece of equipment with a 7 pin DIN connector will be wired in an other way. So basically just use the pins you want.

Hope that helps.

Hi,
Welcome to the Forum.

Does your hand switch have a part number on it.
You seem to have access to the data sheet, can you please post a link to it for us.

What do you want the servo to do when you operate the hand switch?

Have you written code to basically control your servo?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

That is infinitely helpful. I didn't really know what kind of put I had and a 5-pin MIDI connection was the closest thing I could find. I absolutely thought it was weird that a MIDI connection was on a toggle switch. A DIN makes so much sense.

Tom,

Yes I have access to the Data Sheet and here is my preliminary code to switch the direction of my continuous motion servo motor. Let me know if you have any ideas.

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwid_rSonYPwAhVCXc0KHUvbCo8QFjAAegQIBBAD&url=http%3A%2F%2Fwww.logicdata.net%2Fwp-content%2Fuploads%2F2017%2F05%2FDatasheet_SMART-e_English-Rev1.pdf&usg=AOvVaw2YM_3YB9ls_CXFFMHz3Apq

Servo_Motion_Arduino_Code.ino (1.2 KB)

Hi,
I assume you want to use the handswitch HS1 to HS4.
How do you activate them, pull to gnd or pull to 5V?


Tom... :grinning: :+1: :coffee: :australia:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.