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
ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Always use series resistors on your UART lines, preferably in an orientation where you can easily solder down one resistor sides and jump it with the other, to invert the lines



Because no matter how many times you examine it during design review, it will always be wrong for the first revision

ante fucked around with this message at 02:50 on Jun 16, 2020

Adbot
ADBOT LOVES YOU

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
Ok so here is something that has been bothering me mentally for a bit. I work a lot with LED strips. Usually single color, but sometimes I do RGB or other color-change strips. Doing wiring on single color is easy - check your current draw, figure how long it is between your strip and your power supply, check your voltage drop chart (I try and stay under 3%), solder, done.



So we're looking at a regular RGB strip here. Let's say this one is for a 12V strip, and is 60W at about 16 feet long.

If this were a single color strip, I'd know that 5 Amps were going to go through the wires, so I'd make sure to use 18AWG if my power supply was about 5 feet away. I'd use off the shelf 2 conductor wire, so both my wires are 18AWG. No big deal.

BUT, this is RGB. So, there are 4 wires. I can assume that there's going to be roughly 1.6A (20W) per channel. Let's imagine the ribbon wire used here is 18AWG. I could maybe go 10 feet away right? Wellllll... these aren't they all sharing the V+ line though? So that current is going to all come from the V+ wire, so really, there is 60W on the V+ line. So I'm down to 5 feet again. Right?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Right.

Sagebrush
Feb 26, 2012

If you want to prove it, you can measure the current through the V+ line with a multimeter.

It's worth noting that the same current needs to travel through the whole plastic strip, too, so with long runs of LED strips it is common to supply power at both ends and/or add mid-run power connections to keep the voltage up.

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
nice.
two followups:

for the sake of argument, what if the strip is in reverse? Let's say that the negative terminal was shared, and each of the channels was a positive (though no LED strip on the market is like this to my knowledge, nor any dimmer for them) Does that change anything? Part of me thinks of it as current getting "spent" but it's really more like equilibrium isn't it?

finally, what is the best way to deal with strips like this when running longer cable? If my power supply has to be a longer distance away, and I'm using some chunky wire to bring the power over, I'm going to have problems soldering it directly to the strip. On some 5-6 color strips, it's tough to even do anything bigger than 22AWG. What I've typically done is run the bigger cables to a terminal block, then done a short run (less than a foot) of thinner wire to get it to the solder joints.

edit:

Sagebrush posted:

It's worth noting that the same current needs to travel through the whole plastic strip, too, so with long runs of LED strips it is common to supply power at both ends and/or add mid-run power connections to keep the voltage up.

don't make me think of having to do 20ft runs of neopixels again *shudder*

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Current going in will always equal current going out - So You have 1.6A going in three wires, then the supply wire will have 4.8A coming out. You change the polarity (as you are suggesting) and nothing changes, other than the direction of current flow.

Look up Kirchoff's laws on youtube or something, that seems to be what you are intuitively understanding, but would maybe benefit from some drawn diagrams.


Basically yeah, current doesn't get "spent", it can be pictured as a moving flow of water in a closed system of pipes. It can't leak out, and it can't compress.


Your strategy for wiring seems reasonable. That kind of power wiring sucks, there's no way around it.

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
thanks. that's reassuring.

I've been doing LED strip for... 7? years now for work. Every now and then I start to question my own knowledge, so its good to know my basic assumptions are still good.

Dominoes
Sep 20, 2007

csammis posted:

MISO and MOSI stand for Master In Slave Out and Master Out Slave In, respectively, so the relationship between host and peripheral is made explicit. Sometimes it’s SIMO and SOMI but the meaning is the same. Does that help?
Yep - thank you.

Shame Boy
Mar 2, 2010

Foxfire_ posted:

I always just use thermistors instead

It's kinda gotta be thermocouples for what I'm doing, both because I need an easy commodity plug-in probe I can kapton tape to a board that's going to get real hot, and because there's already a thermocouple built in to part of the heater to measure its temp.

I guess I shouldn't be surprised that analog-y stuff is real expensive, I assume there's lots of laser trimming and weird fabrication involved.

