Can I use INPUT_PULLUP to get rid of floating pin two arduinos connected?

Hi

I am building a home brewery setup. I'm basing it off BruControl which is an awesome processor. It runs off an Arduino Mega and features an interface in Windows which is able to control the different outputs etc.

I have built(a few months back actually) a 8 channel relay connector box which I used prior to converting. BruControl is great, but it has a limitation where speaking to another Arduino is hard through I2C etc. And the control box is a simple 8 channel relay controlled with an Arduino Nano. It will be placed a bit to far away to utilize I2C or other serial connections. Besides, I am not able to use that in the BruControl interface anyway - so the only option I have is to either run the 8 connections from a digital output on the Mega to 8 digital inputs in the Arduino Nano and have them "forward" it to the 8 connections on the relay - or to go directly to the relay, which means I'll have to add another 5V wire.

Now I tried the first method, since basically it was already integrated and using switches so it was a quick fix to set up and it works. The only problem is - when the BruControl loads or shut downs, the Nano reads floating pins and switches back and forth really quickly - of course.

Wiring is simple - from Arduino ports 34 - 41 a signal is digitally output to the Nanos D2-D9, then a simple check through a for loop check each of the readings and if HIGH, then output to corresponding relay pin.

Could I say -

  1. power the Nano through the 12V, and power the relay with 12V on JD-VCC, and the VCC from the 5V pin on the Nano and just run the wires directly to the relay instead?

  2. Use INPUT_PULLUP to get rid of the floating pins?

  3. Write some sort of script using millis to determine last time the state was changed, and filter out some of the floating?

  4. Debounce it some way? Debouncing it over 3 seconds would create too much of a lag time, tbh....

It will be placed a bit to far away to utilise I2C or other serial connections.

How far?
I2C, although not really designed for it, can be made to work over at least 30m (I know, I have it working). Serial a lot further than that.

The other stuff I suggest you try it.

Ideally power your boards from 5V to the 5V pin, although what you suggest will probably be OK.

And the control box is a simple 8 channel relay controlled with an Arduino Nano.

Which one?

For connections, use a separate supply to gain opto-isolation and remove the JD-VCC jumper. Use a 12V separate supply if you have the 12V version...

Then you'll only need VCC (5V) + 8 IRLED control wires. Could use 10-condutor flat cable (2 x 5V + 8 control) like this ...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.