So I bought a scroll wheel and want to connect it to my raspberry pi 2 so I can program it to interact with a web app I'm writing. I'm a brand new hobbyist to electrical engineering. I have learned that I need a PCB to use this scroll wheel with my raspberry pi but the part didn't come with a pcb like other different types of switches did and the datasheet that I was given didn't provide a pcb circuit design.

It only gave a layout and I was told by a friend that that is not enough to design a pcb. That layout is in the PDF link I attached(the specific specs for what I bought are on page 3 of 3). How do I design a pcb layout for the part that I need?

I found lots of software that I can design it with but the problem is that I don't know what to design or how to design it correctly. All I know about this part is that is has a thru-hole connection.

Datasheet - http://www.ckswitches.com/media/1346/tsw.pdf

Part name - TSWB-3N-CB222 LFS

  • (Central select with jog and 4 directions, black central button, dial & direction ring)
  • \$\begingroup\$ A good place to start \$\endgroup\$ – Tom Carpenter Jan 3 '17 at 22:13
  • \$\begingroup\$ Thanks Tom. I just made a few edits to my post after you commented. Idk if that changes your answer at all or if you have any other advice. Thanks again \$\endgroup\$ – jeff Jan 3 '17 at 22:17
  • \$\begingroup\$ It sounds like the first thing you need to do is to learn the basic steps of PCB design in some program or other, hence the above link. \$\endgroup\$ – Tom Carpenter Jan 3 '17 at 22:23
  • \$\begingroup\$ Okay. From what you see just at first glance is this a project that a beginner can do? \$\endgroup\$ – jeff Jan 3 '17 at 22:24
  • \$\begingroup\$ Probably, shouldn't be too difficult. There is a library for Eagle here which contains the switch you need. Though be sure to check the footprint is correct as I found it with a cursory Google search - it looks about right from a quick glance. \$\endgroup\$ – Tom Carpenter Jan 3 '17 at 22:25

Follow the datasheet specifications.

enter image description here

The datasheet you provided has the PCB layout specifications. The pins are labeled A, B, NO, and COM, which are all the electrical connections you need. Your friend is wrong.

The procedure is to pick one of the holes, I'd go with the one labeled 'B', place it in your PCB software and then place the other holes relative to it. For instance, the hole labeled 'A' is 9.26 mm left and 9.31 mm up from 'B'. Thus, if B is at location (0,0) then A is at (-9.26,9.31) in a scale of millimeters.

For a tutorial on creating a new part, see this Sparkfun tutorial for Eagle.


My mistake, you have the slightly more complex layout. It's much less confusing if you design the part with a 45° rotation and then rotate it when you place it though. So enter the design like this:

enter image description here

Then rotate to you desired orientation when you place the part in the PCB design software. The above procedure and tutorial are still valid for this, or any, part you have a datasheet for though.

Or Google it

As mentioned by Tom in the comments, you can find the part in an existing Eagle library. I'm not surprised to see they also have the part rotated into a more reasonable orientation for design entry.

enter image description here

You can verify this is the correct design by looking at the measurements of the pads in Eagle or by printing it out from Eagle at 1:1 scale and placing your part on top of it.

  • \$\begingroup\$ The OP wants the most complicated switch - PCB layout is on the last page of the datasheet. It looks like a nasty thing to lay out as the pins are in seemingly random positions - not on a nice even grid - but all the required info seems to be there. \$\endgroup\$ – Peter Bennett Jan 3 '17 at 23:02
  • \$\begingroup\$ @PeterBennett Ah, thanks, I've corrected the answer. I think it's less hairy looking when you rotate it first. \$\endgroup\$ – Samuel Jan 3 '17 at 23:11
  • \$\begingroup\$ Thank you everyone for all of this info. For a newbie hobbyist who has been stuck for a while this is super helpful. I really appreciate it!! \$\endgroup\$ – jeff Jan 4 '17 at 14:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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