reef-pi :: An opensource reef tank controller based on Raspberry Pi.

I ended up removing the pot from the equation. Direct connect from the reef pi to the pen input on the lights.

One of the lights didn't play nicely with the pots in the mix.
Thanks for letting me know. I assume you just unplugged JST from dimmer and can wire to it? Just lost that nice carrier board? Seemed too good to be true. :)
 
It is possible to rig up an Arduino board to read the doser signal from reef-pi and then run stepper motor drivers. This is what I did on my tank for dosing and AWC with DIY peristaltic pumps. You can read about it on my build thread.
Yeah you can do that, plug the doser signal into an analog pin on Arduino and have code monitor it for action.
 
Yeah you can do that, plug the doser signal into an analog pin on Arduino and have code monitor it for action.
How would it work with an analog pin? I have the Arduino reading the duty cycle of the PWM signal from the reef pi with a digital pin. Every second or so, it measures the length of the duty cycle by averaging a large number of samples from pulseIn(), to filter out noise. A bit elaborate, though it's been pretty reliable. Would be nice to have a simpler solution, though!
 
How would it work with an analog pin? I have the Arduino reading the duty cycle of the PWM signal from the reef pi with a digital pin. Every second or so, it measures the length of the duty cycle by averaging a large number of samples from pulseIn(), to filter out noise. A bit elaborate, though it's been pretty reliable. Would be nice to have a simpler solution, though!
I'm assuming you have the Arduino able to run the dosing pumps so all you need to know is when to start/stop the pump. If you connect PWM signal to an analog pin you can read the voltage from the PWM pin and use that to trigger things. When the PWM is off you'll have 0v and on you'll have 3.3v-5v depending on your setup. If you map out the voltage in Arduino code you can use the speed control feature in reef-pi for whatever but this is all you need to for start/stop. If you have the timing setup in Arduino code just add a flag to the start dosing pump section so it only runs once until you reset flag in Arduino.

C++:
int analogPin = A0;
int analogValue = 0;

void setup() {
}

void loop() {
  analogValue = analogRead(analogPin);

  if (analogValue > 100) {
    // start dosing pump
  }
  else {
    // stop dosing pump 
  } 
}
 
Thanks for letting me know. I assume you just unplugged JST from dimmer and can wire to it? Just lost that nice carrier board? Seemed too good to be true. :)

I did.. but I just butted the jst connectors on my wires together and used some pins I had laying around (ends from large axial resistors) to connect them together. The real question I have is what caused the mosfet to blow in the driver..
 
You probed the GPIO output at every junction till it connects to the relay input, and validated the voltages are as expect (if i recall correctly, it should be around 3.3v at GPIO on). This should help you isolate the problem at circuit vs relay itself.
No but I certainly can.
 
I did.. but I just butted the jst connectors on my wires together and used some pins I had laying around (ends from large axial resistors) to connect them together. The real question I have is what caused the mosfet to blow in the driver..


and I think the mosfet blew again.. or something equally stupid. The wife just texted me and that light has no blues on right now. I'd like to swap out the driver with a meanwell, but I have yet go find one that matches the specs closely enough to make me feel good about doing it.
 
I am running 4.1 and timers work for equipment, but I can't get a macro to run on a timer. Is this a known issue or something particular to me and/or new?
 
Nope. After I removed the pots, I noticed the blue channel on that light wasn't dimming. Tested everything and came down to something in the driver. Had power, ground and pwm signal all the way to the driver.

Traced the pwm pin from the jst on the driver board to something that looked suspiciously like a smoked AO3400 mosfet. Just so happened to have a spare on my desk.

May not be that exact mosfet, but good enough. It's working correctly now.

Well, more like the d@mned thing is off like it should be for this time of night. We'll see tomorrow.. ;-)
Nice :-)
 
Does reef-pi support control for smart switches running Tasmota?
No. There is plan to add a tasmota driver. I have to first get a compatible device first .
 
