Not sure why I never linked to this video... it does a pretty good job of explaining the basic idea.
Automate the Reagent (take a sample, put a drop of stuff in, shake, look at the color) testing of water for Aquaponics, Ponds, Aquariums.
Not sure why I never linked to this video... it does a pretty good job of explaining the basic idea.
Including to ensure every single thing I have on this is shared. Just a very basic framework for running the device. E.g. it does all the IO necessary via the Arduino UNO and slightly modified BOB PCB from MassMind.org. It needs to be modified to read a colorimeter and send results back to the PC.
ino - 5.47 kB - 09/05/2018 at 16:16
Haven't touched this in a while... honestly, I think it's because I had a really bad experience at an event where I was showing it (as well as doing a workshop) where the organizers had a rock band inside the worst building for sound reflection ever... Our ears were ringing and that means hearing loss. The lead guy was nowhere to be found and none of the people he left in charge was willing or able to pull the plug on them or turn them down. And no amount of screaming, yelling, or trying to unplug them physically would stop it. They played the full set at full volume and I had to pack up and leave. Kids in there were injured, but no one cares about hearing so forget about reporting it or owning up. When I tried to express my shock and outrage after the event, I was censured (probably appropriate, I posted publically when I could have done it privately) and banned from future events (possibly appropriate, sad) and my friends, who I was NOT exhibiting with, were also threatened with a ban (VERY inappropriate). That seems to have lifted as he cooled off. So my upset and hurt feelings over that transferred to this project and have made me want to leave it alone. That sort of thing ever happen to you? I'm ready now to get back into it.
WHERE WAS I?
So the injector is working fine, I used an LM317 with resistors to give 6 volts for accurate power supply and max strength to the servo. It /seems/ to be very consistent in it's movements but I'm not sure it will be accurate enough.
If I were starting again on this project (and I'm sure I will end up doing so after I find out all the things I've done wrong in testing) then I would use a stepper with two shafts (either end) and the top would run the injector while the bottom shaft runs the wiper / stirrer. Just crashing forward for now.
I need to get my butt in gear on the colorimeter and then get it hooked up to water and see what's wrong / how badly it works so I can take notes, document, then scrap the current version and start over.
Colorimeters don't seem that hard, I just need to wire up the circuit and add some code to the Arduino to run my light source and read the frequency back from the
I have some TLS235R and TLS237's and I'm following the basic instructions from
but they use TLS128's... not sure why I didn't get those... must have been a reason. Just need to make up a header to plug the sensor into and then wire that cable to the Arduino... then I'll probably just tape the sensor to the outside of the reaction chamber.
I have an Adafruit Neopixel or two which I'll probably start with, but I may need a more accurate light source... we will see. LED's are cheap. I'm hoping I can measure all the colors with the one Neopixel instead of having to wire up multiple LED's. Again, cable, tape to chamber.
Should probably seal the cables with silicone / heat shrink because they will almost certainly get wet.
A client wants to measure multiple frequencies for a separate project so I'll probably start with:
and see if it works. Should be well in the frequency range at less than 10KHz.
If anyone has experience with any of this... or even just read it... please let me know.
Finally figured out a way to mount the servo to the syringe... I used solid core wire wrapped around the syringe and the servo. :yike: "Get'r done"
And I built a link from the servo horn to the plunger out of a paperclip. The link is actually pretty good, but the plunger bends badly up and down. I may need to move to a more expensive glass syringe just to avoid the bending. e.g.
I'd post pictures but... I have some pride left. ,o)
And then I went to wire the servo up and realized I don't have any source of 6 volt power. :facepalm:
I'm wondering if the servo will fry if I connect it to the 12 volt supply I'm using for the stepper motor and solenoid. No specs on the Adafruit site for max voltage.
I could also use the LM317 regulator option on my BOB PCB to produce 6Vs with a 240 and a 910 ohm resistor set in R6/R7 then cut the trace between C5 and VCC on the Arduino connector to isolate the supply, and pick off the resulting 6 volts at R5 (top pad) but 1. I'd love to avoid populating all that (and C4-6... C4 is huge) and 2. I'm not sure how much current that servo draws. Dropping 6 volts (from 12 to 6) the LM317 should be good up to an amp or so ( I think ) so is that enough? Enquiring minds...
So I've posted a request for more data on the servo at:
Hopefully will get some guidance soon... I'm supposed to show this thing working at STEAM Fest on the 5th:
We have an injector pump! (mostly) I'm just looking for a better (easier to move, smaller) syringe with a luer lock output. And I got the correct parts due to sheer dumb luck, and then found out what they are after the fact. LOL.
Turns out these do all the valving work we need. We don't need two valves and a T, the one part does everything.
Part No.: 79004
Qosina Medical HPLC Dual Check Valve, 3 PSI CP, Male Luer Lock with Swivel Nut Outlet Port, Female Luer Lock Inlet Port and Female Luer Lock Control Port
Cost should be less than a dollar each, but the trick is finding a source that will sell in low quantities. You can easily find a case of several hundred, but never 1. I got lucky with an eBay listing, which wasn't for this, but this is what was delivered. Can you believe it? The universe loves me. LOL.
The funniest part is that the add that I purchased from popped up while I was composing an email to a friend about how little luck I was having in finding the needed part... right there on the screen... as I was composing the email... (!!!) Can you believe that? So I ordered it, didn't get the part they advertised (which I thought I needed) but did send me /this/ part, which is exactly what I actually needed!
The injection tip is an 18 gauge 90' curved blunt tip for Luer lock syringes. Those are more commonly available. Again, I found these on eBay.
Now I just need to amend the code to run the servo, and mount it and the wire to connect it to the syringe.
It's STUNNINGLY hard to find medical supplies at other than insane volumes. For example:
$216... for 100 of them...
I need 2. So my cost would be under $5... if I could buy them in singles. I looked for HOURS... actually probably DAYS when you put all the hours together. And I finally found:
which are now on the way. I have a line on a syringe that moves easily and some right angle blunt needles from a new friend at a local hackerspace:
So that just leaves a female luer T-Fitting to put it all together. I'd forgotten that in the last update. I found these:
but I'll be damned if I can buy them. They apparently only sell to resellers.
Folks, I need help. Does anyone have access to, or know how to access, basic medical supplies in small quantities? Everything I can find is a box of 20 when I need ONE! If I buy a huge box of each part, the price gets crazy fast, and without being able to play with the parts, I don't know if what I order will actually work.
Specifically, I'm building the injector pump for the reagent, and I've found designs that look pretty good using a servo to open and close a syringe, which would be hooked to a reservoir with two one way valves. The medical community calls them "back flow preventers" and they connect together with something call "luer loks". Also, there are curved hypodermic needles that would be perfect to deliver the reagent to the reaction chamber.
Here is a link to a very basic version (no reservoir or valves or needle) of the injector design I've selected:
So by skipping out on some work I was supposed to do and continuing to ignore a client who really needs me, I was able to find the time and energy to make a little progress.
1. Sample Intake Valve. The BOB board I'm using has space for a relay driver (originally for spindle power) which is setup in such a way that it can use Vcc (for a little 5v relay) or use an external power source for a larger relay or, in this case, the Adafruit water solenoid valve. The circuit can use different power sources, because it's designed to just ground one pin, rather than connect a pin to power. So one terminal, J7 is NOT used, because it's just the Vcc power supply from the board. The other terminal, J8 pulls one lead of the coil low via Q1 and the other coil lead connects to +12. Back EMF diode is bodged in between the connections.
Control is via A5 on the Arduino which is strapped over to the normal input to the driver circuit via a 2K2 resistor. I initially (accidentally) had it programmed to stay on all the time and close only when it should take a sample, and it got a bit toasty until I figured out it was working backwards! Seems to run cool now.
2. I've added an external 12 VDC wall wart power supply feeding into the Arduino. That was /really/ difficult: I plugged it in. Then soldered on a terminal block to the BOB where it was designed to take unregulated power and used that connect the motor power for the stepper motor driver. The BOB connects to both the regulated and unregulated supplies on the Arduino, so no problems there.
3. Most of the time today was actually spent figuring out how to mechanically mount the stepper driver and the Arduino / BOB control board. I drilled and tapped into the heat sink for the THB6064AH stepper driver and lined that up with one of the holes I drilled in the stepper motor mounting bracket. A bit of rubber to isolate the PCB allowed me to just bolt the corner of the BOB to the bracket as well. Very bodge.
The stepper driver takes up a lot of space... again, that driver is like using a nuclear reactor to fry eggs for this little NEMA 17 motor, but it's what I have available. I have the current turned all the way down on the driver and the motor is still getting a bit toasty. But it's really nice and smooth and quiet, which is nice. You should use something much smaller. Like a Linistepper.com LOL.
Here is a video of it running.
And here is the back:
you can see the TIP122 driver for the valve hanging upside down on the back of the BOB. Colored wires are stepper motor leads. Ribbon cable is the PMinMO standard connector from the BOB to the THB6064AH driver board. White water valve on the left, and the flow rate sensor in black on the right. Reaction chamber at the bottom.
Still gobs to do. Figuring out the reagent injection system is next... anyone have experience with syringes, luer locks, and one way valves?
So I took one of my BOB PCBs (normally used as a Break Out Board for Stepper Motor Drivers in PC driven CNC conversions) and made use of one of it's many alternate, err... uses. By adding two jumpers and some pin headers, it becomes an Arduino Shield with an LCD display, some switches, a cable for the stepper motor driver, and a relay driver for the water valve. For now, I'm using one of the THB6064AH drivers (which is sort of like using a nuclear reactor to fry eggs with this little NEMA 17 motor) but it will probably get replaced with some other small driver.
The Arduino is programmed to display message "faking" the steps I think the robot will take, although the only thing it's actually doing at this point is rotating the wiper. There are some issues with the wiper getting stuck, but that's the sort of thing you expect to find and work out.
Still a long todo list: Need to mount the driver and control board somewhere. Add the components to the BOB PCB for the water valve. Hook up the flow rate sensor, light source and sensor.
Made a new mounting plate that DOES allow a NEMA 17 motor in a NEMA 23 mount through the magical powers of /rotation/. ,o)
Here's a detail shot showing the motor shaft coupler to the stirrer/wiper padel. It's a section of aquarium hose... Hope that will be enough.
So it turns out that I designed the parts for this project with a NEMA 23 mounting layout. The holes in the chamber, top and bottom match NEMA 23 mounts. Not sure why I did that, other than that I knew I had a NEMA 23 motor available and I might have been worried about how small the stirrer would be if it was done for a NEMA 17. And there might not be room for the water fittings.
Then I must have started thinking that using a NEMA 23 motor for this project was like using a nuclear reactor to fy eggs; you just don't need that much power. So I spec'd a NEMA 17 motor on the parts list.
And got one.
And tried to fit it to the holes.
And noticed that that was the wrong size, but said "no worries, I'll just make an adapter plate".
And I did. Guess what? There isn't room between NEMA 17 holes and NEMA 23 holes for little things like nuts.
Well... at least not when you put the NEMA 17 motor square with the NEMA 23 holes. But now I've "got a plan": Ima make /another/ adapter plate, but this time, I'll rotate the NEMA 17 motor holes 45' from the NEMA 23 holes.
That'll do 'er, right? Solving problems with geometery.
So why not just use the NEMA 23 motor? 'cause in the mean time, I found another use for it... This is why I need to start, stay with, and finish projects in a timely manner.
Got the stirrer assembled (just with wire holding it together for now... need some tiny M2 bolts and nuts). Drive shaft coupled (with some plastic tubing). The chamber is assembled, with an extra layer of rubber at the top to make it high enough for the stirrer to fit (1/4" plexi is not 1/4" so the stirrer needs to be a bit less high on the next version). And the outlet fitting is ground down to 1/2" (1/2" hose couplings are not 1/2" so the holes need to be a bit bigger in the next version. Need a motor mount plate and then the mechanicals will be done, and we can move on to the electronics.
You can see the rubber wiper of the stirrer against the inside of the chamber. I'm not sure the rubber sheet I used will last... the material seems to be rubbing away like an eraser...
CUT ALL THE SHEETS:
Made by laser cutting 1/4 inch plexi sheets and stacking them to form the bottom plate, reaction chamber (the center clear area) and the top plate. Those are the .dxf files on Thingiverse. In the picture/video, the top and bottom are shown as dark, but that would probably be accomplished with paint or something else on top and bottom of the otherwise clear stock.
The bottom plate simply has a hole drilled part way through for the stirrer/cleaner shaft to sit in. A single ball from a bearing would be dropped in the hole to reduce friction and extend the life of the "bearing". Initially, this plate could be plex, but eventually should be something more durable.
The center (clear) area is a square block of plex with a large circular hole in the middle where the sample will be held.
A stirrer / cleaner made from metal with a vertical shaft turns in this space to both stir the sample and reagent and to clean the sides of the chamber to ensure consistent optical performance over time. The shaft exits the top plate and connects to a small stepper or gear motor which is not shown. If the recommended injector is used, the motor of the injector could be used to turn the stirrer / cleaner, but this is not necessary to the design.
The black top plate has holes for the inlet of water from the valve (not pictured) and exit of the prior sample (to drain). Not shown is the small hole for the inlet of the reagent from the injector pump.
INJECT! INJECT! INJECT!
Metered injection of liquids is a solved problem. See:
Drill a hole in the top plate to allow the injection of reagent and attach the lines for the inlet of sample water, outlet of sampled water, and injected reagent. Figure out how all that is going to fit with the shaft from the stepper motor, and how the motor will be mounted. Curse, throw everything away, and redesign.
It turns out the one way valve specified in the parts list does most everything. You attach a reservoir to the top, a tiny syringe to one side, and a blunt 90' needle to the other. Then a servo can move the syringe plunger to inject small amounts of reagent. With a very small, easy to move, syringe, the servo can be cycled several times to inject precise amounts of reagent.
GET IT TOGETHER
Assemble the stirrer, bottom plate, chamber, top plate, all inlets and outlets, the stepper shaft drive, and stepper. Add a stepper motor driver :cough: probably one of those little Pololu drivers will be fine, and an Arduino. Oh, and you need a driver for the inlet valve. Sure would be nice to have an interface board. :cough: The standard RAMPS would be overkill... An obvious choice would be the Adafruit motor shield which should drive a valve as well as it does a motor:
[this comment has been deleted]