Help with first project

Hi,

I'm new to developing circuits and need some help with what I need to purchase for my first circuit.

I am looking to build a board that will take 8 infra red sensors and give out 13 inputs which can switch on LED's or a circuit.

I need the board to talk to my PC and let me know which of the 8 sensors was activated.

What type of board do I need to buy and the switches that go along with it.

Thank you in advance for your help

Regards

Michael

Your description is a bit vague.

What KIND of 'infra red sensors' are you trying to use?

What do you mean by "give out 13 inputs which can switch on LED's or a circuit"? What kind of 'circuit'?

An Arduino can certainly talk to your PC and let you know which of the 8 sensors is activated.

give out 13 inputs which can switch on LED's or a circuit.

I think you mean give out 13 OUTPUTS which can switch on LED's or a circuit.

Unless you have some sort of port expander or shift register to get more outputs you will need a Mega to get that number of I/O pins.

Thank you for your reply.

I'm try and explain more what I'm doing.

I have a toy car racing track then will have eight lanes.

Each time a car will complete a lap it will break a sensor of some type. I thought the best sensor to use would be an IR sensor.

Also when the car's finish the race the power to that track needs to be switched of. (hence outputs to switch of a switch)

all of the above need to be notified to Pc for display on a computer program.

I also am going to have five lights at the start of the race to tell the drivers when to start. (outputs to LED's)

I can do the computer part of things just not sure on the circuit part but willing to learn and give it a go!

Thank you again for your help

All that is perfectly reasonable, remember pins 0 & 1 are used by the serial port so you can't use them for anything else. I would use a shift register to get more outputs. See the tutorial in the learning section for this.

I would do all the timing in the Arduino and then upload times to the PC.

I would consider using Pin Change Interrupts (http://www.arduino.cc/playground/Main/PinChangeInt) for the 8 finish-line sensors. Put phototransistors under the track and a light over the track. When the car goes between the phototransistor and the light the interrupt will occur and you can note which track and what time.

The “christmas tree” starting lights can use a decoder if only one LED is on at a time. This would reduce the pin count for lights from 5 to 3.

Remember that the ‘Analog Input’ pins can be used as digital i/o pins.

Driving a relay with an output pin and transistor will allow you to turn off track power.

If the start line and finish line are at the same place, the Arduino can detect early starts (someone crosses the line before the GO signal).

If you have a race of multiple laps the Arduino can measure lap times and send them to the PC.

Thanks for the help.

Need to do some reading up now on which components to buy.

So Far I have a list of

Mega ardino, Bread board so I can mock up 140 puece wire kit A beginner parts kit so I can play with other projects as well 4* red LED 1 * Green LED 8 * photo Transistor VISHAY SEMICONDUCTOR - BPW85 - TRANSISTOR, PHOTO, NPN, 850NM, T-1 8 * relays for the connection to the power. Getting Started with Arduino Book (paperback)

Any recommendations for repays to use and if the photo transistor is any god would be appreciated.

Thanks

I would get 8 light sources for your photo transistor. Normal is IR emitters or white LEDs depending on the match with your photo transistor. I would also get 8 2n2222 transistors to drive the relays with and 8 diodes like 1N4004 to put across the relay coils. Finally also get 8 1K resistors for the base resistors for the transistors.

Thank you for the help.

I've order most of the parts now.

Only part I wan't sure on was which relay to order.

am going to get a few sample circuits working and then work out which relay I need to power 12v

Regards

michael

If you can find a relay with a 5v <40mA coil you should be able to drive them directly from the Arduino pins (with a diode across the coil to protect against inductive spikes). If you use a resistor and transistor for current switching you can use a relay with a higher current (and/or higher voltage) coil.