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
Shame Boy
Mar 2, 2010

FISHMANPET posted:

I've definitely been :spergin: about the best way to do this. There will be a board in the project already so I can put in a chip if I need to, though I'm not sure what putting the signal through an AND gate gets me that I don't get from just making it a single loop, in this application. It seems like even with the AND gate, you could turn one of the switches on and hold it, and then once the other one turns on the gate would activate.

I'm not good enough with Python and threading yet to figure out how exactly I would implement this entirely in code with two GPIO pins, and I also have to figure out how to add additional GPIO pins (it looks like the GPIO library I'm using doesn't support the normal port expander so I need to use a different library for those pins etc etc). None of those are unsolvable problems but I want to keep the scope of this project from spiraling out of control if possible.

For now at least, I think I'm fine with the compromise of both switches being momentary, so if you're not holding onto them they'll revert back to off. Since they're just boxes connected with wires there's no guarantee that they won't be next to each other, but in theory it will take two hands to turn a switch - one to hold the box and the other to turn the dial - so even if they were next to each other it would be difficult for one person to trigger both switches.

Why do you only have 1 free GPIO on your Pi? It comes with like 30 of them, what are you using the other ones for?

If you really want to get into the weeds you can buy a GPIO expander chip (which conveniently come on breakout boards from places like sparkfun) and then use the I2C bus + one extra pin to signal interrupts (the chip can tell you when something's changed so you don't have to sit there and poll it all the time) but I'd definitely see about doing it with just the onboard GPIO before adding more complexity...

Adbot
ADBOT LOVES YOU

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
This is the project I'm building, all the other pins are taken up with all the LEDs and buttons already there. By my count the only GPIO pin that's not being used is pin 18. I can get expanders, but the GPIO library I'm usiong (gpiozero) doesn't support support expanders, so I'd have to learn a whole new way of controlling devices plugged into the expander. And the GPIOzero library doesn't really do the whole "infinite loop" paradigm so I'd have to figure out how to get the GPIO zero paradigm to intermingle with whatever I would use to support the expansion board. Though, interstingly enough, GPIOzero does support using a Pi zero over USB as an expansion board.

But I'd like to avoid too much scope creep to be able to actually finish something. I guess even adding these buttons is scope creep, but my Amazon Prime addled brain is reeling at the $8 shipping for $18 of TE connectors so I'm wondering if I can put more into that order to justify the shipping cost to myself.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
If you have s bunch of LEDs on their own GPIOs, you can swap that out for a shift register and that gives you more GPIOs for switches.

My Rhythmic Crotch
Jan 13, 2011


I don't even

Stereotype
Apr 24, 2010

College Slice
Wire up a circuit to turn each switch into pulse switch, wire them in series, and then just sample it with the micro-controller.

It's good to remember that you can do almost anything in analog. Even digital logic is, at its base, an analog circuit. Those old switches for launching ICBMs were assuredly purely analog circuits like this.

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams

Stereotype posted:

Wire up a circuit to turn each switch into pulse switch, wire them in series, and then just sample it with the micro-controller.

It's good to remember that you can do almost anything in analog. Even digital logic is, at its base, an analog circuit. Those old switches for launching ICBMs were assuredly purely analog circuits like this.

OK, this is actually exactly what I was wanting to do, just not having any idea what it was called. Looking a little closer, it looks like a 555 (or 556 since I want two pulses) would do essentially the same thing?

Stereotype
Apr 24, 2010

College Slice

FISHMANPET posted:

OK, this is actually exactly what I was wanting to do, just not having any idea what it was called. Looking a little closer, it looks like a 555 (or 556 since I want two pulses) would do essentially the same thing?

Yeah you can do it in a few ways, I haven’t actually built this stuff in a long time though. The easiest might be just the RC discharge circuit connected to a FET, but you probably have more control with a 555. I think they call it a “Monostable Oscillator” or a “one shot” or something like that, I bet there are a ton of reference circuits online. Thinking about it again, you can’t just do it in series unless you know which one is turned first, you need to generate a pulse for each switch then put them through an AND gate whose output you can sample with the microcontroller.

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
555 timer will do it. In monostable mode you can decide how long the pulse stays high after you turn the switch, so you won't need spring return switches. You could turn one, run to the other one and turn that one but the first one will be back to off by then. With a 100uF cap and a 10k potentiometer, you could set the pulse width from 0.01 seconds to 1.1 seconds.

