Maker Pro
Maker Pro

Electromagnet with strength controlled by photoresistor

hevans1944

Hop - AC8NS
Jun 21, 2012
4,780
Joined
Jun 21, 2012
Messages
4,780
You can run longish 24 AWG stranded wires from the Arduino common to the MOSFET source terminals and from the Arduino output to the gates of the MOSFETs. These wires will carry the current required to charge and discharge the gate capacitance when you turn the MOSFETs on and off. When you wire up the coils, connect their power supply's negative ("ground" or common) lead also to the source terminals of the MOSFETs. That way, gate drive currents flow in the wires going to the Arduino and coil currents flow in the wires connecting the coil power supply to the MOSFET source terminals. If you so desire, the MOSFET sources can also connect to a non-current carrying "ground" such as the "green wire" power-line ground. This can sometimes help to reduce electrical noise on the "grounds". This type of ground connection is called a "star" connection because all the grounds are referenced back to a single circuit node: the source terminals of all the MOSFETs.

And, yes, it's all about the wire resistance that the "ground" currents flow through. By choosing a common ground point, the source terminals of the MOSFETs, and providing separate "ground" wires for the Arduino gate driver connections versus the "ground" wires for the coil power supply, you avoid injecting spurious voltage transient signals into the gate drive signals.

For example, let's say you connect a wire from the negative terminal of the coil power supply to all the MOSFET source terminals (seven of them I believe in your latest iteratiion). There will be a small voltage drop on this "ground" wire whenever one or more coils is conducting current. So, you would NOT want to connect the Arduino ground at the negative terminal of the coil power supply, because then the gate current drive would share a wire (and the resistance of that wire) with the coil currents. Instead, connect the Arduino "ground" near the MOSFET source terminals, separate from the coil power supply "ground" that is also connected to those same terminals.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
For example, let's say you connect a wire from the negative terminal of the coil power supply to all the MOSFET source terminals (seven of them I believe in your latest iteratiion). There will be a small voltage drop on this "ground" wire whenever one or more coils is conducting current. So, you would NOT want to connect the Arduino ground at the negative terminal of the coil power supply, because then the gate current drive would share a wire (and the resistance of that wire) with the coil currents. Instead, connect the Arduino "ground" near the MOSFET source terminals, separate from the coil power supply "ground" that is also connected to those same terminals

Thanks. That's very specific.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Hey guys, tonight was an eventful one. I made a new schematic, this time with all the parts. I looked back at an earlier schematic and realized I had the circuit between the Arduino 5V pin, the photoresistor, and the Arduino analog-in pin misrepresented — I was missing the resistor that sits in that circuit (it was there when I was testing, I just forgot to draw it). This error in the diagram cost me some time, as when I tried to construct the circuit with multiple photoresistors, I pursued a misguided attempt at allowing them all (tonight's testing was geared toward making sure I could work with multiple inputs/outputs) to share the same static resistor. That didn't work well (they all got the same reading), and I had to re-evaluate it. Here's where I'm at right now. I tested it with three photoresistors driving three LEDs. I don't have multiple electromagnets yet, so I used LEDs as surrogates. It works.
160227-a-schematic.png

I also considered giving the electromagnets a common diode, but realized that would have the same problem as I encountered when doing the similar thing with the photoresistors: they would not be isolated. I think the rule here is that independent components can often share one lead but never both...?

I also planned out my perf board layout. This is where I most need feedback if someone has a minute to look it over:
160227-b-schematic.png

The components will be on top, with traces and wires on the bottom. This was revised at the last minute when reading over @hevans1944's notes about isolating the PWM grounding wires from the power supply. Thanks again for those specific instructions!

Also, on a somewhat related note, I ordered two of these, one for electronics and one for household stuff. They are awesome. And cheap. I'll definitely be buying more.
51u22bc2zHL.jpg


Have a good night everyone!
 
Last edited:

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Well, the first draft is done, and it works flawlessly. Tomorrow will be the first crit, so I'm sure I'll get some feedback. and have some other things to try. I'll probably have to introduce some weights to get it to sit exactly level (which is what it will need). Overall, though, I'm quite surprised how well the production phase went. Particularly the electronics, which were completely flawless right off the bat... Never had that happen before, even building from a kit!

I'll make some videos over the next week or so, and I'll be sure to upload some photos of the install. To everyone who commented, and especially @hevans1944 and @duke37, I very gratefully say thanks! It's an rare community that's willing to engage with people at all levels of learning with such knowing and patient expertise, and that's exactly what you have here. Thank you very much!

160301-a-photo.jpg


160301-b-photo.jpg


160301-c-photo.jpg


This is going to look amazing in a gallery with an LED panel underneath it!
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
Hey guys, to close out this project, I thought I'd share some documentation materials. Here are some photos:

160317-b-photo.jpg


160317-a-photo.jpg


160317-c-photo.jpg


And here is the video I put together for documentation.


Again: Thanks to @hevans1944 and @duke37!
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,780
Joined
Jun 21, 2012
Messages
4,780
Wow! You didn't tell us this was ART! What a wunnerful display of imagination! Kudos to you!

This reminds me of a (obviously) CGI display of an interactive topographic map, now common in recent motion pictures, but that I saw most recently while watching an old DVD of X-Men a few nights ago.

Nice job suspending with three cables and turnbuckles for leveling.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
This reminds me of a (obviously) CGI display of an interactive topographic map, now common in recent motion pictures, but that I saw most recently while watching an old DVD of X-Men a few nights ago..

Exactly. Wouldn't it be awesome to be able to manipulate actual materials that way?
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,780
Joined
Jun 21, 2012
Messages
4,780
Exactly. Wouldn't it be awesome to be able to manipulate actual materials that way?
Well, you have shown it can be done on a small scale. As you noted, just gotta get the control of the magnetic field placement to be little bit finer and more precise.

On a similar note, a few years ago (well, maybe more than a few) I was trying to copy a contour on a piece of molding and transfer that contour to another piece of wood. I found a contraption that consisted of several hundred steel pins all clamped side-by-side in a straight line by holder. The pins were free to move along their length because the clamping pressure was not enough to prevent this, but it was clamped strong enough to keep the pins from falling out. So, I bought one, took it home and pressed the ends of the pins up against the molding. Voila! There was the outline of the molding expressed as pins sticking out to various degrees. Unfortunately the resolution was not very good because (1) the pin diameters were too large and (2) there were not enough pins to give a smooth outline of the molding curvature. But the principle was sound: just add a lot more and smaller pins. I haven't seen this happen yet with the commercial product. I guess the original design was "gud enuf" for the general user. So, if I want finer resolution, I'll have to find some tiny pins and make my own. Or not. There are better ways now to digitize profiles.
 

purj

Feb 14, 2016
47
Joined
Feb 14, 2016
Messages
47
There are better ways now to digitize profiles.

I feel like this is the same situation with this ferrofluid idea. Places like the MIT Media Lab are making stuff like this awesome project, which seems more promising in terms of practical applications, but there's still something about the solid-to-liquid element that I really appreciate about using ferrofluid... I think I'm going to give it at least one more iteration. This week I'll be working on software for an earlier project from that same class (see it here) and if I have time, I'll use the calculations I made earlier in this thread to hand-wind some electromagnets to spec and see how they work with the fluid. The fields will be way more spiky, but hopefully I'll be able to pack them closer together (it'll be back to the 3/8" diameter core, with 31 AWG wire wrapped around ~6.5" of it). One thing I really like about this idea is the way that machine would look with 7" of copper and iron at the top. It's already pretty bomb-like; the second iteration would be way more so.
 
Top