ReefVolt Dual Doser

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Current status:

- Prototype built
- Firmware complete
- ReefPi integration ongoing
IMG_9633.jpg




---


You may remember me from past threads, including the omni-thread talking about the Reef-Pi Pico (a veritable collectable now!), and follow on with the USB 8 outlet power strip (delayed for all eternity on some critical semiconductors, though I'm ready to simplify it out of spite), the ReefVolt MiniCore USB controller (pH!, 1wire! on USB!)

On to the next rapid developed product, the dual doser pump! Below is a rough mechanical mockup as parts are still landing (cases, pumps), just so you can follow along a rapid concept to product story. I have fun writing some of these little journals, what can I say.

concept1.jpg


Featuring a pair of inexpensive DC brushed motor peristaltic pumps, this thing will be built from a pile of parts I already have, which ensures it can be finished this side of 2022.

On to the details:

- 12V powered!
- USB connection to a Raspberry Pi! Need to add more? Out of USB ports? Just add a USB hub.
- Controllable with Reef-Pi! (File driver at the moment)
- PWM doser control!
- Inputs for level switches!
- All in a swanky off the shelf box, CNC machined / laser cut

Pumps used are the inexpensive Kamoer NKP series, making it very budget friendly.

nkp1.jpg


I've also spent a lot of time with a prior prototype I didn't share too much on, which is a reliable analog level sensor based on a low pressure sensor. These parts were unobtanium for much of the pandemic, but now I happen to be sitting on a whole reel of MPXV7002DP and by darn I'm going to put them in something. In addition to giving mechanical on/off sensing via float switches (a great backstop), adding an analog sensor gets you about 8" of level sensing (with some uncertainty due to temperature changes over time). Useful for building a batch auto water changer, or checking if you're low on 2-part in your doser, or even tracking how much you've used.

1642053319095.png


More on the controller PCB soon...
 
Last edited:

SPR1968

No, it wasn’t expensive dear....
View Badges
Joined
Feb 21, 2017
Messages
20,039
Reaction score
124,683
Location
Nottinghamshire England
Rating - 0%
0   0   0
Great review and thanks for taking the time
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Looks awesome. I have been using the kamoer dc motor based peristaltic pump for almost an year now, they are solid,
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Prototype progress on the case. In low volumes, the setup time on the laser cutter is very low, even though the fit and finish is not great (and it smells like burrned plastic for about a week).

I first modeled and made this alignment fixture for the case, which holds the side to the laser in a flat plane (injection molded plastics all must have a draft angle to be able to release from the mold, which is about 3 degrees here). The "anti-ramp" also gives an easy point to put at 0,0.




IMG_9628.jpg


A minute later, a small internal fire later (I had a bit too much laser dwell time so everything got extra hot):

IMG_9629.jpg


Evidence of said fire, at least the plastic is correct in its flame rating and the fire did self extinguish...

IMG_9631.jpg




End result?

Four M3 screws and nuts later (installing the nuts in the upper top edges of the case is a nightmare, need a better solution or some sort of mini-wrench)

IMG_9632.jpg


IMG_9634.jpg


Yes, one of the nuts is backwards, as two locking nuts with flanges can't fit in the available space, but its all I had on hand.

Next up: control board
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Prototype PCB toasted up


dual_doser.jpg


Very simple, very straight forward, minimal parts. This doesn't have the pressure sensor mounted on it.

The firmware space for this little micro is only 16KiB (ATSAMD11), and it needs a bootloader, but the good thing is its easy to get a barebones USB stack running for updates with only 1KiB of flash. Very basic straight forward C for a very boring straight forward set of peripherals:


As a prototype teaser, I also made up a minimal USB->PWM adapter based on the same chip, the uPWM:

image1.jpeg

image0.jpeg
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Did some assembly and firmware work today.

First off, if you use something not shiny and reflective like aluminum tape, and instead use an old flower pot to control the laser bleeding through layers, everything is much cleaner. If you do a few, the flower pot does actually get quite warm, which is something.



IMG_9711.jpg



With some requisite spacers, the PCB fits nicely:

IMG_9712.jpg

IMG_9714.jpg


I'm going to try to get a label made up for the unit to.. dress it up a bit. Probably just try to use StickerMule for something quick.

In firmware news, I have:

- USB DFU working, including bootloader (program from the command line). Holding the button down while plugging in will put the device in update mode. It even works with WebDFU (though reports an error at the end of the transfer, which is a quirk with the dfu-util routines). https://devanlai.github.io/webdfu/dfu-util/

1643596933662.png


- USB in application mode working
- Pump control working, but not yet plumbed to a USB transfer.

Its an "extremely simple product" :tm: so lots of progress in little time.
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Good news!

Made a bunch of progress in a few hours the last two nights, and reached a "basic firmware complete" point.

The bootloader (so you can reprogram just over USB) is built and customized as before, and has a few small tweaks including allowing jumping into the bootloader from the application. Its a very tight fit, as the entire thing is 1KiB big, and adding even an LED turn on command exceeds the size by 4 bytes, compiler dependent.

Application code is 90% complete (didn't implement PWM/speed control, hardware has no reverse capability). Its now based on TinyUSB, as the original USB micro-framework which was adapted from the bootloader wasn't rock solid under all sorts of different conditions, whereas TinyUSB is solid (though 2x the size).

What works:
- USB connection to the computer
- Commanding either/both pumps to run
- Reading of the float switches
- Error codes and LEDs if the 12V power isn't plugged in
- Rear button can be used to run either pump 1 or 2 for 5 seconds (pump priming mode)
- Failsafe: The pump run signal works on a timeout, when the computer/Pi tells the pump to run, it will only run for 5s. The run signal needs to be sent continuously.

What's left to implement:
- A failsafe cutout configurable option (stored in flash), so the float switches can be used to disable a pump without intervention. Useful for an ATO function.
- Pump speed control via PWM

Other niceties:
- The build process is automated and runs as a GitHub action. While there aren't unit tests in this code, the build process is at least repeatable.

GitHub is here: https://github.com/blueacro/ba-firmware-dualdoser - it includes two silly Python scripts to send messages to the doser over USB.

What's next:
I ordered stickers for the top and back to dress things up.
I started sketching out the Reef-Pi bridge software (as opposed to native Reef-Pi driver, for now). I want to also host firmware update in the software, but deferring that for a little later
Documentation
Ship one to Ranjib :)
Determine pricing and put up a place to buy it (sub $99 for sure)
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
Built a small batch of boards

initial_build.jpg


I'm running a hybrid setup - some components placed by the pick and place, and some components placed by hand on the same paste setup.
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
One small improvement: conformal coating.
I’ve decided to experiment with conformally coating the dualdoser PCBs after assembly with a rapid drying coating. Why? Improve moisture resistance to reduce board corrosion. It’s not an expensive process and with a fast drying coat takes minutes to do.

63092255-EB75-406C-89F0-77B571E9078B.jpeg

You can see the coating in it’s dried state on the board covering the major components.
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0
My attempt to get professional labels done up in time has hit a snag…

6219008E-8D61-4EFD-A6A5-B9943FAE7872.jpeg

7E9F74EA-8486-41BA-904F-B2D0B3C86B62.jpeg

Something tells me the shipment which keeps rescheduling its self for the next day just isn’t going to show up…
 
OP
OP
theatrus

theatrus

Valuable Member
View Badges
Joined
Mar 26, 2016
Messages
1,951
Reaction score
3,353
Location
Sacramento, CA area
Rating - 0%
0   0   0

Being sticky and staying connected: Have you used any reef-safe glue?

  • I have used reef safe glue.

    Votes: 121 88.3%
  • I haven’t used reef safe glue, but plan to in the future.

    Votes: 8 5.8%
  • I have no interest in using reef safe glue.

    Votes: 5 3.6%
  • Other.

    Votes: 3 2.2%
Back
Top