Shame Boy
Mar 2, 2010

Cojawfee posted:

555 timer will do it. In monostable mode you can decide how long the pulse stays high after you turn the switch, so you won't need spring return switches. You could turn one, run to the other one and turn that one but the first one will be back to off by then. With a 100uF cap and a 10k potentiometer, you could set the pulse width from 0.01 seconds to 1.1 seconds.


Yeah a 555 in monostable mode would be perfect for this. This article is what I use whenever I need to remember how to wire up a 555, scroll down to the "monostable" section: https://www.electronics-tutorials.ws/waveforms/555_timer.html

brand engager
Mar 23, 2011

Anyone got some book recommendations for RF stuff?

kid sinister
Nov 16, 2002
What kind of RF? Do you just want to control everything via Bluetooth? WiFi?

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

brand engager posted:

Anyone got some book recommendations for RF stuff?
Pozar's "Microwave Engineering".

A LOVELY LAD
Feb 8, 2006

Hey man, wanna hear a secret?



College Slice
Hey folks,

This question might be stupidly simple so apologies in advance.

So I'm looking at a bit of equipment (old school synthesizer) that's bust - so I've checked the fuse which is fine, electricity is going to it but its not switching on - so first point of call is the switch which is already damaged and missing parts. It had a 100k resistor and a tiny halogen bulb in it but the bulb is getting no continuity (and I have no idea how to identify or replace it but that's another matter for another time). I was guessing the switch when in the right position would just connect left to right ala the red dotted line which would also turn on the bulb.

Its pretty cramped at the back but I can see 2 lives on one side and 2 ground on the other, and going by the schematic, is it meant to be connecting more like the greenish dotted line? Ideally I'd like to short the switch without killing the synth, dying and/or burning the house down.



Thanks!

E: so looking at it a bit more, I think both the red and green lines should be connected - the red is just to light the bulb though? So I should be able to get away with getting the backside off, desoldering it and buying a illuminated double pole DPST rocker switch that's rated for the incoming voltage to replace it?

A LOVELY LAD fucked around with this message at 23:15 on Feb 16, 2020

brand engager
Mar 23, 2011

kid sinister posted:

What kind of RF? Do you just want to control everything via Bluetooth? WiFi?

Just overall principles. I've got "the art of electronics 2nd edition" and the arrl antenna book that go over some of them

silence_kit
Jul 14, 2011

by the sex ghost

brand engager posted:

Just overall principles. I've got "the art of electronics 2nd edition" and the arrl antenna book that go over some of them

If you are interested in overall principles, I would second VictualSquid's suggestion. 'Microwave Engineering' by David Pozar is a good RF book.

ANIME AKBAR
Jan 25, 2007

afu~

VictualSquid posted:

Pozar's "Microwave Engineering".

This is the answer, if you want a solid theoretical background and are comfortable with math. Basically necessary if you're doing any component-level circuit design at UHF or higher.

If you just want to hack stuff together for ham radio setups (totally fine), stick with the ARRL stuff.

ANIME AKBAR fucked around with this message at 15:16 on Feb 17, 2020

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
I am losing my mind, and coming to the conclusion that there is no way to connect these switches besides soldering to the terminals. I bought expensive TE connectors (18 cents a connector) that are perfectly sized for my terminals, they fit perfectly. Except the insulation is too big so I can't actually use the middle pin (left is C, middle is NO, right is NC, I need to connect C and NO). Might try grinding the insulation down on one side but if that doesn't work I'm just gonna say gently caress it and just bite the bullet and solder some wires on to the end. There are other connectors I could find (uninsulated connectors, some premade connector wires from adafruit, some wire harnesses that I can only buy Aliexpress) but I think I'm done wasting my money and time on trying to avoid soldering.


KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

FISHMANPET posted:

I am losing my mind, and coming to the conclusion that there is no way to connect these switches besides soldering to the terminals. I bought expensive TE connectors (18 cents a connector) that are perfectly sized for my terminals, they fit perfectly. Except the insulation is too big so I can't actually use the middle pin (left is C, middle is NO, right is NC, I need to connect C and NO). Might try grinding the insulation down on one side but if that doesn't work I'm just gonna say gently caress it and just bite the bullet and solder some wires on to the end. There are other connectors I could find (uninsulated connectors, some premade connector wires from adafruit, some wire harnesses that I can only buy Aliexpress) but I think I'm done wasting my money and time on trying to avoid soldering.




You should be able to find terminals without that bulky insulation. They'll likely be a bit cheaper, too. If you're worried about shorting, heat shrink is usually lower profile.

KnifeWrench fucked around with this message at 17:16 on Feb 21, 2020

um excuse me
Jan 1, 2016

by Fluffdaddy
Make a breakout harness. Solder your wires to the plugs, solder your connecters to your wires, that way it's at least still somewhat removable. This is assuming you have male connectors as well.

Stabby McDamage
Dec 11, 2005

Doctor Rope
Just cut the insulator off and add heatshrink instead.

Splode
Jun 18, 2013

put some clothes on you little freak
Just solder it

longview
Dec 25, 2006

heh.
For your typical 16/19mm automotive push button switches (the kind with cool ring-lights built in) they make special connectors like this:


Maybe something like that is what you're meant to use?

FISHMANPET
Mar 3, 2007

Sweet 'N Sour
Can't
Melt
Steel Beams
I've seen those, but I'm not really sure what they're called to find places to buy them, so all I can find is getting them from Aliexpress in 1.5 months, or paying $10 a piece on Amazon. I've suspect they're an "automotive" thing but still kind of hard to find.

Ok looked one more time and E-Switch appears to make them...

FISHMANPET fucked around with this message at 00:27 on Feb 22, 2020

Sagebrush
Feb 26, 2012

um excuse me posted:

Make a breakout harness. Solder your wires to the plugs, solder your connecters to your wires, that way it's at least still somewhat removable. This is assuming you have male connectors as well.

Yep, this is what I'd do. Then you can also get locking connectors or en-bloc keyed ones or whatever.

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


FISHMANPET posted:

I am losing my mind, and coming to the conclusion that there is no way to connect these switches besides soldering to the terminals. I bought expensive TE connectors (18 cents a connector) that are perfectly sized for my terminals, they fit perfectly. Except the insulation is too big so I can't actually use the middle pin (left is C, middle is NO, right is NC, I need to connect C and NO). Might try grinding the insulation down on one side but if that doesn't work I'm just gonna say gently caress it and just bite the bullet and solder some wires on to the end. There are other connectors I could find (uninsulated connectors, some premade connector wires from adafruit, some wire harnesses that I can only buy Aliexpress) but I think I'm done wasting my money and time on trying to avoid soldering.




Well yeah, you bought switches with solder terminals. Solder to them. That's the point of those terminals. If you want a disconnect past there, put a connector on afterwords. I like the .062 Molex stuff for ease of use.

babyeatingpsychopath fucked around with this message at 00:57 on Feb 22, 2020

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Sup

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius

longview posted:

For your typical 16/19mm automotive push button switches (the kind with cool ring-lights built in) they make special connectors like this:


Maybe something like that is what you're meant to use?

I've yet to find a single one of those that fits the connector pattern and size of the switch FISHMANPET has.

Ambrose Burnside
Aug 30, 2007

pensive
i want an excuse to buy a lil e-paper screen and am considering tackling a small arduino-based e-reader as the excuse; ran into this open-source design for one, and was tickled mightily by the dr bronner's-calibre tomes of text worked into the pcb silkscreen


i sincerely think it's extremely cool to bake documentation like this right into the device itself, for years and years i wondered how the gently caress a circuit board can do what it does but if i'd run into sth like thsi as a kid it would have blown my mind and gotten me Extremely Engaged

