0

nano brewery building an automated filling rig
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: nano brewery building an automated filling rig

by burrito_poots on Sat Jun 29, 2019 6:39 pm

Okay, I'll likely stack my feathers on top of each other, then onto the feather doubler, then onto the feathering doubler.

One last question for you Bill: my MO express has the OLED stacked on top of it, then the feather express slotted into the Feathering Doubler. Right now, there is now space between the MO feather and the Doubler boards, they're basically laying flat against each other due to how I have my headers and such set up. Is this committing some sin I'm unaware of? Pic below to help the confusion:
IMG_7465.jpg
IMG_7465.jpg (938.35 KiB) Viewed 219 times

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Sat Jun 29, 2019 6:50 pm

From a heat dissipation point of view that looks fine. My question would be: are the pins soldered directly to the M0 before connecting to the doubler? Just having the header pins pass through the M0 board un-soldered is not going to give you reliable connectivity.

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Mon Jul 01, 2019 4:13 pm

Ooh yeah, completely spaced on that although I’m certain I would have figured out pretty quick what was wrong. I’ll end up soldering the board with a spacer of some sort between the bottom MO and the featherwing doubler, I couldn’t seem to find a female to female short header.

Since you are jam packed with knowledge, from the sensors and such that I’m using, is there a reason why I wouldn’t be able to accomplish the programming with circuit python as opposed to regular python? I’m not yet familiar with the limitations it’ll impose, assuming it gives up more control/customization capability (in comparison to python) for an easier learning curve.

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Mon Jul 01, 2019 4:39 pm

The biggest advantage of CircuitPython over standard Python is that you can run it on these small microcontrollers. And the CircuitPython team has made ease-of-use a priority.

The one notable limitation is that there is currently no support for threading. And as you would expect, running on a smaller processor means you are more likely to run into memory constraints that you would with a larger processor like a Raspberry Pi or BeagleBone.

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Sat Jul 13, 2019 11:30 pm

adafruit_support_bill wrote:Not much really to the MOSFETs. You connect the "Source" pin to GND. The "Drain" pin to one terminal of the Solenoid and the other terminal of the solenoid to your supply voltage (typically 12v-24v - depending on the solenoid). The "Gate" pin of the MOSFET connects to a digital pin on your processor. You set that pin HIGH to turn on the MOSFET and actuate the solenoid.

The Sharp sensor needs just a digital pin. The TFT wing will make use of the SPI and I2C buses of the processor.

If you are OK programming in Arduino language (a derivative of C++) you have plenty of choices. If you prefer something like Python, you are limited to the "Express" Feather processors like the M0 or M4.


Hey Bill, been a bit but I'm finally getting around to wiring this up, had a question for you regarding the solenoid and it's power supply. My solenoid needs a positive and a negative connected to it from the power supply to actuate it. In it's current form, this is how my beta version of the filling rig works (that I built before I started looking at these forums): I have a roller switch that closes the DC power supply circuit and actuates it). I'm a little muddy on your above explanation because as I'm reading it, only one of the positive/negative wires is accounted for ("and the other terminal of the solenoid to your supply voltage") -- meaning I don't have a closed loop here? I'm having a hard time wrapping my head around this and I feel it should be obvious here lol. I looked at this example: https://learn.adafruit.com/robotic-xylo ... id-circuit and it honestly made me even more confused, as it seems to be applying positive and negative power from the DC to the protoboard (which I assumed would also be fed to the board they stack on top?)

So my best guess I think this is how I'm supposed to wire it up: I connect the MOSFET's S pin to the negative wire of my DC circuit, D pin to negative wire of my solenoid, Positive wire of my solenoid to my positive DC circuit, and G pin to any of my boards pins that I then operate as a simple digitalio -- can you confirm me on this? I'd have dove in here, but since this is now bringing in a large amount of voltage, last thing I want to do tonight is go in guns-a-blazing and fry my board.

My guess is GND = Negative and in this example it doesn't mean related to my M0 Express's gnd but the DC power supplies GND?

Also, for the sharp sensor: what is the “VIN” it’s needing to connect to? I’m unfamiliar with this, and my searches keep showing up info about servos and outside power supplies. Confused as to how it relates to the boards connections, fingers crossed this just means the 3v power pin on my M0 Express?

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Sun Jul 14, 2019 5:45 am

Both pins are accounted for.
The 'low side' connection is switched through the drain pin of the MOSFET
The "Drain" pin to one terminal of the Solenoid . . .


The 'high side' connects directly to the power supply.
. . . the other terminal of the solenoid to your supply voltage


Image

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Wed Jul 17, 2019 11:35 pm

Hey Bill, so I wired everything up and forgot the resistor — I didn’t notice this right away. How likely is it that I fried my MOSFET and is there a way to easily test my mosfet somehow to see if it’s still okay or not?

I did get a resistor bridged between those two pins, and once I did that, nothing at all. Before the resistor, I got a lot of weird stuff, like just touching my board would sometimes actuate it sometimes not, or give it like a weird half-power (almost like the solenoid sounded like it was stuttering, even the led in its internal snubber circuit seemed to be funky trying to light, all of this was pre-resistor — post-resistor and none of this happened).

I did verify my output pin connected to my mosfet was correctly pushing out voltage, so that’s working on that end at least. Unsure of how/where to trouble shoot going forward from there.

