Cali Kid Corals

DIY Automated Alkalinity Tester

To anyone who might have electronic input (CC @thesassyindian @Prestondeeply ), I could use some advice about my magnetic stirrer. I can't get it right.

I'm running +24V to the device itself. The guts is effectively an ESP32 in a circuit with places to plug in the servo drivers and various ports exposed. The board is technically for driving a CNC machine.

The stirrer I put together as a cheap dc motor with a magnet holder attached.

To power the stirrer, I'm using the board's cnc spindle output. When I enable a port on the esp32 (let's say digitalwrite(22, HIGH) or an analog write), the spindle outputs +24V, effectively a basic dc motor driver with no PWM control.

That's way too much voltage and way too much current for the motor. It's way too fast, and would burn out.

What I'm struggling with is how to keep the motor from stalling, while also avoiding it spinning at a billion RPM.

I tried a PWM dc circuit, but if I lower the speed that motor sometimes stalls. Also if it turns off/stalls, it seems to get stuck and higher voltage/speed may not unstick it.

Is there a basic solution I'm missing to this? Maybe I bought crappy motors and need to buy a better one? Any pointers

Hey @richiev , great work with this! From the image above, it looks like the board you are using is the Makerbase DLC32. Yes? I am fairly certain so I'll consider as such for the rest of this message. Here are my scattered thoughts:
  1. The Spindle output seems like a basic NMOS switch with a flyback diode:
    1688793108778.png

    This PWM ideally should work but this greatly depends on the way you've designed your stirring mechanism.
    Cheap DC motors typically have cheap Alnico or some other cheap magnet. Whereas the behavior you are experiencing tells me you are using Neodymium magnets for the stirring spindle. Yes?
    If so, the magnetic field from the stirring spindle will interfere with the stator magnets in the DC motor. Consider moving the motor away from the stirring spindle and connect it with a pulley.

  2. Alternatively, can you check the datasheet of the NMOS in the image above for its Ids rating? You may be running into its current limit. Run the motor with your stirring magnets with a power supply and measure the current draw at the rom you wish to run it at. (Remember the current draw will increase once you add the stirrer bar, and liquid. So you should be no more than 50% of the MOSFET current rating.)

  3. One alternative would be to use dedicated DC motor drivers like a DRV8871 which has an internal current regulation circuit and automatic fault recovery.

  4. With a dedicated driver like the DRV8871, I would use the TTL Output port to output a PWM to the control pin of the motor driver.
    Check if a 1KHz PWM generated on IO32 can be read on one of the three pins on the below connector.
    1688793933611.png
 
Hey @richiev , great work with this! From the image above, it looks like the board you are using is the Makerbase DLC32. Yes? I am fairly certain so I'll consider as such for the rest of this message. Here are my scattered thoughts:
  1. The Spindle output seems like a basic NMOS switch with a flyback diode:
    View attachment 48630
    This PWM ideally should work but this greatly depends on the way you've designed your stirring mechanism.
    Cheap DC motors typically have cheap Alnico or some other cheap magnet. Whereas the behavior you are experiencing tells me you are using Neodymium magnets for the stirring spindle. Yes?
    If so, the magnetic field from the stirring spindle will interfere with the stator magnets in the DC motor. Consider moving the motor away from the stirring spindle and connect it with a pulley.

  2. Alternatively, can you check the datasheet of the NMOS in the image above for its Ids rating? You may be running into its current limit. Run the motor with your stirring magnets with a power supply and measure the current draw at the rom you wish to run it at. (Remember the current draw will increase once you add the stirrer bar, and liquid. So you should be no more than 50% of the MOSFET current rating.)

  3. One alternative would be to use dedicated DC motor drivers like a DRV8871 which has an internal current regulation circuit and automatic fault recovery.

  4. With a dedicated driver like the DRV8871, I would use the TTL Output port to output a PWM to the control pin of the motor driver.
    Check if a 1KHz PWM generated on IO32 can be read on one of the three pins on the below connector.
    View attachment 48631
Great ideas, thanks!

Regarding the stirrer stopping and then magnets, I think I'm trying to run the motors too slowly. I think it stalls even without the magnets, but I haven't tried recently. Moving that magnets further away does seem smart.

I ended up buying some geared dc motors. N20 is what they were labeled. I don't know what that means, but they're very small and have metal gears. The 600rpm ones seem to run at about the right speed to produce a good stir and the gearing means it can run at higher speed
and therefore higher torque and doesn't stall.

The downside is it's loud, at least when mounted the way I have it. I might try printing the mount in TPU to see if it'd be quieter.

The smarter driver is also a good idea. I imagine I could find a free pin somewhere to control it.

Thanks for the info!
 
Always fun to be humbled and realize I have no idea what y’all are even saying lol
As with everything, it's a lot of random acronyms and terms that are less different than they seem.

Eg I have no idea what N20 means, but it's a small motor I found. DC motor, that's geared, probably self explanatory.

DRV... is a model of a DC motor, speed controller. Part of it connects to the main DC power (eg 24V) and passes that through to the motor. Part of it connects to a different controller, which you'd write a little program for. That lets you tell the speed controller "go faster, go slower".

PWM means "send pulses of electric", such as a pulse of 24V for a couple milliseconds, then turn off for a couple milliseconds, then turn back on ... It's basically turning the motor on and then off, like you're pulsing a gas pedal in a car. The longer it's on (longer the pedal is pushed down), the faster the motor can go.

Finally, TPU basically means rubber. The motor is loud when connected to something hard, because the noise transfers. I'm hoping if I instead print it out of rubber it'll make it quiet.

Definitely takes a lot of incremental learning to understand all of it, but each little piece is pretty simple. In like 2 years instead you'll just ask ChatGPT, "make me an alk sensor" and won't have to remember any of the terms :)
 