Stereotype
Apr 24, 2010

College Slice

Ambrose Burnside posted:

i want an excuse to buy a lil e-paper screen and am considering tackling a small arduino-based e-reader as the excuse; ran into this open-source design for one, and was tickled mightily by the dr bronner's-calibre tomes of text worked into the pcb silkscreen


i sincerely think it's extremely cool to bake documentation like this right into the device itself, for years and years i wondered how the gently caress a circuit board can do what it does but if i'd run into sth like thsi as a kid it would have blown my mind and gotten me Extremely Engaged

That is hands down the coolest PCB silkscreen I’ve ever seen and now I want to do that myself

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
That is rad

Don't link it or anything :)

Ambrose Burnside
Aug 30, 2007

pensive
whoops, yeah- https://github.com/joeycastillo/The-Open-Book
apparently there's an italo calvino quote hiding somewhere on the pcb but i haven't been able to find it yet

Stereotype posted:

That is hands down the coolest PCB silkscreen I’ve ever seen and now I want to do that myself
agreedo- if you're going through all the trouble of designing your own pcb -and- writing a bunch of documentation to help people replicate your project, it's not actually much more work in total to drop helpful tidbits of info into the silkscreen vector physically-adjacent to the specified widget, so why not?

Ambrose Burnside fucked around with this message at 08:14 on Feb 23, 2020

Unperson_47
Oct 14, 2007



Does anyone actually have fun soldering LED strips

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Do robots experience fun?

Ambrose Burnside
Aug 30, 2007

pensive
i really love this project specifically for its phenomenal ergonomics and thoughtful + efficient design http://justine-haupt.com/rotarycellphone/



i particularly like the wraparound e-ink screen, it's above and beyond the best implementation of a flexible display i've ever seen in any product. slick as poo poo form-factor, but more importantly it actually does something useful and isn't just a gimmick, i.e. the main display offers everything while device is held in the hand, edge display offers just the spark notes for quick pocket peeks




it's a breath of fresh air after the endless procession of projects heaved loosely into standard Acrylic Afterthought Discount Enclosures

Ambrose Burnside fucked around with this message at 09:27 on Feb 23, 2020

Splode
Jun 18, 2013

put some clothes on you little freak
That is an incredibly silly thing, I love it

Stabby McDamage
Dec 11, 2005

Doctor Rope
Speaking of locking connectors, I'm looking for a crimpable connector system to move me past Duponts. Something with lock that's inexpensive, low current, common, with choice of mulitple number of positions, and suitable for wire-wire and wire-board use. Ideally a kit I can get on Amazon (or less if I wait for ebay/ali) and put in my home lab, office, and give out to students I work with.

What connectors do you guys keep on your shelf?

csammis
Aug 26, 2003

Mental Institution
They’re not really designed for wire-to-wire, but I keep JST XH connectors on hand by the dozens

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

csammis posted:

They’re not really designed for wire-to-wire, but I keep JST XH connectors on hand by the dozens

JST would be my recommendation as well. Different families have different pitch and locking characteristics -- I have PAs -- but they're all good quality.

The catch is, I don't know how the market is for generic crimpers, and, as usual, the official ones are kind of an investment.

csammis
Aug 26, 2003

Mental Institution

KnifeWrench posted:

The catch is, I don't know how the market is for generic crimpers, and, as usual, the official ones are kind of an investment.

I have these guys and they work pretty well for me. I’m in the low hundreds of crimps on them and they are still in good shape. The large side of the JST pin fits in the 1.9 slot and the small side in the 1.3 slot.

Adbot
ADBOT LOVES YOU

Sagebrush
Feb 26, 2012

Stabby McDamage posted:

Speaking of locking connectors, I'm looking for a crimpable connector system to move me past Duponts. Something with lock that's inexpensive, low current, common, with choice of mulitple number of positions, and suitable for wire-wire and wire-board use. Ideally a kit I can get on Amazon (or less if I wait for ebay/ali) and put in my home lab, office, and give out to students I work with.

What connectors do you guys keep on your shelf?

Molex Micro-Fit

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