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
That Works
Jul 22, 2006

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


Most of the OP images are broken and some of the instructive value is lost so it's not quite as good of a primer as people had seemed to exclaim it was earlier in the thread.

I messed around with a bunch of radioshack breadboxes as a kid and have done lots of random work on automotive electronics etc but couldn't read a circuit diagram without some studying. I'd like to mess around with homebuilt electronics some as a hobby just to fool around.

I had an idea for two projects I'd like to get going, one simple / introductory and another that seemed more complex and be something I work towards over time.

1st I'd like to build a solar powered USB charging station, maybe slaving it to one of those USB power packs so I could charge multiple devices from it.

2nd I'd like to build a solar powered batter / inverter device that I could run most of my living room electronics off of. This would include a PS4, a 32" flat panel TV and 1-2 laptop computers.

Just googling around I can find dozens of DIY USB solar charger plans but didn't really know what would be a recommended one to start with. Also beyond that what might be a good place to start reading / look into plans to build a larger AC compatible charging device for running the higher current devices I mentioned. One issue I have with the 2nd project is that I don't know how large of a scale of panels / batteries / inverter this would require and if it would be even remotely feasible.

I have an Arduino nano starter kit as a gift and might like to look into using it to setup an MPPT controlled charger for the 2nd project if I ever make it that far.

Any thoughts on introductory things to work towards / reading materials / must-have tools? I've got a fair amount of automotive related tools in addition to a decent Dremel kit and have good mechanical skills, just not electrical (yet).

Adbot
ADBOT LOVES YOU

That Works
Jul 22, 2006

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


That Works posted:

Most of the OP images are broken and some of the instructive value is lost so it's not quite as good of a primer as people had seemed to exclaim it was earlier in the thread.

I messed around with a bunch of radioshack breadboxes as a kid and have done lots of random work on automotive electronics etc but couldn't read a circuit diagram without some studying. I'd like to mess around with homebuilt electronics some as a hobby just to fool around.

I had an idea for two projects I'd like to get going, one simple / introductory and another that seemed more complex and be something I work towards over time.

1st I'd like to build a solar powered USB charging station, maybe slaving it to one of those USB power packs so I could charge multiple devices from it.

2nd I'd like to build a solar powered batter / inverter device that I could run most of my living room electronics off of. This would include a PS4, a 32" flat panel TV and 1-2 laptop computers.

Just googling around I can find dozens of DIY USB solar charger plans but didn't really know what would be a recommended one to start with. Also beyond that what might be a good place to start reading / look into plans to build a larger AC compatible charging device for running the higher current devices I mentioned. One issue I have with the 2nd project is that I don't know how large of a scale of panels / batteries / inverter this would require and if it would be even remotely feasible.

I have an Arduino nano starter kit as a gift and might like to look into using it to setup an MPPT controlled charger for the 2nd project if I ever make it that far.

Any thoughts on introductory things to work towards / reading materials / must-have tools? I've got a fair amount of automotive related tools in addition to a decent Dremel kit and have good mechanical skills, just not electrical (yet).

No suggestions on this?

That Works
Jul 22, 2006

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


ante posted:

Probably don't play with the AC portion for a long while, it can pretty easily result in blown up PS4 / house burning down.

LiPo charging circuits are also pretty tricky to get right, they have the same explosion/fire problem. If you're just getting 5V out of a panel and going to one of those cellphone batteries (that have internal LiPo balancers), then it should be do-able.


Playing with RGB LED strips are great instant gratification and low-risk beginner projects, though. Make a 3D LED cube or something, learn how to calculate proper resistance values for LEDs (and why), etc.

Thanks.

I got another suggestion to look into a solar panel lead-acid charging setup and to adapt that to a USB charging system. Viable? Any good recommendations for instructions on how to get that far?

And yeah, AC stuff was a long term goal and nothing I would just jump into, just kind of something interesting to work towards while finding smaller projects to learn towards that goal.

That Works
Jul 22, 2006

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


ante posted:

Pick up a breadboard off Amazon/eBay/AliExpress and some wire strippers. Grab a short length of Cat5 to make your breadboard jumpers, and try and find some tutorials on how to wire stuff up on breadboards from a schematic. You might stumble across Fritzing which is a computer breadboarding tool, but I advise you to not use it if you can help it. It's like using Visual Basic and will hurt you in the long run imo.


Then you'll need to look up schematics for doing the thing that you want to do. A 12v lead acid battery output -> to 5v input is totally doable on a breadboard, assuming you keep your 5v below half an amp.