As with everything, it's a lot of random acronyms and terms that are less different than they seem.

Eg I have no idea what N20 means, but it's a small motor I found. DC motor, that's geared, probably self explanatory.

DRV... is a model of a DC motor, speed controller. Part of it connects to the main DC power (eg 24V) and passes that through to the motor. Part of it connects to a different controller, which you'd write a little program for. That lets you tell the speed controller "go faster, go slower".

PWM means "send pulses of electric", such as a pulse of 24V for a couple milliseconds, then turn off for a couple milliseconds, then turn back on ... It's basically turning the motor on and then off, like you're pulsing a gas pedal in a car. The longer it's on (longer the pedal is pushed down), the faster the motor can go.

Finally, TPU basically means rubber. The motor is loud when connected to something hard, because the noise transfers. I'm hoping if I instead print it out of rubber it'll make it quiet.

Definitely takes a lot of incremental learning to understand all of it, but each little piece is pretty simple. In like 2 years instead you'll just ask ChatGPT, "make me an alk sensor" and won't have to remember any of the terms :)
Hopefully it can print it out for me too
 
Great ideas, thanks!

Regarding the stirrer stopping and then magnets, I think I'm trying to run the motors too slowly. I think it stalls even without the magnets, but I haven't tried recently. Moving that magnets further away does seem smart.

I ended up buying some geared dc motors. N20 is what they were labeled. I don't know what that means, but they're very small and have metal gears. The 600rpm ones seem to run at about the right speed to produce a good stir and the gearing means it can run at higher speed
and therefore higher torque and doesn't stall.

The downside is it's loud, at least when mounted the way I have it. I might try printing the mount in TPU to see if it'd be quieter.

The smarter driver is also a good idea. I imagine I could find a free pin somewhere to control it.

Thanks for the info!
N20 motors are good but as you said, quite loud. I would try with a dedicated dc motor driver with your existing motor first.

Another thing to keep in mind is that of you spin the stirrer too fast, the centrifugal force coupled with the fluid viscosity literally flings the stirrer bar towards the edge of your container.
So you will def need some sort of speed control.
 
@richiev any updates? I would really like to build one or two of these but I wasn't sure where things stood. I use reef-pi for all my builds and does everything I need it to do except I would love to be able to test alk. Just thought I would ask and see where things were at the moment and if you have any build guides with material needed etc...

Thanks
 
I have it working and built out, but there's something awry where the numbers drift more than I'd expect. I haven't had time recently to debug it, and my tank has been growing very very well so I haven't been inclined to care.

I will give it another debugging session soon though. I just need to remix some HCL and recalibrate.
 
