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
mobby_6kl
Aug 9, 2009

by Fluffdaddy

ante posted:

You still probably want ESP32 so that you can run an MQTT server and have all your ESP clients Just Work and be done with the software side in like, half an hour instead of a weird custom solution.


The ESP32-S2 and ESP8266 are cheaper and cheapest solutions, too, respectively, and you'd be hard pressed to find and cheaper solution.
They want it from 15 different locations, that's gonna add up so I suspect attiny+433mhz thing would be cheaper, plus it could be ran off a battery.

Also use the Bosch BME280 sensor. All the cheap humidity/temperature sensors are garbage (and don't measure pressure).

Adbot
ADBOT LOVES YOU

Maimgara
May 2, 2007
Chlorine for the Gene-pool.

insta posted:

I'm at the total napkin-scratching phase, but what's the cheapest way to outfit my house with sensors to record ambient data, because I like big CSV files?

I'd want humidity, temperature, barometric pressure. I'd want to gather this from about 15 spots in my house. I currently have more time than money thanks to a COVID-19 furlough, and I've designed PCBs before.

My initial thought was Attiny85s, those 433MHz modules, and Chinese sensors. Report all that data to a Raspberry Pi for cataloging. I'm aware of ESP32s, but will Attiny85s+433mhz end up cheaper per unit (or more reliable/longer range)?

Is there some existing off-the-shelf thing for $9 that does what I want?

This is very much not 9$, but if you want some rugged sensors you could put on a single CAN bus, the CAT-HSA0004 from TE would be a fun project. Its 170$ a pop, and meant for instrumentation in automotive, truck or fuel cell systems.

Dominoes
Sep 20, 2007

Looking for a keyword to search for: I'm looking for a 4 or 5 way switch, similar to coolie/castle switch on fighter jets. I have a 4-button UI, and would like to reduce the num of holes I'm machining, and it might be a better UI anyway. Ie switch goes fwd, GPIO 1 is pulled low. Back, GPIO 2, Left, Right, and maybe in etc.

Searches so far are not coming up with anything. Means wrong search term, or isn't a common thing. Tried the usual arduino / raspberry pi keyword addendums.

edit: Some luck on Digikey under keyword navigation switch. eg

Dominoes fucked around with this message at 20:49 on Jul 19, 2020

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Dominoes posted:

Looking for a keyword to search for: I'm looking for a 4 or 5 way switch, similar to coolie/castle switch on fighter jets. I have a 4-button UI, and would like to reduce the num of holes I'm machining, and it might be a better UI anyway. Ie switch goes fwd, GPIO 1 is pulled low. Back, GPIO 2, Left, Right, and maybe in etc.

Searches so far are not coming up with anything. Means wrong search term, or isn't a common thing. Tried the usual arduino / raspberry pi keyword addendums.

EDIT to remove all the wrong stuff I said before.

Look for cheap 4 way mirror switches for cars like this one:

https://www.ebay.com/itm/SAAB-900-8...74AAMXQ~6VQ8fuh

CarForumPoster fucked around with this message at 20:56 on Jul 19, 2020

Dominoes
Sep 20, 2007

Awesome. I also found a number of ~$200 ones on Digikey that look like real ones. I'm guessing they sell them to Boeing for sims or something.

Have a few of the $2 ones on the way. The one I linked, and another that's flat. I think I may be able to just place it on top of the case, and drill holes under the leads or something, and have all 5 btns in one. Or just a hole for the linked one.

Dominoes fucked around with this message at 21:06 on Jul 19, 2020

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Dominoes posted:

Awesome. I also found a number of ~$200 ones on Digikey that look like real ones. I'm guessing they sell them to Boeing for sims or something.

Have a few of the $2 ones on the way. The one I linked, and another that's flat. I think I may be able to just place it on top of the case, and drill holes under the leads or something, and have all 5 btns in one. Or just a hole for the linked one.

Thats a good deal, cheapest I found was $5 for new aftermarket on eBay and you's still end up soldering to the pins and filling with potting compound most likely.

Ambrose Burnside
Aug 30, 2007

pensive
i’ve wanted to build myself a custom Kerbal Space Program instrumentation panel for ages and that mirror switch idea just solved one of my remaining question marks wrt hardware selection, so thanks much

CarForumPoster
Jun 26, 2013

⚡POWER⚡

Ambrose Burnside posted:

i’ve wanted to build myself a custom Kerbal Space Program instrumentation panel for ages and that mirror switch idea just solved one of my remaining question marks wrt hardware selection, so thanks much

Glad I could help!

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

mobby_6kl posted:

They want it from 15 different locations, that's gonna add up so I suspect attiny+433mhz thing would be cheaper, plus it could be ran off a battery

Nah. An ESP8266 module with some header pins is like, $2

insta
Jan 28, 2009

mobby_6kl posted:

They want it from 15 different locations, that's gonna add up so I suspect attiny+433mhz thing would be cheaper, plus it could be ran off a battery.

Also use the Bosch BME280 sensor. All the cheap humidity/temperature sensors are garbage (and don't measure pressure).

I found breakouts for the BME280 on AliExpress for $1.80 with I2C pads broken out. That's a neat little thingy.

ATTiny13A's are $2.20/5, and the 433 transmitters are $1-ish. If the ATTiny can do I2C, it looks like each 'node' would be $3.30 + PCB. Random collisions or occasional interference wouldn't matter for this particular application because IDGAF if I miss one of the 30-second updates.

But, dang it, ESP32 modules are also like $3. I've heard of problems with ESP8266's, which would push me towards ESP32's, but I've also got demonstrable WiFi problems at my house that I'm hoping 433 would obviate.

I dunno, the whole thing is just to get temp & humidity around my house, so I can chart it and go :hmmyes:

babyeatingpsychopath
Oct 28, 2000
Forum Veteran


Dominoes posted:

Awesome. I also found a number of ~$200 ones on Digikey that look like real ones. I'm guessing they sell them to Boeing for sims or something.

They may be selling them to Boeing because they're the real ones. It's legal to buy manufacturer-new components for aircraft. I use Mouser for switches ALL THE TIME.

The Cirrus 4-way trim switch is OTTO p/n T5-0090 (4-way with pushbutton). Throwing "OTTO" 4-way switch into Mouser, I get this list. Those are almost certainly actual real-life aircraft swtiches. $80/each is cheap in airplane money.

Sagebrush
Feb 26, 2012

honestly $80/ea is not a terrible price for something that's built to aviation durability, either. those switches will probably last until the end of the universe in whatever application you put them in.

poeticoddity
Jan 14, 2007
"How nice - to feel nothing and still get full credit for being alive." - Kurt Vonnegut Jr. - Slaughterhouse Five

insta posted:

I'm at the total napkin-scratching phase, but what's the cheapest way to outfit my house with sensors to record ambient data, because I like big CSV files?

I'd want humidity, temperature, barometric pressure. I'd want to gather this from about 15 spots in my house. I currently have more time than money thanks to a COVID-19 furlough, and I've designed PCBs before.

My initial thought was Attiny85s, those 433MHz modules, and Chinese sensors. Report all that data to a Raspberry Pi for cataloging. I'm aware of ESP32s, but will Attiny85s+433mhz end up cheaper per unit (or more reliable/longer range)?

Is there some existing off-the-shelf thing for $9 that does what I want?

I'll bite: What's going on in your house that barometric pressure isn't negligibly different in 15 locations?

sharkytm
Oct 9, 2003

Ba

By

Sharkytm doot doo do doot do doo


Fallen Rib
He lives in the air ducts like Ben Chang in Community.

KnifeWrench
May 25, 2007

Practical and safe.

Bleak Gremlin

poeticoddity posted:

I'll bite: What's going on in your house that barometric pressure isn't negligibly different in 15 locations?

Fun fact: you can actually identify what floor a sensor is on this way. Not that that would be useful for fixed sensors, but it's one way in which the difference wouldn't be negligible.

Maybe HVAC analysis?

insta
Jan 28, 2009

poeticoddity posted:

I'll bite: What's going on in your house that barometric pressure isn't negligibly different in 15 locations?

Nothing, I just want it for one location, but the BME280 measures barometric pressure so I get it for free.

Also I have an attic fan and I think it'd be neat to see the slight vacuum in some rooms.

Dominoes
Sep 20, 2007

Hey dudes. Is it advisable to use a 4 layer board when dealing with analog sensor signals for short lengths? No high speed protocols, and routing is fine on 2 layers, with some "stitches" to connect ground areas.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
You're pretty unlikely to see a difference, depending on how short we're talking here.

For complicated mixed signal stuff, yeah, absolutely, but just keep your digital stuff away from those analog signals on a two layer and you'll be fine

Dominoes
Sep 20, 2007

Thank you! Also experimenting with isolators.

4 layers are nicer to work with, but way more expensive.

Dominoes fucked around with this message at 16:32 on Jul 20, 2020

huhu
Feb 24, 2006
I got some LED studio lights for photography and one of the lights flickers ever so slightly and also makes a slight hissing noise. The company is sending me another light and letting me keep the previous one. It was $100 so I'm curious if I might be able to fix it. Where might you start given the symptoms?

Shame Boy
Mar 2, 2010

huhu posted:

I got some LED studio lights for photography and one of the lights flickers ever so slightly and also makes a slight hissing noise. The company is sending me another light and letting me keep the previous one. It was $100 so I'm curious if I might be able to fix it. Where might you start given the symptoms?

Look at the individual LED chips up real close (you might have to open up the case for it to see them if it has a diffuser or something like that, make sure it's not plugged in when you do this obviously) and see if any of them have a black spot. If one of the LED's fails it generally causes it to arc over, then make intermittent connection across the charred remains, which would manifest as flickering and a hissing/buzzing noise due to sparks. It also leaves a small black soot mark in the LED itself that you can usually see. The LED probably won't actually light up too, if you wanna stare at them while they're fully lit to see.

If it's not that, it might be something like a capacitor in the power supply, but keep in mind that those can carry a deadly charge even long after you unplugged it, so if you're not sure of what you're doing it's probably not worth the hundred bux.

Warbird
May 23, 2012

America's Favorite Dumbass

Well the new soldering iron works a hell of a lot better though my soldering skills have deteriorated significantly given that most of my keys don't appear to be working. Oh well, back at it again tomorrow I suppose.

Shame Boy
Mar 2, 2010

So in my latest project, the thing I was the most worried about loving up (the thermocouple front-end and amplifiers) works perfectly, while the thing I spent the least time thinking about and just picked something that would fit (the display) doesn't work at all. Thanks for the help getting the thermocouple circuit right at least :v:

It's this display, since it's the only one I could find that's around the right size (between 2" and 2.2" diagonal is perfect) and surface-mount-able: https://www.amazon.com/gp/product/B07YC3K7BZ/

Unfortunately, unlike every other display that uses that control chip (the ILI9225, in this case specifically the ILI9225-G), it's wired to use the i80 8-bit interface instead of SPI. I found a single other person who got it to work, using this horrible mess of an Arduino library, specifically user tongbajiel in these few pages of this enormous arduino forum thread: https://forum.arduino.cc/index.php?topic=366304.1755

However that library really is a mess, is very arduino-specific, and even copying the logic of the test code they're using there that should just read out the registers sequentially gives me nonsensical results - the display just reads the register index back out again, so for example I'll tell it to look at register 0x12 and then I'll read it back and just get 0x12 over and over again, for any register I try. If I set the RS pin when I'm reading, I can get it to output the chip ID of 0x9226 (which is the correct ID for an ILI9225-G) so I know that it's at least doing something, but that's all I've been able to get it to do... Should I give up and find another display?

Dominoes
Sep 20, 2007

I concur with your closing thought. There are many comparable displays avail, so pick one that's easy to work with.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
The whole LCD ecosystem is a shitshow.

I would also pick out a different one. Something right in your size requirements, SPI-controlled, will be tenbux or so, and my time is worth more than that.


You coooould pick out an actual good graphics library like LittleVGL and try to adapt one of their drivers. But your time is worth more than that, too, don't do it.

Dominoes
Sep 20, 2007

You could browse for one explicitly supported by LVGL, your Chip's HAL etc with drivers. Or, this might constrain your choices too much.

Shame Boy
Mar 2, 2010

ante posted:

The whole LCD ecosystem is a shitshow.

I would also pick out a different one. Something right in your size requirements, SPI-controlled, will be tenbux or so, and my time is worth more than that.


You coooould pick out an actual good graphics library like LittleVGL and try to adapt one of their drivers. But your time is worth more than that, too, don't do it.

The size requirement is really the limiting factor, as I only have maybe at most 10mm between the main board and the front, and it has to be surface mount since the current footprint is surface-mount and I'd rather not have to respin the entire main board to change that. Probably just have to buy an LCD and make my own little board for it to fit the existing footprint and hope I can reflow solder the tiny-rear end pins on one of those LCD ribbon cable connectors...

Dominoes
Sep 20, 2007

Do you need to mount the display on the board? Consider mounting to the enclosure, and connecting via the fpc connector. (Which many displays, including the one you linked use )

Shame Boy
Mar 2, 2010

Dominoes posted:

Do you need to mount the display on the board? Consider mounting to the enclosure, and connecting via the fpc connector. (Which many displays, including the one you linked use )

The board is mounted via stand-offs to the front of the enclosure, since it's got buttons and lights and the display on it, so yes. I'm designing this to fit an existing thing that already has holes for the display and everything else, so I'm kinda limited in how I can mount things.

Just now I found a different, SPI-enabled 2" display in my random crap bin that should fit in the space, I can probably hold it to the board with double-sided tape and then solder some jumper wires between it and the SMD pads... It'll look like crap but that should be hidden anyway...

Shame Boy
Mar 2, 2010

I can now get the screen I bodged in to display a bunch of random corrupted garbage, which is... some kind of progress I guess :confuoot:

Ambrose Burnside
Aug 30, 2007

pensive
While we’re on the subject- do i have much hope of finding an OLED smaller than 0.49” (64x32px) that’s also fairly cheap/ubiquitous and easy to use? Ideally sth ssd1306-driven? i want to try including a few “reconfigurable display buttons” for a USB controller idea I’ve been workshopping but the commercial solutions to this are prohibitively-expensive to use multiples of, but I could probably kludge sth acceptable together using switch hardware and off-the-shelf tiny OLEDs.
i’m comfortable working with the usual SSD1306-driven displays but haven’t used anything outside that bubble and don’t know much about what else is out there

One Legged Ninja
Sep 19, 2007
Feared by shoe salesmen. Defeated by chest-high walls.
Fun Shoe
I can't answer your question, but have you watched this video? It came up in my feed a few days ago. DigiKey doesn't have a filter smaller than 0.6", and those cost double digits.

ickna
May 19, 2004

How can I protect a MOSFET output from stuff like stray voltage, static, shorts to ground etc?

Application is a field testing unit for 24v RGB LED strips (common positive, individual RGB negatives) with 4-pin XLR connectors that are usually hot-plugged, and intended to weed out bad solder connections, shorts and damaged segments so it will see all the worst case scenarios. My prototype unit using an arduino and a multi-channel MOSFET board has worked alright for a few months in the shop but has blown one of the output channels. The goal is to get this to a point where I can design a PCB with kicad around an ATTINY85 and I want to make the circuit as robust as possible before spinning up some boards.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

Ambrose Burnside posted:

While we’re on the subject- do i have much hope of finding an OLED smaller than 0.49” (64x32px) that’s also fairly cheap/ubiquitous and easy to use? Ideally sth ssd1306-driven? i want to try including a few “reconfigurable display buttons” for a USB controller idea I’ve been workshopping but the commercial solutions to this are prohibitively-expensive to use multiples of, but I could probably kludge sth acceptable together using switch hardware and off-the-shelf tiny OLEDs.
i’m comfortable working with the usual SSD1306-driven displays but haven’t used anything outside that bubble and don’t know much about what else is out there

0.42" is ubiquitous as well. Beyond that, you'll be getting into expensive specialty deals on Alibaba

Shame Boy
Mar 2, 2010

ickna posted:

How can I protect a MOSFET output from stuff like stray voltage, static, shorts to ground etc?

Application is a field testing unit for 24v RGB LED strips (common positive, individual RGB negatives) with 4-pin XLR connectors that are usually hot-plugged, and intended to weed out bad solder connections, shorts and damaged segments so it will see all the worst case scenarios. My prototype unit using an arduino and a multi-channel MOSFET board has worked alright for a few months in the shop but has blown one of the output channels. The goal is to get this to a point where I can design a PCB with kicad around an ATTINY85 and I want to make the circuit as robust as possible before spinning up some boards.

Stray voltage and static can be dealt with using TVS diodes, shorts to ground can be protected against with a polyfuse. If you used something with more pins than an ATTiny you could also measure the voltage drop across the polyfuse (or another low-value fuse in series with the output) to see when it's actually shorting out so the microcontroller itself knows and shuts the channel off and maybe blinks an LED at you or something.

Ambrose Burnside
Aug 30, 2007

pensive

One Legged Ninja posted:

I can't answer your question, but have you watched this video? It came up in my feed a few days ago. DigiKey doesn't have a filter smaller than 0.6", and those cost double digits.

that's approximately the sort of thing I had planned, yeah- although, out of character for me, I'm inclined to handle mechanical switching with something ready-made and reliable like a Cherry MX switch, with the usual key-cap replaced with a small acrylic-capped housing for the display, and using a length of ribbon cable to provide the needed flexible connection across the entire switch 'travel'.

irt the display- i bought one of these cheap lil things https://www.ebay.com/itm/0-49-inch-OLED-SSD1306-64x32-I2C-IIC-Display-Screen-Module-For-Arduino-/173955128561 ages back to play with, I doubt I can beat that price for a sub-0.5" display but you never know. I'd only be displaying simple glyphs so I could live w something 32x32px, for example.

e:

ante posted:

0.42" is ubiquitous as well. Beyond that, you'll be getting into expensive specialty deals on Alibaba

excelsior- I think these lil .42 70x40px screens are the ticket, must have missed em when I last looked, thanks much. I don't think I'd want to go much smaller than that anyhow.

Ambrose Burnside fucked around with this message at 21:30 on Jul 23, 2020

Sagebrush
Feb 26, 2012

You might dig into the ArtLebedev Optimus keyboards -- you won't find one for sale anywhere, and they were thousands of dollars when they were available, but they did something similar and maybe you can find a teardown and part number.

At that price point they might have just been custom parts though

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe

ickna posted:

How can I protect a MOSFET output from stuff like stray voltage, static, shorts to ground etc?

Application is a field testing unit for 24v RGB LED strips (common positive, individual RGB negatives) with 4-pin XLR connectors that are usually hot-plugged, and intended to weed out bad solder connections, shorts and damaged segments so it will see all the worst case scenarios. My prototype unit using an arduino and a multi-channel MOSFET board has worked alright for a few months in the shop but has blown one of the output channels. The goal is to get this to a point where I can design a PCB with kicad around an ATTINY85 and I want to make the circuit as robust as possible before spinning up some boards.

If this is a test setup and you expect to get over-current conditions all the time then I might suggest upgrading from the polyfuse to something that resets reliably and predictably across thousands of cycles. If you have a way to pull down the gate of your FET nice and fast when an over-current is detected that resets when the micro controller de-asserts its pin, that's ideal. There are a ton of ways to do this, including the following sketch:



I haven't simulated or built this circuit and the component values are guesses for a ~5-7 amp current limit. The idea is that as soon as the voltage on the 0.1 ohm sense resistor gets to around a Vbe, the NPN starts conducting. This pulls down the gate of the FET but also pulls down on the base of the PNP, and with the right component values this can reliably latch the NPN on and the FET off. This is reset as soon as the microcontroller pin goes low, since the PNP loses its supply so the base of the NPN goes low.

The capacitor on the base of the NPN provides some delay so the PNP has time to start pulling up before the crashing current on the FET kills the NPN base current. The capacitor on the gate of the FET is an attempt to keep the current rushing into the gate when the FET turns on from turning on the PNP.

Ambrose Burnside
Aug 30, 2007

pensive

Sagebrush posted:

You might dig into the ArtLebedev Optimus keyboards -- you won't find one for sale anywhere, and they were thousands of dollars when they were available, but they did something similar and maybe you can find a teardown and part number.

At that price point they might have just been custom parts though

SmartSwitches- https://www.sparkfun.com/products/14951 - seem very similar to Optimus keys sold as standalone components; unfortunately at $50+ a key I could swing. like. Reconfigurable Key, singular, maybe two if I feel like splurging.
I figure most of the cost there is tied up in the tiny OLED offering a full-64-colour display; i can live with monochrome, so kludging together a cheaper and less slick version of the commercial equivalent seems justifiable if i have my heart set on 5+ reconfigurable-display momentary switches as part of the controller.

Ambrose Burnside fucked around with this message at 01:22 on Jul 24, 2020

Adbot
ADBOT LOVES YOU

Cojawfee
May 31, 2006
I think the US is dumb for not using Celsius
Make sure you shop around.

https://www.digikey.com/product-detail/en/nkk-switches/IS15EBFP4RGB/360-3375-ND/5056755

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