Might want to invest in a cheap kit that has a bunch of 74hc series ICs (https://en.wikipedia.org/wiki/7400_series) and work through some examples with it. Also LED, capacitor and resistor kits.


If you're paying more than 10c per IC, LED, or resistor, you're getting ripped off.

Awesome. Much appreciated.

That Works
Jul 22, 2006

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


Aurium posted:

Sorry, I meant to write stuff on this but got carried away with sparks. And writing walls of text on sparks.


Yea, there was a few people talking about redoing the op, but it fell though I guess. either way. not so great.


This is a pretty great idea. At it's core, it's very simple. You can start with as simple as a solar panel -> 5v linear regulator. It won't be good. Solar panels don't typically put out much current, and the amount that they are able to source typically rises along with the voltage they try to provide. So with some made up numbers, if it can source 50ma at 5v (.25W), perhaps it could source 200ma at 12v(2.4W). I intentionally made that power different and nonlinear, solar panels are like that. Which is why MPPT is a thing at all. But a linear regulator will throw away the extra voltage and only use the current. So if it's set to 5v, you'd either get that .25W with the former, or 1W with the latter (5v*200ma). Also that other 1.4w would be dissipated in the regulator, which would absolutely need a heat sink. For usb charging you probably want 1-2a, 5-10w. Using a linear regulator you'd need a pretty big panel, and the regulator would probably get stupid hot. If you and your device (not all are) are ok with slow charging though, it's easy and you can do it all yourself with no problem. A power bank probably is just fine, (though it would take a looong time to charge)

But really, a linear solar charger is really much closer to toy than useful. You really want a buck converter, and those take much more effort. There are a few you could design, but they're not really beginner projects. You certainly could, but they're easy enough to get wrong in unclear ways. If your curious this eevblog goes though the design process for the MCP34063. It's not a particularly great chip, or particularly easy to use, but it'll give you the flavor of the land.

But really, there are so many great buck regulator modules on ebay and the like that unless you have something special, or want better integration on another board (and even then there are component style modules) that it's almost silly not to just buy a premade one. And there's still room for you to do stuff. For example, to enable faster charging on many phones, the usb data lines need to be put to specific voltages, and you still need to build that (it's easy, just 4 resistors). And a 10 watt solar panel charger would charge a phone as fast as you're really expecting.

Eventually you might want to start making your own little battery charger, and skip the power bank all together.

This is both a bunch of power and harder than you think. Even low power Inverters are tricky to design, and you're talking 100's of watts. You could eventually do it, but the sane way to do it would be buying almost all of those things as modules. Why? Because high power is hard, and harder to do right.


Lets start with how much power you need, and move backwards. A ps4 takes up to 150W, a 32in tv up to 70W. Call the laptops 90W each. I know that's what my power bricks say. If you wanted to use them all at the same time, your inverter would need at least 400W. You'd want some headroom, let's just call it a nice round 500W. How long do you want to use it for? Let's just go for 8 hours. You'd need 4000W hours. To put this in perspective, a typical car battery is about 1000 wh. So you'd need 4. But really you need more. A car battery (any lead acid battery) cannot be fully discharged without taking damage. 50% is an excessively safe number, but not outrageously so. Which would double the number of batteries (8). Also that's 8 hours between charging. If you want to use it every day, you'd need to charge every day, but some of the people I've talked to have said that for their needs, that a good planning numbers is up to 1 week without charge, of course that's because they need to run a refrigerator, and other essentials, not an entertainment room.. Still, that's 7x the number of batteries, (56). You also need to have enough panels to charge your batteries in an acceptable amount of time. If you only have panels to charge one day's worth of battery, but have 7 days worth batteries to charge, you'd best be hoping for a streak of good weather. But if you have too many panels, you've basically usually bought a bunch of useless panels.

Actually the best advice I've gotten from people is that if want solar power, and you have reliable grid service is to skip the batteries (or just have a minimal amount), and just sell back the electricity instead, and spend the battery money on panels instead. It simplifies the setup massively and does you as much or more good.


http://www.allaboutcircuits.com/textbook/

Multimeter. If you don't have an autoranging one, I'd recommend the uni-t 139c. It only $50, which is a fantastic price for it's features. It has pretty much everything you'd want in your first/primary meter. And it's pretty safe, which the same cannot be said for many cheap meters. Including other uni-ts. So if you ever wanted to start the solar house power it'd be acceptable for that too.

Thank you, this is very helpful.

House powered solar is something I wouldn't look at for a long time and probably would just end up buying an installation service package or something. Mostly I just wanted to learn a few things and make a semifunctional device and, if possible, make a larger device that had some real utility, but that sounds like it's a bigger project than I want to get into for a long time.

I appreciate all the advice.

That Works
Jul 22, 2006

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


Aurium posted:

I just wanted to let you know what you were getting into if you were wanting to completely replace a room of power, and needed it reliable. Mind, a "toy" solar setup can still be a very useful thing.

The last time I lost power for more than, say 2 hours, was years ago when a hurricane came through. Then it was out for just over a week, but the following days were all sunny and bright and perfect for solar. With a usable 1kwh battery, if all I wanted to run was a laptop and the internet modem it would last probably around 10 hours, more than enough to ride out the rare storms that take out power for a while. And for the hurricane example, with a ~250w panel (which is probably pretty close in size to what DreadLlama posted) every hour of good sun would give me 2 and half hours more, so a day of charging would top it back off, while I still used it.

And it wouldn't be too expensive either. A few hundred, mostly in the panel. Low power inverters are cheap, they're difficult to design and make from scratch as a hobby project, but they're produced in high quantities. A smallish solar battery charger you could potentially make yourself, though I'd buy this too, simple ones aren't hard, but there's things to consider like overcharging, and max power tracking. Though there are plenty of designs out there that you could understand and make. Last I talked with people, a year, maybe 2 ago, you can get panels for <$1 a watt. Possibly cheaper now. High wattage panels tend to have inconvenient voltages, but that's what the battery charger is for. If you have a access to a couple of old car batteries they'd be fine. Car batteries aren't ideal, they don't like to be discharged deep. They're optimized for instantaneous current instead, which isn't harmful, but it isn't helpful either. But they can be had cheap to free, sometimes in terrible condition. Otherwise look for RV, or marine. It should say deep cycle. Or look to see if there's a battery salvager near you, and see what they have for sale.


I'm not seeing anything wrong here? Are some of the cells hitting higher? Much lower? As long as they're not going over 4.2v they're within spec. You could potentially trade additional lifetime for lower voltage, but that would probably be a set of nontrivial modifications.

Someone else who knows batteries better than I might be able to say better. They really could just be that much better than the old ones.

Thanks! If I went that route I'd definitely go with marine deep cycle type stuff. I did a lot of work on car and boat diesels as a kid so am familiar at least with that type of electronic stuff but this was all alternator charged systems and ended up using a DC only system on the rest of the boat / vehicle. I do not want to build my own inverter no matter what really, just seems a thing to buy even if it was just a hobby situation but yeah you are right I am more thinking of running a rooms worth of power, not a home system with AC/ refrigerator etc.

That Works
Jul 22, 2006

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


TotalLossBrain posted:

The hugest problem in engineering is actually preventing engineers from experting outside their narrow field.

:five:


Hi all I am looking to get into a few DIY projects this summer, first and most specifically one regarding a chicken coop I just built https://forums.somethingawful.com/showthread.php?threadid=3468084&pagenumber=202#post504532354

First I need to learn how to set up a Raspberry Pi based sensor setup that also controls a servo or two and maybe another circuit or two as well. I had been thinking of doing something silly like building my own MPPT controller for a solar system for this and going down that rabbit hole, and also just looking into things I'd need to do in general I realize I need to get some more tools and also have some big knowledge gaps regarding materials.

Tool-wise I have a decent multimeter and stuff relevant to larger (home power) electronics and just a little experience with that and the Black and Decker electrical code manual for home wiring. Still trying to figure out what I don't even know about yet but have identified a couple things that I could use advice / suggestions on:

1. I have zero soldering apparatus. What is a good set of tools, iron, flux, materials, 'must-have' / 'really nice to have' accessories for soldering small work like this? Huge bonus points if I can order online and ship to me. People mention "get a good soldering iron", I have no way to know what's good and what's crap. I'm not gonna be doing this full time so I don't need the tip top model but wouldn't mind something better than crap.

2. Any guidance on a grab bag of wiring and connectors for this project and willing to buy something more expansive here to use for other things down the line. Online ordering again preferable.

One thing I have no knowledge of is how to choose what types and sizes of wires for each application, nor do I know why you'd choose specific types of connectors vs others. Hadn't come across a good intro source for that kind of thing yet.

That Works
Jul 22, 2006

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


Dominoes posted:

As recommended to me earlier in this thread:
Hakko FX-888D
Hakko chisel tips
MG desoldering braid, if you're doing SMT.

Anyone have flux or solder recs?

Buy a fan so you don't inhale flux (The smoke); it can cause respiratory problems.

A "helping-hands" setup with tweezers is also useful, but I don't have recs. I bought a Dr. Octopus thing on Amazon, and can't recommend it due to how positioning the hands is likely to unscrew them.

Tweezers and a magnifying device are also useful if you're doing SMT.


It's become evident that it's important to get good tips. Anecdotally, I've noticed a big improvement in wetting, resistance to oxidation, and heat transfer with Hakko tips. (Although the latter could be due to a switch from conical to chisel) There's also a good deal of leaded vs nonleaded solder chat a few pages back. TLDR is leaded solder works better, and you can assess how much lead exposure you're comfortable with. If you go the leaded route, wash your hands thoroughly after each exposure to solder or your products, and make sure you have a separate workspace from your normal activities. Also note that the flux is toxic.

Let me know if you have any pi-specific questions; I've been doing a lot of that lately using a CM3, and have been writing the code in a way that abstracts onto other microcontrollers using a HAL. (eg I was able to use the same RTC and code for it on both the Pi and a STM32 board.) Overall, you can treat it like a computer with interfaces, or a microcontroller that has some nice features, like a filesystem, display support, and heap.

Thank you! I am not planning to do much if any SMT yet but that may change as I learn more about what might work best for my project. I went through your posts and saw a good bit of the back and forth regarding tips, solder etc.

I'll probably take you up on the Pi stuff at some point but right now I am starting from a much further back beginner point and have lots of stuff out there to read and learn before I get to specific questions I think (hope). Thank you.

That Works
Jul 22, 2006

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


Dominoes posted:

Awesome. Bought some buffer soln off Amazon. From what I gather, calibration can keep it accurate over time, although response rate will decay. There's also a range of pH probes on the market using slightly diff approaches, and wildly diff prices, although they all seem to work by the same principle, and should be usable with the same electronics.

I'm experimenting with 4 cheap chinese probes I got off Amazon and AlibabA, eg this. I'll post the schem/pcb layout/code when done. For now, here's the guide I used to modify the setup into differential. (I think in that guide, they're not actually using the differential functionality based on lack of cap between inputs, not mentioning it explicitly, and the inputs they're using vice what's recommended, but it makes sense given the ADC) I'm using the same ADC as in that guide, but diff amplifiers. That guide includes some equations for voltage-to-ph conversion, but they leave a lot to the imagination; hoping to have something concrete soon.

You'll find that a company called Atlas Scientific sells both probes and circuits on Amazon, but the circuit alone costs $40.

I am not poo poo for electronics like you all but I do a lot of pH work in the lab etc. For Calomel electrode pH meters at least the solution / material temperature is part of the overall pH calculation. Does your probe also take this into account or if not does it need to? It's not a huge correction factor around room temp, but could be a concern if you were taking pH of some more extreme temps iirc.

Also seconding using known standards for calibration.

That Works
Jul 22, 2006

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


So I bought a very cheap battery to try out a couple things for that chicken coop. I wanted to have a solar powered setup that at minimum would run a pi zero W with a temperature sensor and be able to extend and retract a linear actuator on command, or on a timed schedule to open and close the coop door.

This isn't the final battery I'll likely use but it's good enough for now. I verified that the battery is at full charge via an automotive trickle charger that indicates it's at 100%.

Step 1 is to step down the 12v battery to 5v and get it to power the Pi Zero W.
Battery: https://smile.amazon.com/gp/product/B003S1RQ2S/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
Buck converter: https://smile.amazon.com/gp/product/B071FJVRCT/ref=ppx_yo_dt_b_asin_title_o00_s02?ie=UTF8&psc=1


I did my 1st soldering in probably 25 years connecting to the Buck. I set up the following rig to test everything out.

Positive has an in-line fuse of 5A. I used bullet connectors to connect 12g wire to 21g to solder to the Buck. The USB cable plugged into the converter was sacrificed and I crimped butt connectors to the + and - leads to make it easier to use my volt meter probes on since I'll probably be testing a few other USB sources for this and other projects later on.



Battery: 12.87 V, 0.226 A
Converter 1: 5.00 V, 0.060 A
Converter 2: 4.99 V, 0.060 A

So my question is, are these converters just poo poo, or is the way I have wired it up caused a problem, or is this the expected amount of current I should see? I was under the impression that the output current for each converter should be very similar to that from the battery, just at a lower voltage. I am completely new to all of this and may have misunderstood.

If it's how it's wired, please let me know? If it's a poo poo converter does anyone have a rec for a better one?

That Works
Jul 22, 2006

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


Forseti posted:

Cheap USB cables, especially if they're intended for data and not charging, tend to have really small wires, though it's short enough I wouldn't think it'd make a huge difference in this case. Also at that low of an output the blue LED could probably take a good chunk of it. Did you have it hooked up to a dummy load when you tested?

No I just had the probes from my voltmeter shoved into the other ends of those open butt splice connectors.

How can I hook it up to / create a dummy load?

That Works
Jul 22, 2006

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


:downsowned:

Thanks everyone.


One Legged Ninja posted:

In case you need a visual reference to what everyone is saying, this page explains it.

Yup seeing that made total sense.

I plugged the buck output into a cheap bluetooth speaker via a USB cable and that charged / acted as normal. I then plugged in a really old raspberry pi I had and that booted right up and seems to run fine. I'll set up a proper test circuit and measure amps across that once some more parts get in (I have a pack of resistors, LEDs and other parts + a breadboard that hasn't shown up yet).

