Project too complicated ?

We are all ‘outside the box’ thinkers, but which side of the box are you looking from ?

I am busy with a swim pool timer project for the local kids club bi-annual gala.
We are not using the costly touch pads, but rather simply push buttons to end each timed event.

The project consists of a web based event management system run on a local PC using xampp as the server.
Swimmers are captured, record times stored in the database, lane allocations and multiple heats scheduled, etc, etc.
The web side is just about completed and busy with testing.

The start is triggered by an Arduino which activates the start siren, tracks the start time millis, as well as uploads data to the PC using ethernet.

Each of the 6 lanes has 2 timer buttons at the finish end.

Question : from the 2 possible options below, which would you consider to be the most reliable :

Both option require the laying of an ethernet cable from one end of the pool to the other. Wireless / RF is not an option at the moment due to cost and availability.

option 1 :

2 Arduinos, 1 at each end of the pool ( distance 45 meters / 140 ft ), both connected to an ethernet router ( PC also connected to router ) , with the ‘starter’ unit telling the ‘finish’ unit the millis ( A ) when the event was started, as well as the millis ( B ) when the data is sent to the ‘finish’ unit ( so the finish unit can receive the data, calculate that the start time was ’ CurrentMillis - ( B - A ) ’ ) and then wait for the input pin for each lane to be pressed ( LOW ) and calculate the actual swim time. Then upload the finished times to the PC over ethernet.

Is this too complicated / complex ?
A mountain out of a mole-hill ?
Using the second Arduino where it is not needed ?
Too many steps making system failure more possible ?

option 2 :

Run 2 lengths of cat5e cable from the finish back to the start, and have only 1 Arduino at the start end, connected to the router to upload data to the PC. Floating Lines in the cat5e cable would need to be pulled HIGH, and the press of each button would Ground the line back to the input pin.

Of the 8 core in each cat5e cable, 2 can be ground, and the other 6 to each of the 6 lane buttons. Running 2 cables means that we have 2 sets of ground lines, and each of the 2 buttons for each lane are connected back to the Arduino on different cables - so if one cable is damaged, we only lose 1 button on each lane, and still have the second button for timing.

My thought is that this option does not require me to run any power to the other end of the pool, as the lines for the buttons are all Ground lines. Sounds safer to me.

If this is the more simple and reliable option, would you :

  1. Use a separate 12VDC power supply ( at the Starter end ) for the Ground signal and return inputs that has to go the 140ft ( and back to the start unit ), and connect the ground signals from the buttons to optocouplers ( to trigger the input pins on the arduino ) ?

  2. What size pull-up resistors should I be looking at on the floating return lines while the button is ‘open’ ?
    Does length of the cable affect this resistor size ?

Any other factors that you can think of that would / could affect the viability of these options ?

Maybe I am looking at the options with blinkers on, so all input greatly appreciated.

The start is triggered by an Arduino which activates the start siren, tracks the start time millis, as well as uploads data to the PC using ethernet.

If the arduino only sounds a siren for start and logs the time and does not need to detect early jumpers off the start line then why not put the arduino at the finish end and maybe just run a cable for the siren to the other end if needed.

Time measurement will be much easier with a single Arduino. It is not that easy to synchronize time between two devices.

…R

Riva:

The start is triggered by an Arduino which activates the start siren, tracks the start time millis, as well as uploads data to the PC using ethernet.

If the arduino only sounds a siren for start and logs the time and does not need to detect early jumpers off the start line then why not put the arduino at the finish end and maybe just run a cable for the siren to the other end if needed.

Thanks Riva

I had considered that, but the mains power is at the start line end of the pool, as is the PC and router. My thinking was the single Arduino at the start end, and only ground carrying cable along the ground to the finish line for the timer buttons. Sounds much safer than having to run power to the arduino at the finish ( either AC Mains or 12VDC ) and then still having to run a network cable all the way back to the router and PC at the start end.

Robin2:
Time measurement will be much easier with a single Arduino. It is not that easy to synchronize time between two devices.

...R

Thanks Robin2

Although the time calculation is not super serious if we lose a fraction of a second while communicating the start time between arduinos, I am concerned about the increased possibility of errors and faults with every additional device and comms line in the system.

Looks like the single Arduino is currently the preferred choice. Any advice on the pull-up resistors and optocouplers ?

