Arduino

549 readers
1 users here now

This is an UNOFFICIAL Arduino community.

Everyone who uses Arduino board or their clones or associated boards and/or the Arduino IDE is welcome here. If it involves Arduino hardware or software it's welcome here. If it connects to Arduino hardware it's welcome here. If you're building your own boards that you use with an Arduino it's welcome here. There will be no Arduino elitist bullshit in this community.

You may also be interested in:

AVR

RULES:

  1. It's always a floating input.

  2. All Lemmy.ca rules apply here.

  3. Everyone (see rule 98) is welcome.

  4. If you’ve seen a question 100 times answer it the 101st time or ignore it. Even better, write a complete, detailed answer and suggest that the mod(s) pin it to the community.

[Did you actually think there were 98 rules?]

  1. If you present something as fact and are asked to provide proof or a source provide proof or a source. Proof must be from a reliable source. If you fail to provide proof or a source your post or comment may be removed.

  2. Don’t be a dick. Yes, this is a catch-all rule.

  3. The mod(s) have the final say.

founded 1 year ago
MODERATORS
26
 
 

Help point a noobie in some interesting directions.

I've got the basic Arduino starter kit and some other breadboard components at this time. Eventually I'd like to learn more about PLC control systems. I'm happy to dive into other interesting areas as well.

Any recommendations for sites, books, Youtube channels or even related subject matter that'd be useful to get acquainted with would be much appreciated.

27
 
 

cross-posted from: https://lemmy.ca/post/703695

Yesterday I posted a picture of a little tact switch that I installed on a piece of protoboard with a hardware debounce circuit on the bottom. I love those little things and thought I would share a how to for making them.

The first thing you need is the little piece of PCB. I had a bunch of these Altoids Tin protoboards made up a few years ago.

image

Full

I break them down into smaller pieces,

image

Full

then I break those down to the size that I need,

image

Full

then I sand the edges to make them pretty (and also to make them small enough to sit beside each other if I need more than one.

image

Full

Note that the board consists of four columns of 3 connected pads and four columns of 2 connected pins.

Next, I assemble (almost) all of the components that I'm going to need. These are (top to bottom, left to right) 1 uF 0804 capacitors, 1 K 0804 resistors, and 10 K 0804 resistors, the little sanded piece of PCB, three r-pin pieces of header strip (I like to use one red, one blue, and one black but you can use all black or any other color you want), and a 5 mm x 5 mm tact switch (I like the ones with the 7 mm shaft as shown because I can put a cap on them but any old tact switch will do.) Missing from this picture is a

image

Full

First, we're going to install the debounce components on the bottom of the board. With the columns of 2 at the top and the columns of 3 at the bottom you're going to bridge the gap on the second column with the little jumper wire and the third column with the 10 K resistor. Next you're going to bridge the top end (at the 2-pin column side) of the little wire and the 10 K resistor with the 1 uF capacitor. Finally, you're going to bridge the bottom of the right two 2-pin columns from the pint where the 1 uF capacitor and 10 K resistor meet to the bottom of the last column leaving the hole unobstructed. It will look like this:

image

Full

image

Full

The next part is tricky. You have to push some of the pins on the header strips through. On the black one and the red one (or two of the black ones) you're going to push three of the pins through from the long side. On the blue one you're going to push through one of the pins from the long side as shown.

image

Full

Now, push the header strips into a breadboard as shown. The pins that you pushed through do not go into the breadboard, they stick up into the air. It's important that the pins that you didn't push through on the red and black strips line up with the one that you did push through on the blue strip as shown.

image

Full

Next, put the PCB over the pins as shown. The soldered components should be on the bottom of the board facing the breadboard. Make sure that the point where the capacitor and two resistors meet is in line with the three special pins on the header strips. If thy don't you can turn all of the header strips around and try again.

image

Full

Next, clip the pins you pushed through, the ones stick up into the air, off flush with the PCB.

image

Full

Now, push the ends of the short pins you didn't push through and cut off down flush with the surface of the PCB.

image

Full

Check one more time that the three special pins and the point where the three components meet are lined up then solder the pins marked with an X.

image

Full

Now, grab your tact switch. Note that the legs have bumps in them to help hold them in the holes while you solder them.

image

Full

Use a pair of smooth jawed plyers to squeeze the legs straight then bend two pins out at 90 degree angles as shown.

image

Full

Trim off the ends of the pins you bent.

image

Full

Insert the tack switch into the PCB as shown. The bent pins will be over the two pins in the blue row that you didn't solder above. You will need to bend the bent pins out a bit to make them reach the middle of the pads.

image

Full

Now, solder all four pins pushing down on the body of the switch to make sure it's tight to the PCB and lined up square to the board.

Once you've soldered the switch in place flip it over and make sure that there is a good connection between the end of the 1 K resistor and the pin of the switch. Add a bit of solder if you need to.

image

Full

Now you can plug the switch into your breadboard and add a Dupont wire or jumper wire to the pin of your MCU.

image

Full

Note that the red header strip and blue header strip match up with the red and blue rails on the breadboard. This switch can only be installed on this side of the breadboard to get a debounced going low switch. The construction of a switch for the other side of the breadboard is exactly the same but you switch the position of the red and blue header strips.

This is what one of these little switches looks like in a project. This is a prototype for a ROM switching and RESET circuit I'm going to build into a 23xx to 27256 ROM adapter for the Commodore 64.

image

Full

28
 
 

This is the bottom board that I designed to fit into the BUD DMB-4774 DIN rail mounted PLC case. It carries the MEGA2560 Pro Mini board (on the left) and the ESP32 board (on the right.) All of the controller code runs on the MEGA2560 (more than 4,000 lines of BascomAVR which I'm converting to Great Cow BASIC right now because the guy who wrote BascomAVR is a dick and GCB is far more feature rich) and the ESP32 does all the WiFi over the MQTT protocol (more than 800 lines of Sketch.) There's also a dual FRAM card standing on edge below the ESP32 which I use to store logs.

The green connectors are 9-place pluggable 5.08 mm screw terminals that let me unplug a whole block instead of undoing a bunch of screws (VERY handy.) The 20-pin box header on the left edge connects to the top board which does the HMI stuff.

The labels on the connectors are things like:

BFS - Bottom Float Switch (in the releaser) TFS - Top Float Switch VS - Vacuum Solenoid AS - Air Solenoid LVL - Releaser Level (an IR laser TOF sensor) PVT - Pump Side Vacuum Transducer CVT - Collection Side Vacuum Transducer VP - Vacuum Pump

That's the first block. The other blocks have similar meanings.

29
 
 

This is the machine that runs my maple syrup machine room. The PLC (the large grey box on the left in the second section from the top) runs a MEGA2560 Pro Mini with an ESP32 as a WiFi modem. There are more than 4,000 lines of BascomAVR running on the MEGA2560 and around 800 lines of Sketch on the ESP32.

The top section is power distribution. The middle section is supposed to be PLC only but my 24V power supply and distribution leaked into the right hand end opposite the PLC. The bottom three sections from left to right are analog input, digital input, and digital output.

This thing runs a vacuum pump (a MasterCool 90066A), a transfer pump (a small Iwaki), an RO pump, and two solenoid valves (to be replaced with motorized ball valves this summer.) It takes inputs from a bunch of float switches, two vacuum transducers, a pressure transducer, three high precision digital thermometers, and two last time of flight sensors. This thing runs the entire process from the trees through collection and storage through the RO into secondary storage and out a tap to be boiled in the evaporator.

The PLC uses a pair of custom boards that I designed to fit in the BUD case they're installed in. I'll post pictures of the inside shortly.