Seems like the converters weren't damaged at least not to the point of total failure as they both put power out to the little speaker. Lesson learned.


KnifeWrench posted:

How are you measuring current? I don't see a load in your picture. Did you put your multimeter in current mode and then put it across the buck? Because that would be a dead short and might:
- if you're lucky, trip a protection circuit
- if you're unlucky, damage the board

How did you measure current for the battery? In-line? Did you have a load connected, or is that 226mA what the buck takes to run?

It was a dead short :downs: but seems like nothing was damaged (at least to complete failure).

Battery current measure was also dead short :downs: connected both probes to each battery lead and read voltage then spun the multimeter dial over to amps and took the reading.

That Works
Jul 22, 2006

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


I'm going to end up destroying so much hardware aren't I?

That Works
Jul 22, 2006

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


Cojawfee posted:

You just need to learn some basic electricity stuff and learn how a multimeter does what it does. When measuring voltage, you have to put the meter in parallel with the component because every component in parallel has the same voltage. The meter runs the current through a really high resistor like a megaohm so it doesn't siphon much current off of what you're trying measure. When measuring current, you have to be in series because the meter acts like a wire and will take all the current it can, so it needs some component in series with it to slow the current down. Hopefully your meter wasn't too expensive and now you know. Hopefully it just blew the fuse and you just have to replace that and maybe you might need to replace the probes. But the fuse should be there to protect the probes.