i mean, we have to do some design & coding work, and follow up testing/validation. The design work will involve at least settling on a common stepper driver (e.g. 8825??) for the standard build, the coding work i.e. HAL integration and any UI(driver??) work, and finally testing it out.
The 8825 is a good standard driver that isnt overly priced. I have 3d printers and used about all the drivers out there. but dont need the fancy stuff that the higher end drives offer like stall protection thats used for sensorless homing. I can breadboard up a demo and even design a pcb for controlling the drives. I just dont know coding. you write code I can design the circuit and test it. I wonder if the pca9685 can be used to output the pulses to control a stepper.
 
a4988 is also reasonably priced. and when the 8825 was new the 4988 was much cheaper. just looked and there is $1-2 difference for a 5 pack. so no reason to go with older tech.
 
I think I know what is happening. Power off the reboot did nothing. Power off, tap the relay with a screw driver and reboot and it functions correctly. That suggests they are sticking due to arcing right? If that is the case what do I do?
replace with quality relay.
 
replace with quality relay.
These are boards with multiple relays and pins ready for the pi. They were cheap but I was following a guide. I am more than willing to get some quality relays, but lack the technical knowledge to know what to get. Can you reccomend some or provide a resource?
 
i mean, we have to do some design & coding work, and follow up testing/validation. The design work will involve at least settling on a common stepper driver (e.g. 8825??) for the standard build, the coding work i.e. HAL integration and any UI(driver??) work, and finally testing it out.
I have been using tmc2209 on my 3D printer and dosing pumps for awhile. They’re a lot quieter than the pololu drivers and support UART, so they’re very easy to configure (eg you can set the motor current programmatically rather than with a potentiometer).
 
These are boards with multiple relays and pins ready for the pi. They were cheap but I was following a guide. I am more than willing to get some quality relays, but lack the technical knowledge to know what to get. Can you reccomend some or provide a resource?
can you send me a pic? and do you know how to solder? it sounds like the relays arc welded. and once it starts it continues. what was the amp rating on the relay? most are 2 amp. also what is the power draw on the item plugged into it?
 
I have been using tmc2209 on my 3D printer and dosing pumps for awhile. They’re a lot quieter than the pololu drivers and support UART, so they’re very easy to configure (eg you can set the motor current programmatically rather than with a potentiometer).
with 4988 or 8825 you can hard wire everything and control the stepper with just a single line pulse. (need a common ground but that wont be an exclusive pin, so not taking up a pin.) so would use 1 pin per doser pump. but wonder if a pca9685 could be used for the pulses to the driver? not to mention that 4988 are $1.60-$180 each and 8825 are $2 each on amazon. might be cheaper on aliexppress but the wait. 2209 are $6 each. and i dont think the noise will be that bad as dosers shouldnt run that much. and most aquariums arent that silent so would cover most of the noise.
 
with 4988 or 8825 you can hard wire everything and control the stepper with just a single line pulse. (need a common ground but that wont be an exclusive pin, so not taking up a pin.) so would use 1 pin per doser pump. but wonder if a pca9685 could be used for the pulses to the driver? not to mention that 4988 are $1.60-$180 each and 8825 are $2 each on amazon. might be cheaper on aliexppress but the wait. 2209 are $6 each. and i dont think the noise will be that bad as dosers shouldnt run that much. and most aquariums arent that silent so would cover most of the noise.
True but with UART its 4 drivers on a 2 pin bus :)
 
True but with UART its 4 drivers on a 2 pin bus :)
does uart control steps and everything? I just thought it controlled the settings. but still used the old standards for enable direction and and step? if 2 pins control everything then that would be the way to go. is 4 drivers a hard limit or just what youre using? most printers use 4 drivers while some use 5. (dual z in my case not wired in series or parralle had 6 drivers so used 5 on a fysec f6) Ive never looked into how printer boards work just compiled the marlin. but have looked into controling steppers, and looked at what the pins do on older drivers. also what would be easier to code? 1 wire per dosing pump or serial bus control? also is 2209 uart? or spi? i2c? i know 2208 is 1 and 2209 is the other. think spi and i2c is the same
 
Last edited:

TOP 10 Trending Threads

Back
Top
Home
Post thread…
Market
What's new