Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Cory Parsnipson
Nov 15, 2015
Little late to the last page discussion, but what does an SMD workflow look like? And what kind of decision making or tradeoffs should I consider before using or switching to SMD components?

Cojawfee posted:

If you're using breadboards to test, then through hole stuff is what you'll want. I need to buy an SMD kit to see if I'm any good at it, then I'll use SMD components for a project I'm working on.

Also curious to know what an SMD kit entails. I'm seeing these kits that let you practice soldering. Is that the same thing?

Adbot
ADBOT LOVES YOU

Cory Parsnipson
Nov 15, 2015
Sweet, thanks! This is good stuff

Cory Parsnipson
Nov 15, 2015

mobby_6kl posted:

Nah I'm pretty stupid but not that suicidal :) It's just a recitfier, I didn't realize it initially (or bother to check) but the lamp outputs around 12V AC and not DC, so when I plugged in the LED directly, I got awesome seizure-inducing flickering. I don't have a scope to check it but it seems to be stabilizing reasonably well. I cleaned up and insulated the circuit and it feats pretty neatly into the lamp housing now.

Wow that's really resourceful. Awesome! Do you have pics of the final result?

Cory Parsnipson
Nov 15, 2015
I need some help interfacing an active low signal to my charlieplex circuit...



So in the above, I have one branch of my charlieplexed circuit here connected to 2 GPIO pins. Normally, I could drop in a switch that physically bridges two contacts together in the space that has a "?" and be done with it. But I'm trying to hook up a switch thumbstick and it has one wire that is normally high and then gets connected to GND when the stick is pushed in. Just wondering what the best way to do this is?