Shame Boy
Mar 2, 2010

Oh huh they finally updated the MacOS version of LTSpice, presumably because Catalina dropped support for 32-bit applications. It's still got that godawful UI but the engine is actually the modern one as far as I can tell from the about screen and the automatic symbol updates work again, that's nice.

e: Oooo you can pinch-zoom using the multitouch functionality of the trackpad, about loving time

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I need to do some SMT soldering for the first time soon for some LED controllers, but I would prefer to not have to build/buy/store a reflow station in my small and shared workspace. Is a hot air gun a viable alternative for low-volume, small-component-count work? They seem smaller. Should I just bite the bullet and find some cheap reflow thing on eBay that I can give away if it proves geometrically untenable? Hack a toaster oven?

Foxfire_
Nov 8, 2010

If everything has leads, a normal iron is fine. Put solder down on one pad, wipe it with a flux pen, then remelt it and slide the part in with part in tweezers in one hand and iron in the other. Then solder all the other leads. Main things are to not put down too much solder and to flux and reflow the joints.

A hotplate is also fine, ideally with some metal on top of it to spread heat out

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

No, the parts that need SMT are 0805 resistors and caps, which don’t seem to have leads. A friend suggested using an old pan on low heat, which I could also do with some confidence about holding temperature, I think?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
A small hotplate and a hot air station have about the same footprint. The hot air is more versatile, though, get that one. And yeah, should be fine for what you're doing.


You also don't need it for 0805 components, or 0603, or 0402. Just a fine tip. You kinda need it for QFN only. But it's very nice.

Splode
Jun 18, 2013

put some clothes on you little freak
0805 resistors are most easily hand soldered using a soldering iron although not a bad way to practice using the hot air before you try something that needs it (QFNs, DFNs, BGAs)

If you can get your hands on some kind of magnification you'll find it easier too. Not required, but very useful particularly for beginners.

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


Just wanted to throw this in here.



You all were super helpful in going from literal ground zero / square one but it all works! What you're looking at is the inside of my chicken coop. Solar power lines from the panel on top of the coop come in from the right. Battery is in a case down below. Mounted to the left of the big box is a 2-gang junction box that holds the Pi ZeroW and the DC motor controller. Inside the big frame is a 12vDC bus+fusebox, the solar charge controller, and a current meter. Off to the far left is the linear actuator mounted to the chicken coop door.

Currently I have individual python scripts that I can run after I ssh into the Pi to open and close the door, and another script that will just spit out raw data from the temp sensor (sits inside the big frame right now).

I gotta spend some time learning how to slick up things on the programming end but on the electronics side everything seems great.

Thanks again for all the help and putting up with a bunch of random, mostly nonsensical questions.

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS

That Works posted:

Just wanted to throw this in here.



You all were super helpful in going from literal ground zero / square one but it all works! What you're looking at is the inside of my chicken coop. Solar power lines from the panel on top of the coop come in from the right. Battery is in a case down below. Mounted to the left of the big box is a 2-gang junction box that holds the Pi ZeroW and the DC motor controller. Inside the big frame is a 12vDC bus+fusebox, the solar charge controller, and a current meter. Off to the far left is the linear actuator mounted to the chicken coop door.

Currently I have individual python scripts that I can run after I ssh into the Pi to open and close the door, and another script that will just spit out raw data from the temp sensor (sits inside the big frame right now).

I gotta spend some time learning how to slick up things on the programming end but on the electronics side everything seems great.

Thanks again for all the help and putting up with a bunch of random, mostly nonsensical questions.

THat's awesome, nice work.

Unperson_47
Oct 14, 2007



That Works posted:

Just wanted to throw this in here.



You all were super helpful in going from literal ground zero / square one but it all works! What you're looking at is the inside of my chicken coop. Solar power lines from the panel on top of the coop come in from the right. Battery is in a case down below. Mounted to the left of the big box is a 2-gang junction box that holds the Pi ZeroW and the DC motor controller. Inside the big frame is a 12vDC bus+fusebox, the solar charge controller, and a current meter. Off to the far left is the linear actuator mounted to the chicken coop door.