Got it. Thankfully no buzz, no spark no smoke and no error codes or beeping on the multimeter. Spent a little more time reading instructions again and watching a couple of vids.


I tried again just now with the USB output connected to a wireless phone charger (that had a chargeable phone on it) I was able to read current of 0.6A between the + battery connection and connecting the circuit from there to the + wire I soldered onto the Buck. So, at least the multimeter seems ok but I wasn't expecting that low of a current. While the ammeter was connected the phone did begin to charge.


sharkytm posted:

This should be clear, but DON'T LEARN ON MAINS VOLTAGE. Learn on low-voltage DC.

And buy a decent meter if you're ever touching mains power: https://www.youtube.com/watch?v=OEoazQ1zuUM&t=326s

Warning noted!

I have no interest in working on mains electrical stuff, at least not tinkering around like this. I'm staying far away from anything like that for a good long while.

That Works
Jul 22, 2006

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


ante posted:

That sounds completely correct. Under usual circumstances, USB is rated for about 500mA, but everything breaks the spec, so that's a ballpark that I would be comfortable with.


Household products completely break peoples' brains for their intuitive feel for how much current they think stuff should take. Car stuff, too.

If you're messing around with Raspberry Pi stuff, I don't ever expect you to see anything about maaaybe 1.5A or so, and often closer to 300-400mA.

Awesome thanks!

I went ahead and plugged in the Pi and it booted right up and is broadcasting so step 1 is good at least for the moment and it seems that I didn't break my multimeter.

This is a good time to note that one Buck converter offered itself up to the gods when my probe touching the soldering point slipped and touched an IC as well. The little blue LED promptly died and nothing ever happened with it again. Note to self to make some little alligator clamp leads or something.

The other one worked on the phone charger and the Pi.

Now that the weather outside is nice, time to unbox this solar panel and charge controller and wire that up to the battery (and then the panel).

That Works
Jul 22, 2006

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


Next part of the project.
20A PWM solar charge controller https://www.windynation.com/Charge-...1319?p=YzE9MTc=
100W solar panel https://smile.amazon.com/gp/product/B01HHDC6NQ/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

Panel is overkill, but I may scale this up to a larger battery to power a small water heater in the winter to keep an insulated water bottle inside the coop just above freezing. That and maybe I'll use it for other projects later on or something.



Per the instructions I inlined a 30A fuse between the + lead from the panel to the charge controller.

Ok so here's the questions / concerns I am having.
1. Is there a recommended / better way to connect to those odd solar panel wire plugs? Or do I just buy a set of M/F plugs and wire them up to a short run and connect that to the controller? I managed to connect jumper wires to each using some small M bullet connector crimp ons but I imagine this isn't probably ideal longer term.

2. Suggestions / criticism on splicing connections from the battery. Battery terminals are just spade clips (on the bottom of the battery in the photo). I made short jumpers to eye fittings that I bolted through then used the nut and bolt to attach new eye fittings to that have short wires to spade clips for other 12v output. These are all taped down so they don't move into contact and short out and once everything is connected I was going to fashion a cover for the + side wiring entirely. If this is all woefully bad please let me know.

3. The coop itself is in a shady area under trees. During the winter it gets direct sun but now through November it's no good. So, the panel will need to be set up either on my deck or on a small brick pad in the backyard. Both are about 20-30' from the coop. So, I need to run some wiring. The plan I'm thinking right now is to build a plywood stand large enough to accommodate the battery (or a much larger one), and a place to mount the charge controller with the appropriate spacing and ventilation for this and the battery. The top of this box will be cut at a 41 degree angle for optimum panel position oriented S at my latitude. So the panel acts as a roof for the structure.

