Dear friends,
I am continuing my ventures into model car control arena and I am now working on a "control module" for my train/car layout. The control module needs to detect the presence of the car on any of four approaching lanes and be able to read infrared number to recognise the type of vehicle for inputs. That makes for 8 inputs. There is a servo diverting the car to the left or right or letting it to continue straight on any of four approaching lanes - 4 outputs. There is an infrared stop LED to stop the car on the red or give-way situation - 4 more outputs. There is a slow down and blinker right or blinker left commands diode, positioned just before the servo - slow down is switched with a jumper and blinkers occupy 8 further outputs. On exit from the intersection, there is an LED saying full speed and any blinkers off - the full speed command is switched with a jumper and blinkers off is just always on - does not take any outputs.
Then, there are crossing control functions.
Traffic light to start with. 6 outputs to control the normal red-yellow-green in both directions. And two aux traffic light outputs for things like arrows, pedestrian traffic lights and what not. 8 more outputs. 14 in total.
Some crossing "exits" do not allow trucks to enter - 4 more outputs for DIP switch on the control board to select which are those. Some roads are OK for small trucks, but not for "long vehicles". 4 more. On some roads emergency vehicles should not be allowed when on duty. 4 more. And one more switch position for the unforeseen. 16 in total.
Then there are layout control functions - how do you make all the cars ho sleep? By telling the cars to go and park in charging stations. One or more roads on each crossing are ok for cars with low battery and in case of layout shutdown signal. 8 more inputs with 4 more for aux function for routing vehicles with a specific IR address. 12 inputs in total plus a serial input to the MCU from the layout "command station". The actual infrared commands come from "another place", so they are switched with optocouplers.
This makes a crazy number of inputs/outputs needed. I read up on multiplexing/demultiplexing and multiplexer/demultiplexer ICs. So this is my first attempt at them and I would appreciate your feedback.
I have split off a "control unit" for each approaching lane containing the servo, sensors and connections to IR LEDs via 10-wire connection. So the attached PNG is only of the central unit. The brain behind serving all the inputs/outputs is a PICAXE-20M2 with 08M2 as a slave running the servos. I spent much time drawing all the connections and will spend MUCH more trying to fit this on any sort of decent looking PCB so I would be extremely grateful for some peer review here if I'm on the right track and there are no obvious mistakes. I did this in Eagle and any advice, how I should have done this as opposed to how I have done this is highly appreciated. This is not easy to work with as it is .
Thank you,
Edmunds
I am continuing my ventures into model car control arena and I am now working on a "control module" for my train/car layout. The control module needs to detect the presence of the car on any of four approaching lanes and be able to read infrared number to recognise the type of vehicle for inputs. That makes for 8 inputs. There is a servo diverting the car to the left or right or letting it to continue straight on any of four approaching lanes - 4 outputs. There is an infrared stop LED to stop the car on the red or give-way situation - 4 more outputs. There is a slow down and blinker right or blinker left commands diode, positioned just before the servo - slow down is switched with a jumper and blinkers occupy 8 further outputs. On exit from the intersection, there is an LED saying full speed and any blinkers off - the full speed command is switched with a jumper and blinkers off is just always on - does not take any outputs.
Then, there are crossing control functions.
Traffic light to start with. 6 outputs to control the normal red-yellow-green in both directions. And two aux traffic light outputs for things like arrows, pedestrian traffic lights and what not. 8 more outputs. 14 in total.
Some crossing "exits" do not allow trucks to enter - 4 more outputs for DIP switch on the control board to select which are those. Some roads are OK for small trucks, but not for "long vehicles". 4 more. On some roads emergency vehicles should not be allowed when on duty. 4 more. And one more switch position for the unforeseen. 16 in total.
Then there are layout control functions - how do you make all the cars ho sleep? By telling the cars to go and park in charging stations. One or more roads on each crossing are ok for cars with low battery and in case of layout shutdown signal. 8 more inputs with 4 more for aux function for routing vehicles with a specific IR address. 12 inputs in total plus a serial input to the MCU from the layout "command station". The actual infrared commands come from "another place", so they are switched with optocouplers.
This makes a crazy number of inputs/outputs needed. I read up on multiplexing/demultiplexing and multiplexer/demultiplexer ICs. So this is my first attempt at them and I would appreciate your feedback.
I have split off a "control unit" for each approaching lane containing the servo, sensors and connections to IR LEDs via 10-wire connection. So the attached PNG is only of the central unit. The brain behind serving all the inputs/outputs is a PICAXE-20M2 with 08M2 as a slave running the servos. I spent much time drawing all the connections and will spend MUCH more trying to fit this on any sort of decent looking PCB so I would be extremely grateful for some peer review here if I'm on the right track and there are no obvious mistakes. I did this in Eagle and any advice, how I should have done this as opposed to how I have done this is highly appreciated. This is not easy to work with as it is .
Thank you,
Edmunds
Attachments
-
155.1 KB Views: 53