I have built this ID sensor for a Scalextric slot car track, based on a PIC12F629. The ID sensor sends the ID of a detected car as a RS232 signal on one pin (TTL level).
My question is, how can I receive data from like four of these micro controllers into another micro controller's (PIC18F2550) USART?
I came up with these possibilities:
- Just connect all of the serial lines "directly" to the RX pin of the PIC18 and hope that two cars doesn't pass any sensor that close in time so the signals are overlapping each other. This could actually be a good start and will probably work 99.9% of the time. I mean, the mathematical probability that two cars are detected that close in time cannot be worth the effort of the other suggestions...after all, it's a hobby project.
- Implement a busy signal that is raised when the ID sensors sends data and checked before sending.
- Add some fancy multiplexer chip that eats the serial signals and outs them on a single line.
Each ID sensor chip will be coded with an identifier that is sent as part of the data, so they can be separated at the receiving end.
Update: Added some more info about the sensor hardware.