run a simple cat cable to the other end with 5V and ground, 6 buttons to each wire.
on the start have the buttons parrallel, it never happens both buttons are on in one lane.
the rest is simple software.

a simple serialprint of lanenumber and time to pc is good.

shooter:
run a simple cat cable to the other end with 5V and ground, 6 buttons to each wire.

Thanks shooter.

Sounds like the same as I was thinking, except I was planning to run the Vcc to the optocouplers, and then only the ground needs to go down the cat5e to the finish end for the buttons to return when pressed / circuit closed.

On that point, would there be any difference in the quality / strength of the Ground signal that has to go from the start, to the finish, and back again ( when a button is pressed ), a round distance ' there and back ' of about 90 meters ( 280 ft ), when selecting a 5V supply compared to a 12V supply.

5V supplies are laying around all over my office as discarded cell phone chargers, etc. The first one I just picked up is 5VDC 0.7A.

The optocouplers ( SFH615A ), if I am reading correctly, have a forward voltage of 1.25V 60mA, so should easily be able to power 12 optocouplers from one of these.

DaveO:
I was planning to run the Vcc to the optocouplers, and then only the ground needs to go down the cat5e to the finish end for the buttons to return when pressed / circuit closed.

I don't understand your need for optocouplers. One side of your switches will be ground, the other side will have a voltage on it, whether you use optocouplers or not.
I understand your need to keep voltages away from the water to avoid shock, but insulation and waterproofing should be all you need for low voltages. Even if you're feeding your Arduino 12V, only 5V max. will appear on the I/O pins.
Thinking outside the box. Garden hose, when used normally, keeps water in. Run your cable through a new length of (dry) hose (use talc to make it slide through easier) to keep water out. Seal the ends of the hose with silicon sealant and keep them out of the water to keep your cable dry.

5V supplies are laying around all over my office as discarded cell phone chargers, etc.

For safety these should be plugged into a ground fault circuit!
Make sure there is high Z between the DC out and the AC in.

Henry_Best:
Thinking outside the box. Garden hose, when used normally, keeps water in. Run your cable through a new length of (dry) hose (use talc to make it slide through easier) to keep water out. Seal the ends of the hose with silicon sealant and keep them out of the water to keep your cable dry.

Herny_Best

Thanks for the idea about the hosepipe. Will also help to stop damage to the cable if someone accidentally stands on it, and will also prevent kinks.

Henry_Best:
I don't understand your need for optocouplers. One side of your switches will be ground, the other side will have a voltage on it, whether you use optocouplers or not.

OK. So the one side of the button / switch will be permanently connected to Ground, and the 'open' side will have a pull-up resistor. My thinking on the optocouplers was to use them to protect the Arduino.

But from your comment, it looks like Ground is Ground, so I can easily use a 5V supply for the optocouplers and the ground to the finish line and back.

Appreciate the input.

DaveO:
OK. So the one side of the button / switch will be permanently connected to Ground, and the ‘open’ side will have a pull-up resistor.

Therefore, the ‘open’ side will be at about 5V when the switch is not pressed.

My thinking on the optocouplers was to use them to protect the Arduino.

Protect it from what?

the cable does not need any isolation as it is only 5 volts.
the extra 5 volts can be used to operate optocouplerleds as i have no idea how the switches work. if microswitch do them to gnd, the pullup inside the arduino will be enough.
the resistance of the cable is low enough (max 10 ohms) when switch is open the voltage is 5 and when closed it will be about 0.5 volt max. so the arduino will see it.
if a opto switch is used still it will work just fine. the extra 5 volt supply can be used to light the leds.

My thought is "bugger the Arduino, protect the swimmers".
But hey! That's just my POV, as a swimmer.

AWOL:
My thought is "bugger the Arduino, protect the swimmers".

Mine too.

But hey! That's just my POV, as a swimmer.

I'm not a swimmer. That's my point of view as a caring person.

AWOL:
My thought is "bugger the Arduino, protect the swimmers".
But hey! That's just my POV, as a swimmer.

Are you saying the cabling is safer when connected direct to the Arduino and using the internal pull-up resistors, or when using the 5V powered optocouplers ?

Since both systems are using 5V, would there be any difference ?

And YES, protecting the swimmers is of utmost importance. One of the kids is my own, and he has one heck of a bad a$$ mommy.