Currently I have individual python scripts that I can run after I ssh into the Pi to open and close the door, and another script that will just spit out raw data from the temp sensor (sits inside the big frame right now).

I gotta spend some time learning how to slick up things on the programming end but on the electronics side everything seems great.

Thanks again for all the help and putting up with a bunch of random, mostly nonsensical questions.

You've gotta post a video of this in action.

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


Unperson_47 posted:

You've gotta post a video of this in action.

Just imagine 30 seconds of *brrrrr* while the door goes up or down

mobby_6kl
Aug 9, 2009

by Fluffdaddy
Noo you can't just close the door remotely / haha actuator goes brrr.

Good job, looks way more finished than any of my projects! Are the chickens smart enough not to stand in the way as it's coming down? Or would you add a sensor to make it's safe to close automatically?

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


mobby_6kl posted:

Noo you can't just close the door remotely / haha actuator goes brrr.

Good job, looks way more finished than any of my projects! Are the chickens smart enough not to stand in the way as it's coming down? Or would you add a sensor to make it's safe to close automatically?

I don't think you can ever assume a chicken is smart in any capacity, or so I am told.

That said, by the time it gets a bit dark outside they are all inside the coop roosting and have been that way every night so far (since we've had to always go out there and manually close it before now). I have not tried to set up a sensor before closing, that might be a fun project.

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


So now I have a new question / problem to consider (that I really should have before I installed all this :ohdear: ).


How can I make a manual override to control the linear actuator? Right now I am thinking I can just run a separate 12V line from the bus to a switch mounted outside the coop and use that to open / close. Questions are:

1. What kind of switch would be needed here (double pole double throw?)?
2. Is there an easier way to override this somehow right at the motor controller or something like that?

I really should have planned this part from the start. :sigh:


e: am guessing momentary double pole double throw and just splicing the motor wires and running to the switch and having a separate 12V line from the bus to the switch as well.

That Works fucked around with this message at 11:23 on Jun 18, 2020

Leandros
Dec 14, 2008

Is there a heuristic on wire length vs gauge for low-voltage DC electronics? I bought some 3.3V soil moisture sensors that I want to hook up to something and I was thinking of consolidating multiple sensors to a single ESP8266 using an MCP3008 ADC, but it would probably mean running wire lengths on the order of a couple of meters. Is that too much?

insta
Jan 28, 2009

That Works posted:

So now I have a new question / problem to consider (that I really should have before I installed all this :ohdear: ).


How can I make a manual override to control the linear actuator? Right now I am thinking I can just run a separate 12V line from the bus to a switch mounted outside the coop and use that to open / close. Questions are:

1. What kind of switch would be needed here (double pole double throw?)?
2. Is there an easier way to override this somehow right at the motor controller or something like that?

I really should have planned this part from the start. :sigh:


e: am guessing momentary double pole double throw and just splicing the motor wires and running to the switch and having a separate 12V line from the bus to the switch as well.

It's like 3 pages back and lost for eternity, but don't you have software talking to the motor controller? That's half the point of software, so you can add features later without reconfiguring the hardware.

If you're adding this because power is out and you need to get in/out of the coup, you want a mechanical disconnect (not override) so you can open the door by hand.

If you're adding this because your software crashes, fix your software.

insta
Jan 28, 2009

Leandros posted:

Is there a heuristic on wire length vs gauge for low-voltage DC electronics? I bought some 3.3V soil moisture sensors that I want to hook up to something and I was thinking of consolidating multiple sensors to a single ESP8266 using an MCP3008 ADC, but it would probably mean running wire lengths on the order of a couple of meters. Is that too much?

For a voltage signal, you're much more concerned with voltage drop due to current, as well as induced voltages messing up your readings. You can fix the second by taking several samples and averaging them. Since soil changes pretty slowly, you could sample 30k times in 10 seconds, discard 10% outliers, and average the rest. This would remove practically all induced voltage / interferences.

The other concern is voltage drop. It will be relatively fixed since your load is fixed, and it will be specifically fixed-per-sensor, so you could either boost signal strength (by adding op-amp voltage followers on the output and input), or adding fixed offsets in software. If all you care to do is see when the value is 20% lower than average, then you can do all that with software, and probably won't need any offsets.

One thing though, and this is pretty important -- make sure the power to the moisture sensors can be controlled. You want them off most of the time, and to "wake up" when it's time to take a reading. You will get oxidation otherwise. I don't know if/how long it takes to settle once powered on, so experiment with that, but do not just tie VCC->VCC and GND->GND.

mobby_6kl
Aug 9, 2009

by Fluffdaddy
I've ran a soil moisture sensor a bit under 2 meters out and it was ok. I never bothered calculating anything but as insta said, it'd be mainly a problem if you need a lot of current.

Powering off the sensor is a good idea, but in my experience it helped only a little, the electrodes got all corroded pretty quickly anyway. The capacitive sensors are a bit more expensive but way better.

Leandros
Dec 14, 2008

Thanks for the help :) I went for capacitive ones against corrosion, as 20 bucks for 10 seemed like a sweet deal and I'm only doing this because then I don't have to think about my poor houseplants wasting away, so no huge volumes. I'll do some experimenting on power draw, I was thinking of repurposing a solar panel with a bank of 18650s so if that pans out it won't be as big of an issue.