I have it working and built out, but there's something awry where the numbers drift more than I'd expect. I haven't had time recently to debug it, and my tank has been growing very very well so I haven't been inclined to care.

I will give it another debugging session soon though. I just need to remix some HCL and recalibrate.
Thanks for the reply, just wanted to see where things stood, would like to build one if you can get things working and they are semi reliable. :)
 
I got a new 3d printer and it's blown my mind how much easier it is to do prints now. My previous ones always had janky dimensions or print issues, but now I can print and things just... work.

Because of that, and to get better water protection, I've done a revamping of the Buff's case. Now with bigger touch screen.

PXL_20231011_071309533.PORTRAIT.jpg


Going to recalibrate this one and move it officially, permanently, to my main display. Not pictured is the mixing vessel setup. Also not pictured is the circuit board mounts on the case. No one will care at all about that, but for me it's amazing to be able to screw the circuits into something I designed and printed and have it all fit together. The future is cool.
 
I got a new 3d printer and it's blown my mind how much easier it is to do prints now. My previous ones always had janky dimensions or print issues, but now I can print and things just... work.

Because of that, and to get better water protection, I've done a revamping of the Buff's case. Now with bigger touch screen.

View attachment 50055

Going to recalibrate this one and move it officially, permanently, to my main display. Not pictured is the mixing vessel setup. Also not pictured is the circuit board mounts on the case. No one will care at all about that, but for me it's amazing to be able to screw the circuits into something I designed and printed and have it all fit together. The future is cool.
I'm still interested in doing this if you ever get it to a point where you think its accurate over the long term. I have multiple reef-pi instances and incorporating this doesnt look difficult, would like to give it a go when you think its ready. :)
 
Got a Bambu P1S for my birthday. So far so good, outside of it almost electrocuting my children because the frame has 84V AC leaking into it and Bambu says that's not a problem.
check for ground wires, maybe it was not properly connected. I have two of those and a x1c, excellent choice of printer that you will never have to deal with bed leveling and nozzle leveling ever again.
 
check for ground wires, maybe it was not properly connected. I have two of those and a x1c, excellent choice of printer that you will never have to deal with bed leveling and nozzle leveling ever again.
The indirect issue was the outlet wasn't properly grounded. However even with that being true, I shouldn't be able to measure 84V of electric on the unit's frame. There's obviously a short somewhere, and bambu doesn't seem to care. Rather frustrating, though almost everything else about it has been great.
 
check for ground wires, maybe it was not properly connected. I have two of those and a x1c, excellent choice of printer that you will never have to deal with bed leveling and nozzle leveling ever again.
Ugh, two of the fun ones gone, that's awesome. I ran a gigabot and that thing was a PITA to run. So much wasted material on bad runs.
 
Thread hijacking my own thread, this print was one of the first things I did. I thought it looked cool, kicked it off before I went to bed, expected to wake up to a mess but it was perfect and amazing

PXL_20230911_143615700.jpg

Zero manual calibration. Used some random rainbow PLA filament I had on hand (probably Sunlu or reality). Only special thing I did was I usually put filament through my filament dryer once before using it, so I probably did that on this roll awhile ago.
 
Just bumping to see if there are any updates or if you want to see if someone can repeat what you have done...:) Really hoping this works and is an inexpensive alternative to the other stuff out there, willing to give it a try when you think its ready...
 
I stopped using this for awhile because I messed up my device and didn't have time to set everything up again (sump + electronics dunking incident).

Before I went on a 1 month vacation I set everything up again, and shockingly it's working fantastic. I need to retest myself, but the numbers I was getting while I was gone were very close to the numbers my neighbor pulled with my Hanna 2 or 3 times while I was away (I'm very lucky to have a helpful neighbor). I'm going to finally setup a second one of these on my main display.

It's now very easy to build one. I know where to order all the parts, and the setup is straightforward if you know how to crimp wires. pH probe calibration is the most annoying part, but I think I overly complicate that by trying to be too precise. It's mostly automated now, I just need to tune it some.

Also I realized right before I left that with this equipment I can also create a fully automated water change system. I'm probably going to set that up next. Same exact components, but I'll have the drain go to a bucket, the fill pull from a saltwater reservoir, and have one head leftover I can use for dosing.
 
Back
Top