Wireless analog read.

Hello, i am currently creating a project regarding a runner(about training).The idea is based on the stopwatch but instead having a push button, i have a set of infrared beam sensors at start and one set at final line.When you pass start the line , time starts and from the finishing line you get the time passed from start to finish. the whole communication is via cables as i get 1 analog pin from start and one from finish.So reading the analog values help me set my project.The distance is 30-100(max) meters.
My question now is,What is the best method to set a wireless communication instead of having 2 wires and getting actual results in time without having deviation comparing to cables?

Don't use analogous signals, their timing is not very precise.

I'd add a calibration command, sent by the master to the slave device(s). The slave responds immediately, so that you can guess that the one-way delay will be half of those two transmissions. The measured delay will already give you an idea of the accuracy achievable by this solution, it should be much better than 1ms, I'd think.

For near exact timing I'd try an optical connection between the start and stop locations, so that the stop signal can turn on or off the sender (laser diode...) almost immediately, with no controller required/involved at the sender side. But then you risk that some object (bird, bee?) could break the optical signal as well, possibly causing false readings.

"Not very precise" - I think it will be easy to get 1/100th of a second, possibly 1/1000th with a little effort. If you wanted to get 1/10,000th, then analogRead is not precise.

The best solution will be the cheapest and simplest radio unit you can get. The 433MHz units based on garage-door controllers will be good. All you need is a simple on/off from the radio.

so theoretically i need an extra arduino(say a nano) , one on start and one on finish having both of them a rf transmitter whereas i have two rf receivers(or one?) on my main arduino(une) which will run the code about time.So to be more precise what im thinking is, im passing through starting line,the circuit immediately is cut and the transmitter from the first arduino(slave-nano) sends signal to the main arduino's reciever 1 (master-uno), then the timer begins and so at the end. Is this thought correct?

Ah, assuming that the transmissions from the slaves to the master station take the same time, the timing should be quite accurate. A single receiver should be sufficient, when the slaves do not send at the same time.

You will need some pretty good radios to do this.
In particular, radios which have a defined propagation delay between receiving a given signal, and the demodulated output being available.
The cheap 433 Mhz ASK radios wont even get close.

so what is your suggestion?

What level of accuracy do you need?
Will there be more than one runner in a "race" - if so you may have a big problem distinguishing between them.

If an Arduino records the value of millis() when the beam is broken and transmits that value back to base the delays within the radio system will be irrelevant. However it will be necessary to have some form of synchronization of the timing in the two Arduinos. That does not mean that millis() should give the same value in each one, but you would need to know that (say) 5016 millisecs on one device was the same time as 11056 on the other. Also, it is unlikely that the oscillators in the two Arduinos would run at exactly the same time so an error will creep in. But perhaps not enough to matter.

Some time ago there was a Thread with a clever way of synchronizing time but I'm afraid I have forgotten it.

...R

It is for training purpose only , so only one runner.In terms of accuracy i want seconds and milliseconds to be exact.Something like this, http://browertiming.com/index.php?option=com_content&view=article&id=190:trackspeed-evaluation&catid=82:tc-timing-system

prat91:
In terms of accuracy i want seconds and milliseconds to be exact

Are you saying that you want to be able to distinguish between two lap times that vary by as little as 1 millisecond?

I don't know anything about athletics but I would have assumed 100 msecs or 10 msecs would be sufficient accuracy.

What is the price of the system you linked to ?

I think you need to get a couple of Arduinos with an NRF24xxx 2.4GHz transceiver on each of them and do some experimenting to figure out what is possible.

I found the Thread I had been thinking about for synchronizing master and slave but it addresses a different problem altogether - sorry.

...R

When the slaves have nothing to do but

  while (!digitalRead(sensorPin)) ;
  radio.transmit(msg);

I don't see what could cause further delays at the sender side.
A similar loop at the receiver side will roughly double that delay, so that the accuracy should be within a few clock ticks, WRT to the receiver (master) time base.

yeap sorry for confusion , 10 millisecs are ok.

it is over a 1000 euros!

prat91:
it is over a 1000 euros!

I suspected that. It may have something to do with the complexity of the task :slight_smile:

Spend €50 to €100 and do some testing - you may be lucky.

...R

i've ordered this http://www.ebay.com/itm/191551324707?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT after some suggestion above!

Nice project.
I did something like that a while ago for timing curling stones (wired).

The master could broadcast a start signal (near the (wired) start gun).
That starts a timer in the reciever (finish line).

When the finish line is triggered, the receiver could then broadcast the time elapsed.
Several devices could receive this, e.g. a score board.

The master could at some stage broadcast info about the runner(s) e.g. for the score board.
Leo..