Project using AT Mega 2560 as master and 2 Uno's as slave

Hi,

As a newbie i have a simple question :

Is it possible to make a project where 1 AT Mega 2560 would act as master to control 2 UNO's
The project is a timekeeping & and error handling setup for a dogsport competition.
The dogs run in two different lanes against each other, each team has 4 dogs that need to get a ball from a flyball box in the correct way.

The start is given by a referee triggering a light tree (Formula 1 like) first red, yellow, yellow, green.
Once the green light is on, the dogs may pass a double sensorbeam of photoswitches.
The second dog may only enter the lane - sensorbeam "IN" from the moment the first dog crosses the sensorbeam "OUT"
And so on for the remaining two dogs. Those sensorbeams are approx. 4 inch seperated from eachother

|°| |°|
|°| |°|
<<to the box |°| |°| >> waiting dogs
|°| |°|
|°| |°|
"OUT" "IN"

If a dog drops a ball or comes back besides the hurdles, a linereferee must be able to switch on a error lamp (RGB LEDstrip),
If a dog enters to soon (thus before the previous dog crossed the "OUT" beam, a white lamp has to go on automaticly AND a specific lamp on the light tree has to go on automaticly as well (1° dog -1° lamp "red", 2° dog - 2° lamp "blue", 3° dog - 3° lamp "yellow", 4° dog - 4° lamp "green"

The goal is that four dogs of one team come in correctly in the fastest possible time (timekeeping) and be faster than the opponent team

Each linereferee has to be able to trigger 5 switches (stop - reset - error dog1 - error dog2 - error dog3 & error dog4)
The general referee has to be able to start a run by RF transmitter
Each line referee table has to be able to see :
The time each dog ran, and the time of the crossings of two dogs
That I would like to do with a 7" TFT screen on each table (2X)

It looks like this

dog1 - 4,013 sec - 0,011 sec
dog2 - 4,136sec - 0,120sec (or "OK" if within 0,12sec)
dog3 - 4,023sec - 0,150sec
dog4 - 4,234sec - 0,230sec

total time 16,917sec of witch 0,511 is crossing time

below is a clip from the dogsport :

For this moment the timekeeping & errorhandling is done mostly by PLC handling and normal E27 bulbs
due to this the installatons are heavy and very power consumming.

The goal for me is to prototype a similar installation that is flexible, light, cheaper and that can opperate "Stand alone" by batterie packs if needed

I'm aware this is fairly complex project for a newbie, but the complexity is also the drive for me to go along with it.

Is it nessecary to work with more than one Arduino on this project, can I connect two UNO's to one AT 2560 mega, or is that not needed (2 TFT screens, 2x 5 switches, 2 8x7segments, 2 light tree's with 5 RGB lamps, 2x 10 photocell sensors, 1x RF receiver)

any good advice would be highly appriciated

Kind regards,
YVes

Definitely do-able. Might even be able to do it all from 1 Mega if you use TFTs with serial interfaces
http://www.newhavendisplay.com/nhd70800480wfctxi-p-3878.html
and shift registers to control the 7-segment displays and RGB LED light trees.

Hi CrossRoads,

Thanks for the tip...

Looked up the link, very nice product indeed (and a very good price too)

But I can't find any arduino related posts on their forum of that TFT, and not on this forum...

Is it that new, or is it hard to combine with a AT Mega 2560?

I noticed they are using a lot of pin's with that TFT, or do I miss something out here (newbie, remember :blush: )
Beside that, I would have to control two of them, displaying the same data, could that cause a problem or is it just a case of paralleling the output to the two TFT's?

Kind regards,
Yves

Sorry about that, I didn't read close enough, I thought it was just a serial interface.
You can use a shift register for the databits going out, that will save on pins.
Then 4 of the other 5 can be in parallel between the boards, and just have a unique chip select for each board.
As for software for displaying stuff, that's always the challenge with unique screens. I don't know of any other 7" TFT screens.
The datasheet does have a code example,

that could be your starting point for coming up with something.

Hi CrossRoads,

Is it anyway possible to output data (laptime's, errors, etc,..) to a serial TFT using Arduino (a bit windows-like)
or do I have to use a computer to put the data on the screens?

Of course I don't need a real windows enviroment for this project, but I would need to be able to draw, squares and lines together with text on a display and in color (data that comes from the arduino MEGA 2560)

Can this be done, or am i missing something here....

Grtz,
Yves

That can certainly be done. Not be me, too much software for my taste.
Might be better off asking in the programming section.

Hi CrossRoads,

I left out the TFT for the moment, once the trainingstuff is up and running, a friend of ours will make an android interface for displaying the data over bluetooth, so i'll have the data on both tablets at the same time.

I have an MEGA 2560 ADK that came in to start with this project, i think i will suit my needs for the moment..

I have some other problems to solve first, before i can get further on....

Grtzzzz,
Yves