4. Wiring from the panel-battery-controller stand to the coop. I was thinking of wiring the 12v leads into a female 110v type socket and using an exterior rated extension cord and running that out to the coop. In the coop would be a 110v male plug that fits to the extension cord and this would be split to apply 12V to the linear actuator and to the Buck converter which would connect to the Pi via USB cable. Is wiring it this way a bad idea? Just thinking of how to use stuff I already have or have easy access to that are cheap and can be set up in a way easy to keep weather proof.

Up suffering from insomnia, sorry if this is less than clear.

That Works
Jul 22, 2006

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


sharkytm posted:

Don't do this. 120VAC cords are for 120VAC. There are low-voltage connectors widely available that will meet your needs. For example: the SAE 2-pin connector used on battery chargers: https://smile.amazon.com/dp/B01N4B3RPH/ and similar products.

Bulkhead fittings: https://smile.amazon.com/dp/B07V6NJ37P/
Extension cables: https://smile.amazon.com/dp/B07Z7T494M/

Etc.

Thank you! Part of the process for me right now is just figuring out what is even available on top of how all of it works.


Forseti posted:

If you have a 100W panel you might be able to get away with just sticking it in the shade where it's convenient since it seems like you won't need anywhere near that much power. What are you running with it? Is it just the Pi and then maybe a solenoid or two firing occasionally? The Pi doesn't take much power anyway but if it isn't doing a whole lot you can even under clock it to save power I believe.

That was a near term plan and might be good enough? During the summer I only need to run the Pi, a temperature sensor and 2-3 times a day firing off the linear actuator to open and close the coop door.
During the winter if possible / feasible I'd like to power a small heater in an insulated water container to keep from it from freezing. I have not yet begun to look into heating elements and what kind of current that would draw, etc. If it's not feasible I can just power that off 110VAC from the house instead. The upside in the winter is that the coop becomes more sunny again once the leaves go, so efficiency might come up a bit although the daytime gets substantially shorter (I am in coastal RI).

I might just try this 1st since it involves the least amount of new materials and I can just let it run in place and see how battery charge looks after a while.


Sagebrush posted:

e: snip - informative math and facts

e: oh I see that you have actual figures we can work with. At 30 feet away and using a 100W solar panel and 14ga wire, you're losing 12.5 watts at 12v and 0.25 watts at 120v. The numbers there aren't as bad but you decide whether you care about the difference between 87% efficiency and 99% efficiency.

Would there be any benefit to having the battery and charge controller at the coop and having the panel stand-alone 25-30' away and wired directly from there to the charge controller?

E: maybe using something like this? https://smile.amazon.com/BougeRV-Extension-Female-Connector-Adaptor/dp/B07BRFPD6R

And, with step ups to higher voltage don't I start generating more heat? (not sure if its enough to be an issue)

Any products / resources etc to consider if I was going to go with step-up and step down transformers? Not sure what is commercially available, a cursory glance shows a few that go from 12 to 48V which I am not sure would be a big enough gain in efficiency to be worth the trouble / cost.


Thanks again all for your help. I am starting from very little knowledge here so its a huge help to have the advice.

That Works fucked around with this message at 18:19 on May 15, 2020

That Works
Jul 22, 2006

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


taqueso posted:

Don't do it just to prevent the future That Works from plugging 120V into their 12V somehow.

Never :downs:

That's a good point, if not me then some errant houseguest or something in the future tries to "help" and causes a problem.

That Works
Jul 22, 2006

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


Foxfire_ posted:

Depending on how much you care about doing things correctly/safely/durably, you should ask in the wiring thread. This thread is mostly ersatz electrical engineers, not electricians. They're related fields, but mostly only know enough about each other to confidently do things wrong.

How to build infrastructure wiring and connections in a way that is safe/cheap/durable/doesn't-invalidate-insurance-if-there-is-a-fire is a whole field and it's easy to do things that work, but past experience has shown to be bad and are forbidden by code.