Tim Thomas
Feb 12, 2008
breakdancin the night away
What’s the current thread consensus for a cheapo thru-hole and 1210 or bigger solder/desolder station?

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


insta posted:

It's like 3 pages back and lost for eternity, but don't you have software talking to the motor controller? That's half the point of software, so you can add features later without reconfiguring the hardware.

If you're adding this because power is out and you need to get in/out of the coup, you want a mechanical disconnect (not override) so you can open the door by hand.

If you're adding this because your software crashes, fix your software.

Point taken but for the foreseeable future the software is not fully automated, meaning I have to (currently) ssh into the Pi and execute a command to open or close the door.

In terms of failure, the door won't open if any single one of these things fails:

The motor (mechanical override)
the wifi connection / router
the Pi
the DC motor controller
12VDC power

Power I can restore via hooking up a battery charger via 120VAC extension cord if necessary.

If anything on the 5V side of things or wifi side of things fails, being able to flip a switch prevents me from having to crawl into a poo poo and chicken filled box to open a door.

With a switch override I cut out several failure points. Ultimately I want a more automated software solution, but I have a lot to learn to get there, might take a while.

Forseti
May 26, 2001
To the lovenasium!

Tim Thomas posted:

What’s the current thread consensus for a cheapo thru-hole and 1210 or bigger solder/desolder station?

Dunno what the consensus is but I'm a big proponent of Hakko clone + brand name tips.

The specific clone I use looks like isn't sold anymore, at least on Amazon, but they should all be more or less the same. So something like this X-Tronic one and then get yourself some real brand-name tips, I like the 2.4mm chisel for almost everything (and it should easily work for any through hole and 1210 jobs) but it's nice to have some different sizes available. Get the real tips from an authorized reseller like DigiKey.

Sagebrush
Feb 26, 2012

That Works posted:

Point taken but for the foreseeable future the software is not fully automated, meaning I have to (currently) ssh into the Pi and execute a command to open or close the door.

In terms of failure, the door won't open if any single one of these things fails:

The motor (mechanical override)
the wifi connection / router
the Pi
the DC motor controller
12VDC power

Power I can restore via hooking up a battery charger via 120VAC extension cord if necessary.

If anything on the 5V side of things or wifi side of things fails, being able to flip a switch prevents me from having to crawl into a poo poo and chicken filled box to open a door.

With a switch override I cut out several failure points. Ultimately I want a more automated software solution, but I have a lot to learn to get there, might take a while.

Assuming it's open-loop control (i.e. the software doesn't directly read what position the actuator is in, and thus won't try to force it back down if the program is still running), you could just wire the 12v supply directly to the motor in the "open" direction with a momentary toggle switch on one of the lines. Hold the switch to open the door, that's it.

Alternately, you could break out the motor's power lines to a pair of like banana jacks or something on the outside of the coop and cap them off so they're weatherproof, and then you can use your external 12v supply to drive the motor either way when needed.

insta posted:

If you're adding this because power is out and you need to get in/out of the coup, you want a mechanical disconnect (not override) so you can open the door by hand.

I agree with this, but it looks like the actuator is one of the jackscrew/worm gear types, which means you cannot drive it backwards by hand. He would need to modify the door itself with something like captive pins or external wingnuts so that the door could be disconnected/removed without having to move the actuator.

Sagebrush fucked around with this message at 17:02 on Jun 18, 2020

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


Sagebrush posted:

Assuming it's open-loop control (i.e. the software doesn't directly read what position the actuator is in, and thus won't try to force it back down if the program is still running), you could just wire the 12v supply directly to the motor in the "open" direction with a momentary toggle switch on one of the lines. Hold the switch to open the door, that's it.

Alternately, you could break out the motor's power lines to a pair of like banana jacks or something on the outside of the coop and cap them off so they're weatherproof, and then you can use your external 12v supply to drive the motor either way when needed.


I agree with this, but it looks like the actuator is one of the jackscrew/worm gear types, which means you cannot drive it backwards by hand. He would need to modify the door itself with something like captive pins or external wingnuts so that the door could be disconnected/removed without having to move the actuator.

Yeah its open loop, once the respective open or close script is run theres no input or output going on. I bought a momentary double pole double throw toggle to just toggle up or down directly to the motor. Just need to run a separate 12V line directly to the switch is all.

Also yeah the actuator has to be physically removed. Currently it rests in a snug wall mount and has a single screw at the top holding tension on it. I'll replace it with a lag bolt and wingnut next time I clean the coop out. This means I just have to undo that one point and can lift and tilt the extended actuator about 45 degrees out which will let me open and close the coop with the previous paracord / eyelet manual system.


Unperson_47 posted:

You've gotta post a video of this in action.

Lo and behold. I forgot my wife made an instagram account to gently caress around with when we got the chickens. Got lots of other cute chicken photos as well as a few more pics of the wiring and the coop construction etc.

https://www.instagram.com/p/CBkx0rvgafb/?igshid=m8om1hnmfnzb

Foxfire_
Nov 8, 2010

How much force does it come down with and is there something that stops if it stalls? If you stick your hand/a chicken/a small child in it while it's closing, what breaks first?

ante
Apr 9, 2005

SUNSHINE AND RAINBOWS
Those are pretty beefy linear actuators, using a leadscrew.

So... First the chicken breaks, then the wooden motor mounts. The actuator will continue moving.

That Works
Jul 22, 2006

Every revolution evaporates and leaves behind only the slime of a new bureaucracy


Foxfire_ posted:

How much force does it come down with and is there something that stops if it stalls? If you stick your hand/a chicken/a small child in it while it's closing, what breaks first?

Says about 200-250lbs of force. It's really slow but for a particularly dumb chicken it could be a wireless execution device I suppose.

insta
Jan 28, 2009
Learning electronics: The chicken is the fuse

Dominoes
Sep 20, 2007

Someone call CHOSHA

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

insta posted:

Learning electronics: The chicken is the fuse

Slow blow with audio alarm.

Unperson_47
Oct 14, 2007



What is the name of this connector?





Pin spacing is 2.5mm, and there's a clip on top for the socket.



Here's a bonus pic of it looking like a face:

Unperson_47 fucked around with this message at 05:10 on Jun 19, 2020

Adbot
ADBOT LOVES YOU

Stack Machine
Mar 6, 2016

I can see through time!
Fun Shoe
It looks a little bit like a 2-pin Molex micro-fit, but that has a 3.0mm pitch. All of those standard motherboard power connectors since atx are some form of micro-fit. There's also a nano-fit in 2.5mm but I don't think those have the angular style keys these have.

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