Edit: I also checked with my multimeter to make sure it wasn’t my solenoids problem, when the mosfet was supposed to be switching power to my solenoid, I verified it was receiving 0 volts. I did do a really trash job soldering, I’m wondering if maybe they’re a little more heat sensitive than I assumed, and the longer than normal soldering attempts maybe cooked it? I’ll attempt to find a replacement mosfet in the next day or so to do a quick test, but any suggestions besides that to help narrow this down would be appreciated.

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Thu Jul 18, 2019 5:58 am

R2 in the diagram above is intended to drain the charge from the gate to make sure that the MOSFET turns off when your control signal goes LOW. In practice I have never found them necessary with the N-channel power MOSFETs we carry in the store. And running without one would not have damaged the MOSFET.

Before the resistor, I got a lot of weird stuff, like just touching my board would sometimes actuate it sometimes not, or give it like a weird half-power (almost like the solenoid sounded like it was stuttering,

Sounds like maybe the MOSFET was not turning on completely before adding the resistor. What value resistor did you add?

I’m wondering if maybe they’re a little more heat sensitive than I assumed, and the longer than normal soldering attempts maybe cooked it?

It is possible to overheat these when soldering. But you would have to work at it. The TO-220 package can dissipate a fair amount of heat. A more common cause of damage for MOSFETs is static discharge during handling.

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Thu Jul 18, 2019 11:15 am

I got a 10k resistor, 1/2 watt

I'm not sure on what to do next at this point. I did handle the MOSFET pretty freely, so I could see that maybe I damaged it via the static issue, but I did heat it up a good amount as well due to the poor soldering.

Would a best next action to take be, get a fresh MOSFET, hook it up with alligator clips to make sure I'm not overheating it, take care when handling to prevent static, and see if I can repeat my same problems?

I'm stumped on the pre-resistor issue and how it was sort of magically turning on/off my solenoid -- it was awfully strange. I have a video of it, I'll see if I can get that uploaded and link to it later today.

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Thu Jul 18, 2019 11:32 am

I'm stumped on the pre-resistor issue and how it was sort of magically turning on/off my solenoid

Double check the pinouts and your connections. Also check the voltage drop through the solenoid to see if the MOSFET is turning fully on.

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Thu Jul 18, 2019 2:20 pm

Apologies bill, but how/where exactly would I check that? I’m guessing multimeter to x and y wires while I have my pins value set to high/true? I originally assumed I was looking for a voltage increase, not a drop, unless this is just semantics I’m misinterpreting.

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by adafruit_support_bill on Thu Jul 18, 2019 2:45 pm

Put the red probe on the supply voltage side and the black probe on the MOSFET side. That will give tell you how much of a voltage drop there is across the Solenoid.

If you put the red probe on the drain pin and the black probe on the source pin, it will tell you how much voltage drop there is across the MOSFET.

Ideally, when the MOSFET is OFF, the voltage drop across the solenoid will be 0v and the drop across the MOSFET will be the same as your supply voltage. That indicates that no current is running through your solenoid.

And when the MOSFET is ON, the drop across it should be very close to 0v and the drop across the solenoid should be very close to the supply voltage.

If the MOSFET voltage drop is not close to 0v, that means it has not fully turned on, so the solenoid is not getting full power.

adafruit_support_bill
 
Posts: 74647
Joined: Sat Feb 07, 2009 10:11 am

Re: nano brewery building an automated filling rig

by burrito_poots on Fri Jul 19, 2019 8:33 am

Bill,

Here's what I have, note that these reading did not change regardless of my board sending an output signal to the MOSFET:

When I put my red probe on. my 24DC supply side (circled in red) and black probe on: either Source or Gate, I get 24V
When I put my red probe on drain and black probe on source, I get 24V. Again, I did verify that my output from my board did change when my button was pushed, setting it to either 3.3v or 0, so it's talking to my MOSFET, but it seems my MOSFET isn't listening for whatever reason here.

Below is the drawing to help make sure I didn't overlook anything obvious here.

IMG_7640.jpg
IMG_7640.jpg (406.69 KiB) Viewed 66 times

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by burrito_poots on Fri Jul 19, 2019 8:50 am

Not to throw a total wrench in the machine here amigo, but is there a reason I couldn't use this DC Motor wing https://www.adafruit.com/product/2927 and use it to directly actuate my solenoids my solenoids we're all rated at 12v or less? These solenoids here are what I'd be looking at: https://ussolid.com/ussolid-1-4-5-way-2 ... -12-v.html – these show 29mA listed on the body of it so my assumption is that's what it takes to actuate them (although I've no clue, just trying to make an educated guess with my limited knowledge on electrical stuff). If that's me interpreting correctly, these would be under the limits of the DC Motor wing and would give me exactly the four solenoids I need to control.

Based on the CircuitPython guide for that wing, I would assume I just turn my "motors" to full throttle or no throttle, hopefully actuating my solenoids and also giving me less soldering responsibilities like I currently have to deal with :)

burrito_poots
 
Posts: 64
Joined: Thu May 30, 2019 5:02 pm

Re: nano brewery building an automated filling rig

by kcl1s on Fri Jul 19, 2019 8:58 am

I believe you need a common ground between the feather (gnd) and supply ( - ). You may have it wired that way but it is not shown in your drawing.

Fellow hobbyist
Keith
Last edited by kcl1s on Fri Jul 19, 2019 9:06 am, edited 1 time in total.

kcl1s
 
Posts: 1291
Joined: Tue Aug 30, 2016 12:06 pm

Please be positive and constructive with your questions and comments.