Some specific things that I think are wrong from your pictures (but don't know enough to be sure):
- The tape and terminal block isn't a good way to connect stuff since there's exposed live surfaces and generic electrical tape adhesive doesn't last. There are a bunch of approved ways to do a splice, I think wire nuts are probably easiest.
- That wire doesn't look like it's supposed to be run outside of a chassis or conduit. You can get armored cable with wear+weather resistant jacketing or pvc flex conduit.

Thanks! Yeah this for now is just getting things tested with what I've got on hand or can get cheaply. I was not aware of the other thread / differences between the two.

The final system will almost certainly have a bigger battery etc and the stuff connecting to the coop I was planning on running in flex conduit according to our code but need to double check that. Got the Black and Decker wiring guide / electrical codes for 2020 here to go through as well.

Thankfully the entire system is standalone well distanced from the house so in the case of absolute catastrophe we'd be cooking some chickens sooner than planned. Once I kind of get my head around how everything fits and will it even work in the space it's for then I wanted to nail down safest practices for wiring, minimizing risk of fire in the coop, etc.

That Works
Jul 22, 2006

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


I'm gonna check in with the wiring thread as suggested but was wondering if anyone had any input on solar panel operation in a shaded area as I continue to try and figure out if I want to have the panels just on the coop or mounted 32' away on a more sunny area.

The 12V, 100W panel I got https://smile.amazon.com/gp/product/B01HHDC6NQ/ref=ppx_yo_dt_b_search_asin_title

At 8am in total shadow on a partly cloudy day it's producing 6.1W *Based on measured 18V, 0.339A
Users of this panel have reported up to 15W in shade. I'll see how it looks in full shade at solar noon.

Average sun hours for this region are 4.23 per day.

If I estimate 8W average over 4.23h that gives me 33.8 Wh expected *0.7 to assume I am only 70% efficient with wiring etc leaves me with 27 Wh per day.

So looking at load estimation:

Spring / Summer / Fall: ~30 Wh per day load (Raspberry Pi zeroW running wifi, temp sensor, 2-3 cycles per day on the linear actuator) being very generous with estimated power consumption here.
Not gonna go into Winter stuff yet, gotta work out water heating stuff, problem for another day.

So it's a little under what I'd need to run the panel in shade, but I think I am overestimating inefficiency here and also overestimating power consumption. Likewise the 8W average panel output is a lower end estimate as this is in total shade.

Right now I'm leaning towards installing the panel on the coop roof (angled properly) and having the battery and controller etc directly below in a sealed and vented enclosure. What do yall think? At this point I'd rather get an extra panel vs a distant run since it'll probably be helpful for Winter usage (keep coop water from freezing).

If that setup works I'll figure out how to safely wire it all up.

That Works fucked around with this message at 14:06 on May 16, 2020

That Works
Jul 22, 2006

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


evil_bunnY posted:

How did you measure this? You have an mppt solar controller?

20A PWM controller

I measured V directly off the panel leads and mA from the + panel lead to the + input of the PWM controller. Did I screw up something again?


e: while the PWM was charging the battery.

That Works
Jul 22, 2006

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


Sagebrush posted:

I'm rolling my Professor Eyes extremely hard at this attitude.

Mind my asking what class you teach and do you have an entry level textbook you'd recommend for some one learning from ground zero?

I've got a PhD but in microbiology, haven't had a physics class in almost 20 years and never had one in any kind of electronics.

Oddly enough have co-authored a few papers in electrochemistry but that's very far from all this.

That Works fucked around with this message at 00:44 on May 18, 2020

That Works
Jul 22, 2006

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


Sagebrush posted:

The class I teach in this stuff is one for industrial designers to learn how to hack together a working prototype of their design (to complement the usual appearance and mechanical prototypes) for demonstration or testing purposes. Not engineering; if the prototype works well enough to show the idea and let people try it out in a controlled setting, that's enough. Combination of basic electronics, programming, rapid prototyping, 3D printing, etc.

There actually isn't an ideal textbook for my particular class so I'm gradually writing one of my own. But Margolis' Arduino Cookbook is pretty decent: https://www.amazon.com/Arduino-Cookbook-2nd-Michael-Margolis/dp/1449313876

Thanks!

That Works
Jul 22, 2006

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


What's a toolchain?

Not joking

That Works
Jul 22, 2006

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


I have this linear actuator https://smile.amazon.com/gp/product/B07HNTPB87/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1
and this relay https://smile.amazon.com/gp/product/B00LW15D1M/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
https://www.youtube.com/watch?v=4oPFm2tyM58

a 12v battery and a Raspberry Pi zero W.

I've got a script that will fire off the right GPIO for 30s (takes 20s to extend or retract the linear actuator). Thanks to earlier recs from the thread I was able to solder the headers onto the PiZero board and it still functions / fires off the right pin at the right time. Counting this as a huge win.

Ok so now I am trying to get my head around how to make the Pi control a 12V DC linear actuator. I naively thought that a single relay could just make the actuator go down and then take the signal off of it and then it would go the other way.

Just wiring the actuator directly to the battery does this:

Blue wire (-) Brown wire (+) = actuator extends
Blue wire (+) Brown wire (-) = actuator contracts

So I can't just turn relay on and off to change directions. I guess I would need 2 relays. I think maybe they could work if wired like so?



I apologize for my crude diagram. I've never had a circuits course and have only been reading about this stuff for like 2 weeks off and on.

Would this work instead? And I just have the Pi run an "open door" command to light up GPIO4 for 30s then stop, then a "close door" command to light up GPIO17 for 30s then stop?

Also would I need to run the grounds on each relay (bottom rung of each facing the center) to the Pi as well?

That Works fucked around with this message at 21:05 on May 26, 2020

That Works
Jul 22, 2006

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


babyeatingpsychopath posted:

The standard way to do a relay-controlled bridge is one DPDT relay, and one SPST relay. The DPDT is "direction" and SPST is "enable." The relay module has the ability to use separate power for your relays and optoisolators via a jumper pin.

I really like this relay module. The SSRs turn on just fine with 3.3V. You can make a full h-bridge with these.

Thanks.

Will the relay module you linked work to have the Pi switch a 12VDC circuit for the Linear actuator? From the description I wasn't sure (I am very very new to this).

E: taking a second look it seems to only be a 5V system? Not sure if I am misunderstanding though.


Sagebrush posted:

You have run into a fundamental problem of DC motor control that is fixed with something called an H-bridge.

https://en.wikipedia.org/wiki/H-bridge

You have nearly designed one yourself, and the half-bridge thing you've got drawn up could theoretically work. But the problem with your design (if I'm reading it correctly) is that there are only two switches and there's no neutral position. So you risk shorting everything out if the timing isn't exactly simultaneous, which is impossible to guarantee with mechanical switches. Actually, now that I look at it more closely, I think you'll be fine -- the intermediate position will just connect both sides of the load to the same voltage so nothing should happen. What you have will work.

The good news is that H-bridge chips are super cheap (search Amazon, there will be tons of modules), or if you want to build one yourself, they aren't difficult to put together.


This is really cool thank you.

I am not seeing it yet, but is there a way to have the 3.3V Pi circuit trip stuff in the H-bridge for the 12VDC motor? From the diagrams in the wiki page I couldn't tell.

That Works fucked around with this message at 16:53 on May 27, 2020

That Works
Jul 22, 2006

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


Sagebrush posted:

You have run into a fundamental problem of DC motor control that is fixed with something called an H-bridge.

https://en.wikipedia.org/wiki/H-bridge

You have nearly designed one yourself, and the half-bridge thing you've got drawn up could theoretically work. But the problem with your design (if I'm reading it correctly) is that there are only two switches and there's no neutral position. So you risk shorting everything out if the timing isn't exactly simultaneous, which is impossible to guarantee with mechanical switches. Actually, now that I look at it more closely, I think you'll be fine -- the intermediate position will just connect both sides of the load to the same voltage so nothing should happen. What you have will work.

The good news is that H-bridge chips are super cheap (search Amazon, there will be tons of modules), or if you want to build one yourself, they aren't difficult to put together.

Would something like this work?

https://learn.adafruit.com/adafruit-tb6612-h-bridge-dc-stepper-motor-driver-breakout/overview

Also, the code associated and much else I can find when looking for motor controllers talks much about stepper motors but not so much about a brushed DC motor (which my linear actuator appears to have). Is there anything in particular regarding that which I should be wary of / take care not to gently caress up?

That Works
Jul 22, 2006

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


babyeatingpsychopath posted:

So relays have two voltage ratings: coil voltage and contact voltage. SSRs are much the same. The module I linked will turn 12V on and off (contact voltage) with a 3.3V signal (coil voltage). If you apply a 5V signal to the coil, it can switch much higher voltages easier. I have used that exact module to switch 12V with a 3.3V system (ESP8266).

The relay module was used as per the attached image.
When 3.3V is applied to the FORWARD pin, then Relays 1 and 4 turn on. Relay 1 connects battery+ to the + of the motor, relay 4 connects battery - to the - of the motor; the motor moves forward. Voltage is then removed, and the motor is free to coast.
When 3.3V is applied to the REVERSE pin, then relays 2 and 3 turn on. Relay 2 connects battery - to the + of the motor, relay 3 connects battery + to the - of the motor, the motor moves backwards.

If you apply 3.3V to both FORWARD and REVERSE, then you connect battery + to battery - through all your relays, and the smoke comes out of them.



Thank you that's way more clear now. I saw a 5 volts in the description and confused coil for contact voltage.

That Works
Jul 22, 2006

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


babyeatingpsychopath posted:

So relays have two voltage ratings: coil voltage and contact voltage. SSRs are much the same. The module I linked will turn 12V on and off (contact voltage) with a 3.3V signal (coil voltage). If you apply a 5V signal to the coil, it can switch much higher voltages easier. I have used that exact module to switch 12V with a 3.3V system (ESP8266).

The relay module was used as per the attached image.
When 3.3V is applied to the FORWARD pin, then Relays 1 and 4 turn on. Relay 1 connects battery+ to the + of the motor, relay 4 connects battery - to the - of the motor; the motor moves forward. Voltage is then removed, and the motor is free to coast.
When 3.3V is applied to the REVERSE pin, then relays 2 and 3 turn on. Relay 2 connects battery - to the + of the motor, relay 3 connects battery + to the - of the motor, the motor moves backwards.

If you apply 3.3V to both FORWARD and REVERSE, then you connect battery + to battery - through all your relays, and the smoke comes out of them.



I have solved the next problem only to find a new one. The good news is I am only 1-2 problems away from being completely done with this project!

It turns out I had ordered a motor controller over a month ago after going through some different tutorials etc and didn't realize it had arrived (was sitting in an unlabelled plastic bag on the back of my workbench).

Anyway, it's not the Saintsmart you suggested (I have ordered that one now) but its similar and there was a tutorial for it.
https://smile.amazon.com/gp/product/B01CC8XI60/ref=ppx_yo_dt_b_asin_title_o06_s00?ie=UTF8&psc=1

https://www.electronicshub.org/raspberry-pi-l298n-interface-tutorial-control-dc-motor-l298n-raspberry-pi/

Following the wiring instructions there:



And a script that fires off the enable pin "en" and either "in1" or "in2" I was able to contract and extend the linear actuator!

New problem though :negative:
The LA needs to run for 30s to fully extend or contract (300mm stroke length, 10mm/s movement rate). The motor has a 25% duty cycle listed so I've been careful to let it rest for more than enough time between tests.
I updated my scripts to run for 40s to either extend or contract and the 2-3x I have tried the motor will run but only for a couple seconds and then stop.
I tried using the same script to light up an LED bulb on the breadboard and those worked fine so the Pi output is OK. I also took the LA and hooked it directly to the 12VDC source and it runs and fully extends / contracts just fine.

I'm no expert, but the wiring to the motor controller etc and to the Pi all seems good, I don't think it's a loose connection. It's all premade jumper wires that work fine or alligator clipped wires.

Could it just be that this motor controller is not great, or is there something going on that I have no idea about?

That Works
Jul 22, 2006

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


ante posted:

How hot is that heatsink getting? Careful, sometimes they can make your finger sizzle like bacon.

It sounds like either: Your actuator's current draw is causing the LM298 or whatever to go into thermal shutdown, or your jumpers have intermittent contact when the table they're on is vibrating.

After leaving it plugged in and cycling the script 5-6x every 40s after it stops, the heatsink is barely warm to the touch. Likewise the Pi and the rest of the board etc as well as the LA motor housing etc are all cool or barely warmer than room temp.

After seeing your post I put the LA on a pillow on a chair below the table I am working on and also went around and re-seated every wire etc. Same issues. If I tell the LA to run for 40s each time with the script it will run for anywhere from 1 to ~7 seconds then stop. I've noticed if I wait a little longer (40+ seconds) before trying to run the script again generally the LA will run a few seconds longer before stopping. When I try to run it as soon as the 1st command ends that's when it runs for even less time or on a few occasions won't run at all.

That Works
Jul 22, 2006

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


Forseti posted:

It looks like you don't have a ground connected between the Pi and the board? That can cause all manner of weirdness, run another lead from the screw terminal to a ground on the Pi.

The white jumper wire in my photo is connected to ground at pin #6 on the Pi. It's also screwed into the (-) block together with that black wire which comes directly from the 12V battery.

I just double checked and both pins are screwed down and don't come out with a pretty solid pull on them. Could that still be a problem somehow?

e: I tried it at 2 other ground GPIO pins (14 and 39) and also tried it with a different jumper wire. Same issue, runs a couple seconds, stops, if I try to run again right away it just doesn't run at all.

ee: Thank you all for helping me troubleshoot dumb stuff and help me get my head around this. I am only 1-2 more steps from having all the pieces working and then I can combine everything and have it done.



That Works fucked around with this message at 00:30 on May 29, 2020

That Works
Jul 22, 2006

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


Forseti posted:

Oh, I thought it was in the next one over at a glance, oops. It's probably good enough for testing, and if it were an intermittent connection I wouldn't expect it to have such a repeatable failure mode. It sounds like something is capacitively coupled. Is that board providing +5V power or meant to be connected to a +5V source? I'm guessing provides from the voltage regulator I see there. Test it with a multimeter if you have one but if it's giving you regulated +5V I'd power the Pi Zero from that instead of the USB and give it a try.

Edit: Expanding on that, what is your power supply for the Pi? They're notoriously finicky, especially when you have external things hooked up to it. Mine only works well with the 2.5A one specifically made for it.

For now I am using the Canakit provided USB power supply, the plan eventually was to power the Pi with a 12v to USB buck converter that I had gotten working previously ITT. I am under the assumption that the provided power source was pretty decent. Might try another one and see. Or, like you say the board has a 5V out. I just need to figure out how to wire that to the Pi today and give that a go as well.

insta posted:

Check the crimp on your alligator clip leads. I had a cheap set that didn't have any exposed copper and just relied on the puncture through the insulation. I could easily see that causing problems with non-zero amperage.

Thanks I will check that out when I get back into the shop today, much appreciated.


It's frustrating when your errors / failure modes are "kind of works" instead of "does not work at all".


E:

babyeatingpsychopath posted:

I would absolutely run a line from +5V to your 5V rail on the Pi. I suspect you're not getting reliable toggle on the optoisolators and something's going into saturation. The 5V line powers the control logic on the board. With that line, anything above 2.5V should be "ON" and anything below 1V should be "OFF". Without, then who knows what's going on?


Sounds like a plan!

That Works
Jul 22, 2006

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


Ok I worked through a couple of suggestions and made some Voltage measurements as well.

tl:dr, my GPIO pin7 output off the Pi was loving everything up. Could be bad solder, could be bad Pi, dunno yet but everything works now if I just move to a different pin.



1. Check alligator clips.
I pulled the rubber booting back and saw clearly where each wire was soldered to the clip on each end, tested each with continuity tester, tried a new pair of wires and they also passed inspection, used the new pair for the remainder of the below work.



2. Wire the Pi off the 5V rail.
Done. Using 5V power to the #2 GPIO pin on the pi, and the ground from the center rail of the blue block above to #6 GPIO pin. Pi booted up fine.
Ran the script, motor ran for 3 seconds and then stopped. Waited the full 40s then immediately ran script again. Motor did not start at all.

3. Measured voltage at:

Battery = 12.4v
12V to ground on the board = 12.3v
5V out and ground = 5.02v
Across motor A leads = 0.02v when motor not running.
Across motor A leads = 10.01v when motor IS running.

From there I disconnected the motor and ran the script again. Across the motor A leads I measured 12V when the script started but within seconds this went to 0.00 / 0.02v

Next I tried to put the Pi back on its original source and removed the 12V jumper pin, nothing worked when I did that, no voltage to the motor leads etc.

4. Took the motor off, just started measuring voltage at motor A leads, found that I would now get 12v on the leads when the script started but within seconds this would go back to zero. So, at least it's not the motor.
5. Moved wiring to different pins, tested motor B leads. Found same as above.

6. Decided to test 3.3v coming off of each GPIO pin while the script ran. I had used GPIO7 to the "Enable" pin on the board and either pin 11 or 15 for the open or close scripts respectively. Lo and behold, when I ran the scripts I found that I would get 3.3v for the full length of time on pins 11 and 15, but not on pin 7. I changed the scripts to replace pin 7 with pin 16, tested 3.3v on pin 16 and it held 3.3v for the full 40s.

From there I reconnected everything and bam, both scripts ran the motor for the full duration! So, either my pin7 is faulty or when I soldered the headers on I hosed that one up somehow. I'll take it out of the case later and have a look with a magnifying glass.

In better news, this means I don't need to even worry about using the Buck converter and with this step now working, I think everything is done. I need to connect my temperature sensor again and make sure that still runs while the Pi is also hooked up to the motor controller and make sure that running the scripts there don't somehow interfere with the sensor output or connections. I think for all that I can move over to the Pi thread if I have trouble.

That Works
Jul 22, 2006

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


Ah I wasn't using any of their code. I was just running the below

code:
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(16,GPIO.OUT)
GPIO.setup(15,GPIO.OUT)
GPIO.output(16,True)
GPIO.output(15,True)
time.sleep(40)
GPIO.output(15,False)
GPIO.output(16,False)
GPIO.cleanup()
To open the door, and replace pin 15 with 11 to run the "close door" script. Originally both scripts had pin 7 instead of pin 16. The Pi is not connected to anything else (yet). I suspect soldering only because I've soldered roughly 3-4x in my entire life including the time last week I soldered the header to the Pi Zero.

Good to know that other things might fight for that pin though. Will keep in mind if I have to troubleshoot further once I get the temp sensor running alongside the motor control.

That Works
Jul 22, 2006

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


I'm a total newbie to the electronics stuff but I do microbiology for a living and we use UV sterilization at times. Just remember when designing / building your device that effectiveness of UV sterilization is subject to the inverse square law so be sure that your design allows your UV source to get as close to the objects as is feasible.

That Works
Jul 22, 2006

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


I'm gonna crosspost this over in the Pi thread but since you all were so helpful getting this running I wanted to see if anyone had guidance on best practices to make a breadboard functioning circuit into a prototype.

Basically I have this motor controller and the Pi, and a separate set of jumpers not shown that connect to a 10k resistor and a temperature sensor.


In the future I will probably add another temperature sensor and a relay, to make a thermostat + heater for the water supply to keep it from freezing.

These are all going to go into a chicken coop and will be out of any wind / rain but will at least need to be covered and put together in a way that is sturdy / stable.

My plan was to put the Pi and motor controller into a 2-gang PVC electrical box with a solid cover on it and have wires going in-out from it via PVC conduit. What's a good way to connect all the GPIO pinned stuff to each component long-term?

That Works
Jul 22, 2006

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


Forseti posted:

The ESP-12F module doesn't like it when you hook the power up backwards. Not that I would know because I did that or anything...

My USB buck converter as well. Funny that

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.

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

Adbot
ADBOT LOVES YOU

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.

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