I was looking at using a p channel MOSFET as an active low switch. So the thumbstick wire feeds into the gate and then the transistor is on when the thumbstick is pressed down. I just don't know all the things I'm supposed to worry about with biasing and proper current draw and stuff (do i need to care about continuous drain voltage? if I'm just using it to switch really small values, can I still use one of those huge ones with the metal fin on it?). I have no clue what I'm doing here...

Also, I tried to buy some singular transistors and digikey only has one through hole p channel mosfet and it's obsolete. I get the impression that people don't really use these very often? Is there something else that people like to use instead?

Cory Parsnipson
Nov 15, 2015

Slanderer posted:

I assume one side of the switch is wired in with other elements in the joystick (namely the potentiometers) that you have connected up elsewhere in your project, so that's why you're doing all this, right?

Yep that's correct, although the potentiometers are taken care of. I'm going to wire them directly to pins configured as analog inputs. You can push the joystick inwards so it clicks down and that's what I'm asking about. There is a separate wire for this digital button and it is normally at 5V, but then is shorted to ground when the thumbstick is pressed. All of this stuff is inside the joystick module and I only have access to the wire coming out of it.

ante posted:

I don't quite understand what you're trying to do here, can you elaborate?

Sure, I'll try. Let me know if it's still unclear.

I have an arduino that I'm using to charlieplex a bunch of switches together. So the GPIO pins are coming from that. Basically I have this circuit built:



And if you see in the illustration, the switches have both sides that I need to connect to the circuit.

But for one particular switch I'm trying to wire up, I want to connect it to a Nintendo Switch Thumbstick. I don't have control over the insides of the thumbstick, but what I am provided is a wire that is normally at 5V but goes to 0V when the thumbstick is pressed inwards and I'm trying to figure out how to incorporate that into the charlieplexing circuit like the other buttons. I thought I could use a p channel mosfet to use the active low logic of the thumbstick button to bridge the connection when the thumbstick is pressed down.



So imagine this is just a zoomed in portion of the previous picture, but instead of one of those switch symbols, I need to wire up this thumbstick wire to it that has the characteristics I explained to Slanderer.

babyeatingpsychopath posted:

If you don't have control of both sides of the switch, don't try to charlieplex it. If you're absolutely running out of IO pins and NEEEED to charlieplex the additional buttons, then solution is going to be annoying because most digital switches are directional.

Oh I see... I have 2 leftover pins but I was hoping not to have to use them for this. I have no idea what you mean by directional digital switches. Could you tell me more about that? (Could I solve this by putting a diode in front of the thumbstick? :sweatdrop:)

It sounds like you're implying that the using-a-transistor-as-a-switch approach probably isn't desired, but is this... uh... crazy?



E. I put the source and drain in the wrong spot. I'm reading up on transistor basics again and man I really have no idea what I'm doing. Avoiding this for the time being would be good, I think...

Cory Parsnipson fucked around with this message at 02:11 on Jan 4, 2021

Cory Parsnipson
Nov 15, 2015

babyeatingpsychopath posted:

I was implying that a FET as a switch behaves differently forward-biased as opposed to reverse-biased. I thing that's a good thing, though. It may be possible to connect the two thumb sticks on the same antiparallel circuit leg and use their body diodes to your advantage.

Does the thumb stick have a pullup on it? Is it just closed-to-ground when pressed? It may make a difference on how to get the FETs to work.

Oh ok, that's pretty cool.

I don't know for sure if there's a pullup, so I'm only assuming at this point that it does. I'm going off of this forum post: https://sudomod.com/forum/viewtopic.php?p=63104&sid=6f9c44c0381b0d7af24604690fffa5f3#p63104 where it says the button "shorts to GND when clicked".

Cory Parsnipson
Nov 15, 2015

babyeatingpsychopath posted:

I was implying that a FET as a switch behaves differently forward-biased as opposed to reverse-biased. I thing that's a good thing, though. It may be possible to connect the two thumb sticks on the same antiparallel circuit leg and use their body diodes to your advantage.

Does the thumb stick have a pullup on it? Is it just closed-to-ground when pressed? It may make a difference on how to get the FETs to work.

I like this idea and I'm going to do some reading and try and remember all the stuff about transistors that I'm supposed to know. I found some college leaflet on selecting transistors that seems useful and now I'm finding a lot of individual mosfet results on digikey. Not sure what I was doing differently before.

Cojawfee posted:

Assuming there's no weird electronics in that thing, you could try reading resistance between the button pin and the VCC and GND pins to see if they are just shorts or if there's a resistor in there.

Great idea, thanks! Took a look this morning and when the thumbstick is pressed down, the output pin and GND has about 200 ohm resistance across it (0.04V). Also notable that I have to use the breakout board contacts, so there could be some resistance introduced because of that. I'm reading infinite resistance between VCC and the output pin, so I guess there's no direct contact between those things? The voltages are approximately the same.

I have a broken thumbstick I took out of a used joycon I bought so maybe I'll take it apart and see what it looks like.

EDIT: Took a look inside, was pretty cool, still confused about some things.

The teardown:



The thumbstick button is a metal dome switch near the bottom (it's the white sticker).


On the flip side, I tried to label the VCC, GND, and button wires and it looks like it's literally shorted to ground when pressed down. I don't know how the voltage on the button pin becomes VCC when it doesn't appear to be connected to anything the button pin goes into a pullup resistor and GPIO pin in my arduino and probably does something similar in the joycon circuit (im loving dumb). Maybe something important goes on in the purple areas I labeled something trippy happens in the purple areas; maybe it's some sort of printed resistor for the potentiometers. Looks like black magic to me.

Cory Parsnipson fucked around with this message at 21:28 on Jan 4, 2021

Cory Parsnipson
Nov 15, 2015

Not Wolverine posted:

This is definitely beyond my skill, but there is a thread about someone building a custom handheld Nintendo Switch, I'm sure that guy knows a thing or two about what you are trying to do. Also, in SA Mart there is a thread for a guy who sells console mods, he also mods consoles a service. I don't know for sure, but I think he has modded a handheld before too.

I'm just winging it tbh. So far the most complicated thing I've done is replace a thumbstick in a joycon. :sweatdrop:

Cheese Thief posted:

I plan to nod my original Gameboy with a new, larger, backlit screen (will need to route it) and an audio mod, has anyone here ever modded a Gameboy before?

Seconding the recommendation to use a kit, otherwise it'll take a lot longer and require some improvising. When you only have your single working gameboy to experiment on, the stakes are high. There's a couple of kits that look pretty legit and probably come with instructions. I think they will require soldering skills, small screwdrivers, and maybe a dremel tool to cut out some extra room. At least that's what I remember was required for the GBA backlight kit.

By osmosis, I've noticed that there's an active "DMG modding" scene (DMG is part of the manufacturer serial number of gameboy and gameboy variants). Searching for "DMG modders" might bring you to some hardcore modding circles. I see a ton of custom color/backlight GBA mods people post on imgur.

Cory Parsnipson
Nov 15, 2015

Ambrose Burnside posted:

1. use a hobbyist resin 3D printer to make master tool patterns,
2. cast low-melting fusible alloys into/over the masters to produce electrically-conductive mandrels mirroring the master,
3. electroform copper over the mandrels to produce a high-detail shell (mirroring the mirrored mandrel and bringing us back to the master model geometry) that will serve as the working face of the tool,
4. melt out the fusible mandrel alloy to get a hollow shell, then backfill the shell with a different, rigid/dimensionally-accurate fusible alloy.
5. end up with a medium-duty, very high-detail composite die, produced quickly, cheaply and entirely without machine tools.
5a. as a bonus, both fusible alloys used are essentially infinitely reusable, so melted mandrels and backer alloy from worn-out/obsolete tools can be recast into new components with negligible loss.
6. use completed tooling in a generic 20-ton hydraulic press to very rapidly produce parts or finished goods, bridging artisanal production and mass-manufacturing

Holy poo poo. Whenever you're done with this I want one.

Cory Parsnipson
Nov 15, 2015

Ambrose Burnside posted:

just copper tape doubled back on itself with a grounded wire lead wrapped around the midsection, and with a crude hook/loop clasp made from some scrap wire in my brass bin. screwed with the hook geometry to fine-tune the fit and keep it snug and in contact with my skin. looks like rear end but not bad for a 5-minute cobbled-together replacement

haha, nice. Do you have to be very delicate with it?

Cory Parsnipson
Nov 15, 2015

Harvey Baldman posted:

Thanks to the thread I've made good headway with it, and this is the reward:

https://www.youtube.com/watch?v=9Yg679t6Nzs

Ooooh man, this is electronics at it's best. Great job!

Cory Parsnipson
Nov 15, 2015
So... what does everyone use to get PCBs made?

vv yeah. I also see jlcpcb but not sure if they are good.

Cory Parsnipson fucked around with this message at 02:46 on Feb 24, 2021

Cory Parsnipson
Nov 15, 2015
Thanks! This is all good stuff. I'm still reading up on everything, but do all these places accept some standard files (gerber files or something) or do any of them need proprietary software? I just downloaded KiCAD in case that matters.

Cory Parsnipson
Nov 15, 2015
I don't have anything ready to quote yet, but I'm curious to know if PCB manufacturers will cut your PCB into non-rectangular shapes? Does it cost more money to do that? For instance, if I send something to JLCPCB or OSH park that is basically a rectangle but also has a small square hole that needs to be cut out in the middle of it, will they do that for me?

Cory Parsnipson
Nov 15, 2015

Spatial posted:

Sure. I've had all sorts of weird shapes made. It doesn't cost extra, actually it's so cheap that sometimes I just have stands for things manufactured in a PCB fab with no copper lol.

Check out the middle one here:


Whoa, sweet. That's incredible!

I did a search and it looks like manufacturers may use automated CNC machines with hard tipped tools or laser cutters, etc to cut them out. Man, that's nuts.

Cory Parsnipson
Nov 15, 2015

Foxfire_ posted:

Square depends on what exactly you mean by square and what radius corners you accept. Fab place should say what they need. e.g. OSHPark wants it to be cutable with a 1.72mm endmill, so it can't be a smaller radius than that in the corners

Oh ok, got it. I just need a couple square objects to pass through the board. The actual shape of the hole isn't super important for me.

petit choux posted:

How far can you go with that anyway? Can you get a PCB cut as a button panel? I was kinda talking to this guy about doing one in aluminum but actually PCB would be better, hopefully cheaper?

Well, judging from the example above, probably. Silicon substrate won't be very sturdy, but I guess it'll be good enough if you're bracing it with a plastic case. Can't hurt to try anyway.

petit choux posted:

Can anybody point me to the first steps in designing and/or ordering this?

You can do this with KiCAD (or anything else that's PCB CAD, but KiCAD is full featured and free). The Getting Started tutorial was helpful. The feature you're looking for is called "Edge Cuts" and the tutorial briefly touches on it. Here's slightly more information here. The most important part of that link imo is the picture at the top. Just knowing that you can use edge cuts to cut out fingers connected a lot of dots for me.

Then when you have gerber files, you can go to https://pcbshopper.com/ to shop around. This is like Kayak but for PCB manufacturers. I haven't used it yet, but it was recommended to me by this thread a few pages back.

Sagebrush posted:

PCBs aren't made of silicon, just btw. They are usually fiberglass or a similar kind of resin-plus-reinforcement composite.

Oops, yeah my bad.

Cory Parsnipson fucked around with this message at 04:45 on Mar 30, 2021

Cory Parsnipson
Nov 15, 2015
Ok wtf now I gotta go find a circuit board to bend.

Cory Parsnipson
Nov 15, 2015
I want to use some through hole sockets on a PCB so I can put something expensive on the board and still take it off without having to solder it. For example, an Arduino that has male pin header (uh, standard size? 0.65mm?) on it that I'm going to take off later and re-use anyway.

1. Is this going to do what I think it does?
2. Do I need to worry about the thickness/shape of my pin header vs the socket? It feels like everything is standardized to one size.
3. Also, is this something I can break to size like the other pin header stuff?

Cory Parsnipson
Nov 15, 2015

ante posted:

Those are round-pinned machine headers, and I'd avoid them all the time. More common headers, including what comes on Arduinos, have square pins and won't fit.


Just searching 0.1" headers on aliexpress/ebay/amazon will get you excellent deals on things that are good enough. And you can just cut them to size. Male headers break away easily, but female ones are usually solid, I just use snips to cut them to length.

Something like this:

https://www.digikey.com/en/products/detail/chip-quik-inc/HDR100IMP40F-G-RA-TH/5978223

:doh: I have a lot of that. Perfect.

Cory Parsnipson
Nov 15, 2015

KnifeWrench posted:

Out of curiosity, and with no judgment, what did you think they were for? Or was it just a case of not seeing your nose right in front of your face until someone reminded you?

I have them packed away in boxes within boxes cause I've never had to use them. I got a whole bunch of both a really long time ago but I only used the male headers. I was also looking online and came across the idea of a DIP socket so I searched "removable pin header socket" and got to the part I linked in the previous post.

e. Maybe experience level is relevant too. I'm mostly used to programming, some breadboarding, and other equally technical pursuits such as watching TV and eating hot chip. It might be more self explanatory if you found me trying to remove a nail with my bare hands while having a hammer in my pocket, which would be more baffling if it happened to an expert like, say, if Adam Savage suddenly forgot how to use a wrench in the middle of his show. *queue concerned looks from his colleagues*

Cory Parsnipson fucked around with this message at 20:45 on Apr 9, 2021

Cory Parsnipson
Nov 15, 2015
I'm trying to make footprints in KiCAD and I'm confused as to how people can make such complex footprints in the given editor...



1. I read in the docs that a 50 mil or 25 mil grid is recommended. Someone on the KiCAD forums said if you don't have a grid that conforms to this, you might get "tearing" in the footprint. This sounds fine but when I actually go to make the footprint, I find that there's a lot of cases where I need to draw something that isn't aligned to the grid. For instance, in the picture above, the body of the switch (big blue rectangle) is supposed to be 3 mm x 6 mm and the button sticking out the side is 3.5 mm and needs to be centered. So basically, I just pressed Alt and put it wherever I wanted. The same applies for the footprint courtyard too. The pins, however, are aligned to the grid. I'm not sure which layers need to be aligned to the grid?

2. When making polygons and shapes, the footprint editor is basically one step above MS paint. Does everyone seriously use this to make stuff? I've found something called KiCAD Stepup which supposedly lets you make footprints using the FreeCAD sketcher, which is what I thought making footprints would be like. Is drawing shapes using parametric sketching something that people do in this industry?

Cory Parsnipson
Nov 15, 2015
Thanks!

Shame Boy posted:

I do, it sucks rear end, you get used to it. For anything even remotely complex though I just make an SVG and import it.

What do you use to make the SVG?

Cory Parsnipson
Nov 15, 2015
I made another footprint for a small SMD switch. Could I get a critique? I don't really know specifically what I'm asking to focus on. From looking at the documentation, making footprints seems a lot more open to interpretation than making symbols is and I'm generally unsure of a lot of stuff.


This is a footprint for the TL3312NF160Q metal dome SMD switch.

There's a datasheet with the dimensions here

1. Generally, what are the layers I need and layers I don't need? It sounds like a lot of it depends on the design and the manufacturer's preference. So far, I'm gathering that the common ones are copper, silkscreens, and courtyards? I heard the fab layers are for documentation and may be optional but all the default footprints have them so I included it in mine (and also, basically the fab layer roughly copies the silkscreen layer?).

2. What's the level of detail I need for everything? This is probably more of an art and experience based. At the bare minimum I guess I could get away with just a square encompassing the perimeter of the part and 4 pads right? On the other hand, I think the two fins on the sides will help me orient the switch when it's time to solder it on. I dunno, just wondering if there are rules of thumb or some poo poo.

3. How do I know if it's right?? I mean I followed the dimensions in the datasheet, but if I get it back and it just doesn't fit, I need to make a change, pay the money again, and wait for shipping? Are there any life hacks to make this less of a money and time sink?

4. Tangentially related FreeCAD question:



I'm looking for the button that lets me make the "yellow tag" labels pictured in the object tree above. What is this called? I found stuff in the drafting workbench, but those aren't it and searching online isn't turning anything up...

Thanks!

Cory Parsnipson
Nov 15, 2015

ante posted:

Ah man. Seriously just grab a different switch's footprint and modify the dimensions to fit your part. You're also going to need the mask layer. If you're manufacturing, you're going to need the paste layer, and also the fab layer.

Basically every layer is important, and you're going to mess something up in extremely subtle ways if you're trying to do it from the ground up.

Modifying an existing part will teach you how to put them together, so you'll be able to do it from the ground up in the future.

:confused: I'm gonna have to disagree here. If I take an existing switch and move some lines around it's still going to be as inscrutable as it was when I started. I'm looking at a lot of these pre-existing footprints and I'm not really figuring out why the creators did what they did just by looking at things.

Cory Parsnipson
Nov 15, 2015

Foxfire_ posted:

1. If you're assembling it yourself, copper & silkscreen. Courtyard if you want your CAD to yell at you when you place things too close together.
2. Again, if you're assembling it yourself, you are the end-user of the silkscreen. I would recommend including RefDes & some symbols if you need an orientation. For things that have standard symbols, drawing those will get you better results than just a dot by a pin or making up your own convention (i.e. draw a diode in silkscreen instead of a bar/dot and an assembler is less likely to mess it up)
3. Print the board out on paper at 1:1 scale and physically put the parts on top of it to see that everything fits.

Great idea, thanks! Also, is "RefDes" referring to reference string and a description string? Is that the same as the "Reference" and "Value" strings in the KiCAD footprint editor...?

csammis posted:

The point of starting with an existing footprint, figuring out what you need to modify (by asking if necessary), and then doing it is so you don’t have to know everything about why footprints are designed the way they are on Day One. It’s the difference between getting something actually fabbed and in your hands versus being a one-person wheel reinvention station and not getting a physical result until much later (and it’s still going to have something wrong, happens to everyone).

Ok well too bad, I'm learning how to make a footprint. I feel like I'm being told to stop asking questions and finish the homework. It's not like I'm going to miss an important deadline or get fired. I like knowing all about what I'm doing and if it takes some extra time, so be it. I mean, within reason, obviously I want to finish whatever it is I'm doing. I'm basing my decision on what has been explained to me and have yet to hear a good reason otherwise. I'm okay with jumping in as long as it doesn't cost hundreds of extra dollars and/or months of lost time.

I wanna explicitly say that I've been getting awesome advice from everyone and things have been mostly good natured and helpful. I really appreciate it and I don't think I'd have gotten this far without everyone's input. I don't want to hurt anyone's feelings. But sometimes I choose to ignore certain pieces of (still good) advice.

M_Gargantua posted:

The footprint editor will handle all the layers for you if you don’t fight it. Just don’t do something silly like turn off solder mask.

For that footprint one thing I would say is to not have any silk screen directly abut a pad like that. Best practice is to give it the same clearance you would trades pads. Or like 0.15mm. Not that it’s going to bite you on something big like a switch, but silk misalignment can cause an issue if it prints on a pad as you get into smaller stuff.

Oh, uhhhh ok. This isn't something that sounds really stupid to me yet, but I double checked and there is a solder mask. So... I guess that's good.

Also, could you elaborate on "Best practice is to give it the same clearance you would trades pads"? I can't picture what you mean by this. Unless you just mean "give it some clearance". In that case, got it. :thumbsup:

M_Gargantua posted:

Too add a little bit about the layers

Courtyard layer is the area where it will cause mechanical issues with assembly with nearby parts, and must be a single continuous boundary.
Fabrication layer should be matching the mechanical drawing
Silk should be placed so that there is nothing under anything the fab layer covers, as silkscreen under a part is only useful on initial hand assembly, and screw you for future troubleshooting
Copper is the manufacturer recommended solder pad for the package
and Mask will be the copper + whatever the manufactures recommended solder mask clearance is for that part and package.

If you're playing nice you can add a note in either the commends layer or the drawings layer for what the stencil thickness would be for that footprint mask that way you can know to change it when you have a few parts that the manufacturer specified a thicker/thinner stencil then the bulk.

Pro level is you put the part find number in the drawings layer and when you make a board you drag all the drawing find numbers over to a BOM in your drawings layer, and hence get an engineering drawing out of the deal.

Ahhhh, holy poo poo. Yeah a lot of stuff just made sense to me, thanks! I made some changes:

Cory Parsnipson
Nov 15, 2015

ante posted:

For example, the first think you'll see when you open up a standard part library component is this:



You'll immediately see a couple differences with your footprint, and which no one told you about either, because we missed it. That being the REF** on two different layers, and also the part number on the fab layer.

From there, you can investigate what REF** means - KiCad replaces it on your PCB with the refdes mentioned above. C1, or SW2, or whatever. I think Eagle might follow that format of your % symbols.

Double click on one of the pads, and you'll find this:



You can see that KiCad specifically allows you to set pads in multiple layers, so you don't need to add multiple zones on different layers on the same place. This one is on the copper, paste, and mask layer.

There are a couple other features that, I dunno, I find interesting, anyway. This footprint is similar to how I would design it, but it's interesting to see how other people do it. Some components are designed in completely different ways than I would.

Anyway. I'm not going to harp on about it, but there are a couple more suggestions for you to add to your footprint :)

Thanks for being understanding. I might have misinterpreted the tone of your earlier post.

Yeah that's a little weird. Apparently REF** and VAL** were used until very recently before version 5 came out, but REF** and VAL** are still the default values. I found here that they prefer %R, %V for some reason: https://forum.kicad.info/t/ref-val-text-substitution/2774. I tried with both and they give me the same result:


In the main layout tool, the reference appears to be replaced with the part annotation and the value is the value/human assigned name of the schematic symbol.


What I see on existing footprints is that the fab has text with a part number and also the REF** value somewhere. The silkscreen has another REF** on it. So I rejiggered it to match what they did.



Also yes, double checked that the pads have adhesive, mask, and copper layers, which match other footprints. Good to know

sharkytm posted:

Typo: "Best practice is to give it the same clearance you would trades traces /pads"

Ah ok, thanks!

Shame Boy posted:

2. Draw the outline dimensions of the thing in the "F. Fab" layer, using thin (0.1mm or 0.05mm) lines. These I draw to the exact size according to the datasheet or my own measurements. It should more or less be an accurate top-down outline, with enough detail to more or less tell what you're looking at. Doesn't have to be too complex, but I usually at least always include the body and the pins. By doing this, you can also check to make sure the pins are, y'know, in sane positions relative to the pads, and you didn't screw up somewhere.

3. Draw whatever pretty graphic you want to show up on the "F. Silkscreen" layer. I generally start by outlining some of the F. Fab layer drawing, since that way when you look straight down on the finished thing you should just about see the silkscreen around the outside. Helps a lot to position the part if you're assembling by hand, too.

3a. Remember to indicate which is pin 1, or which side is up, etc in your silkscreen drawing somehow. I like to just put a little arrow next to pin 1. You can use a dot, or just double up some lines in the corner near it, etc.

Thanks for mentioning that stuff about pin 1. I notice that existing footprints sometimes also use a little "corner bracket" to mark it. I think I better understand what Foxfire_ was saying about dots earlier too.

csammis posted:

I personally would not have been able to accomplish anything if I had to build every footprint when I was starting out on PCB design because I'd have gotten frustrated and stopped. Knowing that an entire library of examples was right there and not building off it, I genuinely can't even imagine that.

What do you think I'm doing? I'm not going to make custom footprints of everything on my board and I'm not making it blind. There's 3 pieces that I can't find footprints in either the library or the internet because one switch I wanted to turn on its side, another was this metal dome switch, and the third I got an Eagle model that I need to figure out how to import into KiCAD. When I'm reading and making the footprint, I switch back and forth between something else and the new footprint when I'm building it. I'm using reference but I didn't copy paste it into the editor. If you can't imagine what doing this looks like, just scroll up a little bit and look at the picture. I spent about 2 hours making that and 3-4 times that amount explaining myself to people over the internet.

csammis posted:

I feel like I struck a nerve with the wheel-reinvention comment, that was not my intent and I apologize.

Yes, you hit me right in my soft pissbaby spot. NO, it's because I don't appreciate feeling like I'm being second guessed so much. When something like this happens I end up having to repeat myself two to three times to try explain why I'm not going to do things in THe oPtimAl WaY. The reason is that I don't want to do it and I'm not going to. loving christ.

Cory Parsnipson
Nov 15, 2015
I don't know how familiar you are with key matrix so maybe this is redundant info, but I found this page is helpful and complete with diagrams and code examples.

Hmmm, also not sure what the next step is but that circuit board looks tricky to understand. Just from looking at it for a couple minutes, I keep getting lost in the through holes in the middle. Not sure how those might be connected without a picture of the backside. Maybe a good next step would be to map out how the key matrix is laid out by recreating that portion of the schematic on a separate piece of paper. If the matrix consists of the dpad, ABXY, L2, and R2, then I guess there are also at least 7 (4x3 or 3x4 = 12 buttons, the smallest rectangular number >10) wires coming out of that board that are intended to go to some microcontroller on another component in the wheel. If that's the case, then if you can identify those wires and hook them up to the Arduino instead, you can basically copy and paste the code snippet from the link and be able to read the input.

If I'm not remembering things wrong, the good news is that you don't have to map out all 10 buttons before you can test if things are working. You can start with one button and try to figure out which wire connected to it is acting as col and which is acting as row and then drive those two wire with the Arduino and short the button of interest to test things out while ignoring all the other buttons.

I tried a little here:



It appears the leftmost 4 buttons are wired together on the same row (highlighted in red/orange). Past the black rectangle things, are what I think are 4 column wires coming out (highlighted in dark blue, light blue, yellow, and purple). I put ??? where I completely lost where the traces were going.

Cory Parsnipson fucked around with this message at 03:33 on Apr 18, 2021

Cory Parsnipson
Nov 15, 2015

petit choux posted:

Yeah, thanks much, it's good to hear. I'm sorry to see this thread is so far beyond my skill set and knowledge because I don't want to just be a part of "maker culture" but there are no active relevant threads at SA. The DIY instrument thread is deader than a doornail. I'll probably come begging for help again sometime soon.

If you're feeling inadequate that's a good sign that you're learning something. I don't think there's any way around it if you're trying to make something new and cool. You gotta own it. Nobody can stop you from posting. Watch this

Power is directly proportional to current. Pi is exactly 3. :smug:

e. vvv uh ok, yeah. I should add that maybe starting with a power circuit project isn't the best idea. You can't bungle your way through safety precautions. Other than that go hog wild

ee. OH YEAH I FORgot about LASERS. Maybe lasers is a bad idea. Or... maybe lasers is a good idea? :shrug:

Cory Parsnipson fucked around with this message at 21:23 on May 18, 2021

Cory Parsnipson
Nov 15, 2015
Hey great post! I mean I'm not looking to gently caress with wall power anytime soon but this is good to know. Any more tips to keep from shocking yourself? Would it help to wear gloves?

Cory Parsnipson
Nov 15, 2015

jovial_cynic posted:

Well, code, plus engineer the wiring, tie together some circuit boards, solder a bunch of wires together... and voila.

I think you mean ... and violin :v:

That's a very cool result! Also I like how you're doing vibrato on a tactile switch. Does the midi sample apply that effect on sustained notes or do you do it manually by pushing a second switch with your right hand?

Cory Parsnipson
Nov 15, 2015

jovial_cynic posted:

I do it out of habit as an actual violin player. However, the vibrato is 100% coming from the virtual instrument in the DAW.

I've considered a v2 of the instrument that will allow me to add a few effects, specifically the vibrato, and perhaps some things like looping or other wild MIDI functions. The only hiccup is that all of the I/O pins on the microprocessor I'm using are used up, so I'd have to either add in a multiplexer, or use a different board entirely. So... that might depend on how many of these guys I sell, and if there seems to be some interest in those added functions.


Also... I've referred to this instrument as a "Handolin," or "handheld violin/mandolin" controller. But I programmed a low "C" on the instrument, so it's technically a viola as well.

Nice. As has been recommended by people in this thread to me before, you could add a GPIO expander, a key matrix IC, or do a key matrix manually. I think the pro micro is great cause it's cheap and widely used for keyboards and stuff. I guess there's also the ESP32 family of processors recommended to me by Forseti that should have much more GPIO than you need and is even cheaper to obtain than the pro micro.

Are you planning on beefing up the enclosure to be like the top of a mini violin? I think it would be cool, especially if there was enough to hold it in your chin. It would be tougher to print/make something like that though.

Cory Parsnipson
Nov 15, 2015

ante posted:

The APS815 bluetooth module probably does all of the heavy lifting. That certainly is a mostly bare board

Huh, that's weird. Why did they lay out a whole board if they didn't need half of the components?

Cory Parsnipson
Nov 15, 2015

petit choux posted:

They wanted to save on floor demos. It's a big retail chain, they did a short run of a few hundred probably. Also it's designed to only play a few seconds of like 4 pieces of music and then shut down.

ante posted:

OP said it was a demo unit, so it looks like they didn't bother putting in a speaker, a battery, some clock setting ability, and maybe some other stuff, based on the silkscreens

Ahh gotcha. I missed that chunk of text in the middle.

Cory Parsnipson
Nov 15, 2015
Are small FPC cables really, really delicate? Or am I manhandling them? I have 3 Nintendo Switch thumbsticks like this one here:



and I'm finding that all of them stopped working. Or at least I think it's the thumbsticks because if I do a continuity test and voltimeter probe of all the downstream connections leading into my microcontroller, everything looks fine (I can even bridge some signals to ground and watch the analog signal go to 0, watch a button become pressed, etc). Why I think it's the thumbsticks is because until today, I had one hooked up working perfectly and then went to go add a second thumbstick. The second thumbstick looked like there was no connection, meaning I saw a very noisy analog signal that wasn't affected by the thumbstick movement. I took out the working one and swapped it into the second connector. At this point, I saw that the x axis was responding, but the y axis was noisy and not responding. But then when I went to put the good thumbstick back into the original spot, the x axis was good and the y axis was still broken! And soon after that, neither axis was good and all three were behaving the same.

Am I killing the connections with static shock? Or bending them too hard and causing some sort of internal breakage? I put them into and out of the ZIF connector with my fingers and as far as I can tell I don't use too much force, though occasionally I need to bend it 90 degrees to push it into the slot.

I'm not sure if that's enough information to give a sensible answer, but I'm trying to figure out if there's anything I can do to avoid going through packs of these like candy...

Cory Parsnipson fucked around with this message at 04:12 on Jun 16, 2021

Cory Parsnipson
Nov 15, 2015
e.

Cory Parsnipson posted:

Are small FPC cables really, really delicate? Or am I manhandling them? I have 3 Nintendo Switch thumbsticks like this one here:



and I'm finding that all of them stopped working. Or at least I think it's the thumbsticks because if I do a continuity test and voltimeter probe of all the downstream connections leading into my microcontroller, everything looks fine (I can even bridge some signals to ground and watch the analog signal go to 0, watch a button become pressed, etc). Why I think it's the thumbsticks is because until today, I had one hooked up working perfectly and then went to go add a second thumbstick. The second thumbstick looked like there was no connection, meaning I saw a very noisy analog signal that wasn't affected by the thumbstick movement. I took out the working one and swapped it into the second connector. At this point, I saw that the x axis was responding, but the y axis was noisy and not responding. But then when I went to put the good thumbstick back into the original spot, the x axis was good and the y axis was still broken! And soon after that, neither axis was good and all three were behaving the same.

Am I killing the connections with static shock? Or bending them too hard and causing some sort of internal breakage? I put them into and out of the ZIF connector with my fingers and as far as I can tell I don't use too much force, though occasionally I need to bend it 90 degrees to push it into the slot.

I'm not sure if that's enough information to give a sensible answer, but I'm trying to figure out if there's anything I can do to avoid going through packs of these like candy...



mewse posted:

Maybe the housing on the nintendo switch mechanically prevents movements to the outer limit of the joystick and that's what's killing them. Just a wild rear end guess because your board looks clean

Hmm, for the switch specifically, the thumbstick module is all inclusive--you should be able to use it without any additional parts. The joycon enclosures don't impinge on the thumbstick itself. But I know that they did that for the GameCube controllers.

Also maybe I should mention that I did hotswap them while the device was powered on. Since the thumbstick is just a bunch of passive components and springs, I don't think this would cause a problem, but yeah I guess I shouldn't do that.

Cory Parsnipson fucked around with this message at 18:41 on Jun 16, 2021

Cory Parsnipson
Nov 15, 2015

Foxfire_ posted:

Cables themselves are not fragile. The connectors holding them can be, but that's generally more unseating the cable or wearing out a friction latch.

Ok, so if the solder points of the connector onto the PCB are still strong, can it still fail somehow because the contacts inside wore out? Just wondering if it's possible that the connector looks and acts perfectly fine, but might be the cause for bad connection.

Cojawfee posted:

Those connectors are not made for constant handling and plugging and unplugging. You're supposed solder it to a PCB, connect the ribbon once, and then seal up the device and never touch it again except for maybe a couple maintenance replacements.

Yeah, I fiddled around with the thumbstick when plugged in a whole bunch when trying to get measurements for modeling the enclosures and then I wanna say that maybe I plugged and unplugged the last one that failed about a dozen times. Would that be enough to see this kind of behavior?

Hopefully at this point, I can just hook up the new ones I ordered and then not touch them anymore. I should mark a couple of the duds and keep them around for future R&D.

Cory Parsnipson
Nov 15, 2015

Cojawfee posted:

It depends on which end you're connecting and disconnecting. FPC connectors are usually rated for something like 20-30 cycles. So if you're messing with the connector on your green PCB there, that's what's being damaged by multiple connections.

Oh man, so it sounds like I only have a few tries to get it seated right and put into the enclosure. Now this is turning stressful. :ohdear:

This is the FPC connector I'm using, btw: https://www.digikey.com/short/9n5tw9d0

Cory Parsnipson
Nov 15, 2015

longview posted:

I've used the flip lock types like you linked for all kinds of stuff including programming headers that are used fairly often, never had any issues with reliability so far.
Those connectors are basically free on AliExpress - they're kind of a pain to solder (very easy to bridge the contacts) but they come right off with hot air at least.

But I've only used mine with standard FPC cable assemblies, maybe those Nintendo assemblies are slightly different?
Standard cables are reinforced with a blue piece of plastic around the contacts which is also there to increase the thickness, is that there on the joystick cable?
Those cables are relatively hard to pull out when the latch is closed (the cable will come out before the connector is ripped off the board though)

Could also be contamination on the contact area, try cleaning it?
Visual inspection of the contact area on the joystick end? Typically you'll see little marks in the gold/tin plating where the contacts actually make contact.

Yeah, the Nintendo thumbstick has a small square of reinforcement material, but for these specific thumbsticks, it's the same translucent black color as the cable (some of them have blue cables, official ones included, I think). Cleaning is a good idea. I'll try that, the older ones have some scuff marks on the contact surface.

e. Tried cleaning with a cotton swab and 90% isopropyl alcohol. My circuit seems to feel like setting the analog inputs both to -32767 and then gyrating wildly along the diagonal today. The x and y axis seem to be coupled, but it's also just completely noise. :(

ee. I paid :10bux: to get some replacements overnighted and I just put one in and it's crystal clear. So I guess it is the thumbsticks. :shrug: Not the best outcome, imo, cause that just means I got to be extra delicate with every thumbstick from now on. Also I bought a 10 pack from Aliexpress for the time being and it'll be here in a month. I think it would just be better for me to switch to something else but I like the form factor. I wish these were more robust... Or maybe I'm doing something they don't like, but there's a fat chance of figuring out exactly what.

Thanks everyone for your help!

Cory Parsnipson fucked around with this message at 00:13 on Jun 17, 2021

Cory Parsnipson
Nov 15, 2015

TacoHavoc posted:

Thinking about this a little bit, what does the circuit around these look like? How are you powering them and reading them?

Aha... not so clean :sweatdrop:



There's an Arduino pro micro in the middle and on both sides there's analog signals coming in from the thumbsticks through white and brown wires. They connect to the A0, A1, A2, and A3 pins on the middle of the top of the Arduino, which happen to be consecutive pins all in the same row. The Arduino is powered either directly from a USB A to USB micro cable or from the Raspberry pi via USB. In the software, I read them using the provided analogRead() from the Arduino library. (Code here if needed)

Let me know if you want a close up of the Arduino pins and I'll try my best.

Adbot
ADBOT LOVES YOU

Cory Parsnipson
Nov 15, 2015

Shame Boy posted:

Can you try and sketch how the thumbstick is wired up? What you're describing sounds to me like you're missing a ground connection somewhere so the analog pins are just reading random noise coming from the power lines in your house, I've had that happen before and got the same exact result of "weird random-y numbers that tend to max out the scale". If the thumbstick is a potentiometer-type I'd think it's going to need more than just analog connections, for instance...

e: I guess I can see red and black wires going to the thumbsticks in that picture, I assume that's power and ground? I'd double-check they're going to the right place... maybe you wired ground to the switch or something?

Yep, red is VCC and black is ground. I have this rather busy and crude diagram that explains everything:



There's a fifth wire coming out of the thumbstick in green that goes directly to GPIO pin 2 (or 9 for the right thumbstick) (the diagram is out of date). I used a multimeter to check the connections a couple times. I did a continuity check from the thumbstick breakout board solder joints to the tiny part of the pin that sticks out from the pin header on top of the Arduino. Coupled with another check from the thumbstick breakout board through-holes to the corresponding tine in the FPC connector that should verify the connection from the FPC connector all the way to the input pins of the micro controller. The differential between power and ground read ~ +4.82V as expected.

I swapped out the thumbsticks for a new pair I got yesterday and after that everything started working again. So it seems to be an issue with the old thumbsticks. What I think happened is that I severed the traces internally by wiggling the cable back and forth too much. I fiddled with them on and off for a few weeks trying different orientations and positioning of the breakout board w.r.t. to the thumbstick body. Now that I type it all out I suppose that's a lot of abuse going to the cable. I thought I could treat it like insulated wire but apparently it's not as durable.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply