Forum Software Ferduino code A few questions

A few questions

Post Number:#1 Post Fri Nov 06, 2015 6:21 am
Posts: 32
Topics: 13
Images: 3
Solve rating: 0
Joined: Wed Oct 01, 2014 3:53 pm
Topics: 13
Age: 35
Gender: None specified
National Flag:
Great Britain
Hello Fernando

I am making a simple easy to produce single sided PCB board for laying out all parts.

Board will use single sided traces with 2.54" SIP headers to plug all modules into, MEGA2560, atlas scientific stamps, RTC, RFM12B etc..

Board will be finalised on the second side with jumper wires.

All boards will have SIP sockets removed, and will be replaced with SIP pin headers, facing down.

If any unit fails, they can be easilly replaced with a new item.

First I need to confirm some instructions, because, making PCB will be pointless until I can confirm these queries.

My First Question:

In Your code on github:

bomba1Pin = quarantine OUT pump - Bomba que tira água da quarentena / translate: Pump that draws water from quarantine.
bomba2Pin = saltwater from sump OUT pump - Bomba que tira água do sump / translate: Pump that draws water from the sump.
bomb3Pin = water in PUMP- Bomba que coloca água no sump / translate: Pump that puts water in the sump

Redtop/willies code on github:
bomba1Pin = Saltwater from reservoir IN pump
bomba2Pin = saltwater from sump OUT pump
bomba3Pin = "Pump that draws water from the reservoir to put in the sump."

here there is no quarantine OUT pump but two saltwater pumps.
I think this is incorrect. I do not think he changed the code either, so in this case, when quarantine routine happens, pumping setup would be incorrect.

Things are more complicated when, on reefcentral, redtop/willi posted this picture

and Fernando, here you say after this post, perfect explenation, which works for your version, but does not work with his according to comments.
So, one says quarantine pump, and has no saltwater pump, one says saltwater, with no quarantine pump.

I think, this is the correct design, can you please confirm with your expert knowledge ;)

bomba1Pin = quarantine OUT pump
bomba2Pin = old saltwater OUT pump to quarantine
bomba3Pin = new saltwater IN pump to sump

With RO IN solenoid to sump, connected to a relay on PCF8575 channel P5, arduino pin 85, for automatic top-off

Can you confirm this is the true design with your code.

Also, in the waterchange picture above, and according to comments in both versions, there is only one float switch in the quarantine tank for LOW level, in this situation, this only protects livestock and pump burning out. There is no top level control, so must aquarium and float position and amounts need to be balanced/corrected for this to work?

I see no other way make certain quarantine tank does not overflow, only setting the quarantine float switch to match the amount of water removed from the sump..

My Third Question:
ds1307RTC works fine on sda/scl pins 20/21

We can use either 18/19/20/21 for RTC and PCF8575,

Can we not use both on same pins 20/21 for both modules, leaving 18/19 free? As it is I2C bus after all?

I only ask, as I can not test yet. PCF8575 is in post, did you experience conflicts in hardware or code, what is the reason for separate pins?

I really need pin 18/19 for i2c connection to Uno, but wish to use PCF8575 also.

Our fourth question:

Can you tell me for buzzer on pin0, Do I supply 5v to buzzer and code pulls pin0 LOW when sounding?

Finally, I am curious about your system, do you run your RO unit directly into sump with just solenoid yes?

I think this is all I need to understand for now.

Thank you for any help you can give me. I really appriciate your time.

Best regards.


Post Number:#2 Post Fri Nov 06, 2015 12:49 pm
Posts: 1671
Topics: 38
Images: 285
Solve rating: 228
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 36
Location: São Paulo
Gender: Male
National Flag:


The explaination in Reefcentral is correct but the comments on code are bad.

This translation makes sense for me:

bomba1Pin = Pump that draws water from quarantine to drain.
bomba2Pin = Pump that draws water from sump to quarantine.
bomb3Pin =  Pump that puts water from saltwater container in the sump.

Here the schematic:


With RO IN solenoid to sump, connected to a relay on PCF8575 channel P5, arduino pin 85, for automatic top-off

It's right, the pump or solenoid for freshwater is activated by "solenoide1Pin". 85 is a random number adjust it according to your circuit.

To use I2C bus for PCF and RTC is needed change the code to use other library. Henning's library do not allows 2 devices on bus.

You can't connect PCF to pins 18 and 19 should be 20 and 21.

The circuit for buzzer should be like this:


The pin 0 sends 5V to activate the transistor.

The solenoid is in serie with a float valve. It's redundancy.

Best regards.
Please do not PM me for support unless it is absolutely necessary.

I'll not write custom function to nobody unless you can pay for my job.

Return to Ferduino code

Who is online

Users viewing this topic: No registered users and 1 guest