Pinewood Derby Christmas Tree - Laptop RS232 PINS 4 and 5

I am new to Arduino and looking forward to my first project. I am replacing the relay system in a Pinewood Derby Christmas Tree Start gate that was run off a Parallel Port in the past. The old relays caught on fire during its final race of use. The software used for running the Pinewood Derby race no longer uses parallel ports. It now relies on the use of a RS232 serial port to trigger either a start gate solenoid or a Christmas Tree that fires a solenoid at end of its routine. The only options are using a Serial COM port in windows using either PIN 4 or 7 with PIN 5 as the ground. The output voltage is 6.11v when on and -5.65V when off.

I am trying to determine what additional work and electronics I will need to connect to an Arduino. I was looking to use an Arduino UNO as my starting point connecting to an 8 Channel DC 5V Relay Module to trigger the AC light on the Tree and close the circuit to release the solenoid that relases the Pinewood cars and starts the timer.

Hi, what is a "Pinewood Derby Christmas Tree". Aren't all christmas trees made of pinewood? Or are they Spruce....

What is being raced?

Paul

Hi, as in Drag Race Christmas tree, and a pinewood model type car.
Phew, had to dig for that.. you get to the internet sites yet nobody wants to tell you what this sort of racing is.

Even wiki hasn't got a picture of what it is.

Tom.... :slight_smile:

I should have been more specific. The tree is the start lights used in a drag race to start the cars. The cars are made from pinewood and are released by solenoid and powered purely by gravity. I have attached an image of a starting tree. The tree is purely a cosmetic accessory to the race as all cars start at the same time when the solenoid releases the start gate. For those interested here is a link to a POV of an actual race https://dl.dropboxusercontent.com/u/11333924/00021.m4v

tree.jpg

Why not just send a serial message to the arduino, and let it talk back if needed, and control the lights otherwise?
RS232 to USB adapters are plentiful. This combo might work.
Or you could have the arduino read the 2 pins and react accordingly; ensure the levels are 0-5, and not higher +/- 10V levels or similar.

Thanks,
I spoke with the developer of the software today and he suggested the same. I think i was getting odd voltages out of my old laptop and I will re read the voltages from the usb to rs232 adapter this weekend after it is purchased. Again thanks for the advise.

So i purchased a new usb to serial adapter for my laptop. The voltages are as 6.11v when on and -5.65V when off for male serial pin 4 when grounded to pin 5. I really do not know how to build a circuit so that the negative voltage is taken to zero and the the new positive voltage will be my high. The only two pin choices I have are pins 4 or 7 grounded to pin 5. These are the DTR and RTS pins. I have been unable to find a RS232 shield has these pin outs passing through the max232 chip. Any advice would be greatly welcomed.

I think I understand the application now. But I don't understand the need for this rs232 adaptor with its Arduino-incompatible voltages.

You want to control a number of relays using an Arduino, and the software on the laptop needs to communicate via a serial com port, correct? Can't you just connect an Arduino to the laptop with just a normal usb cable? The Arduino appears to Windows as a new com port and you can set the race software to use that com port?

Apologies if I'm still not being very helpful!

The software will Race software will see the Arduino UNO as a com port as PaulRB pointed out. The only problem I have is that I can't Serial Monitor the Arduino while the software if sending the command over the DTR pin 4 of serial port on COM4. I have no idea what to code as the trigger event to activate the relays. Guidance is greatly appreciated.

Three ideas:

  1. Get a 16x2 lcd and echo the codes received from the race software to that. (One with an i2c interface will be easier to wire up.)

  2. Get a Leonardo, pro Micro, or some other Arduino with a second serial port. Get a usb to TTL level serial adaptor. Connect the Arduino up like this to the same pc with two usb cables, or two separate pcs. Again, this would alow you to write a short sketch to echo the codes received from the race software to somewhere you can see the codes.

  3. If you are in contact with the race software developer, ask them for the codes.

CargoAA:
So i purchased a new usb to serial adapter for my laptop. The voltages are as 6.11v when on and -5.65V when off for male serial pin 4 when grounded to pin 5. I really do not know how to build a circuit so that the negative voltage is taken to zero and the the new positive voltage will be my high. The only two pin choices I have are pins 4 or 7 grounded to pin 5. These are the DTR and RTS pins. I have been unable to find a RS232 shield has these pin outs passing through the max232 chip. Any advice would be greatly welcomed.

By definition, RS-232 is bi-polar, just like you discovered. Also, by definition, any of the pins can be shorted for ever, without causing problems to the circuit. Therefore (so) I would put a Shotkey diode, capable of 1 amp, on the pin, oriented so a negative voltage is shorted to ground, giving at the most, -0.3 volts.

Paul

Paul_KD7HB:
By definition, RS-232 is bi-polar, just like you discovered. Also, by definition, any of the pins can be shorted for ever, without causing problems to the circuit. Therefore (so) I would put a Shotkey diode, capable of 1 amp, on the pin, oriented so a negative voltage is shorted to ground, giving at the most, -0.3 volts.

Paul

You were spot on. I have been picking up lots of components from the Radio Shack near my house at 60% off. I had grabbed a 50v-1a Diode. It did the trick. I was able to write a quick Sketch that made the ledPin 13 blink when the serial port hard wired across the diode to PIN 6 was set to high. I think I am all set to go on competing my project. I greatly appreciate all the advice. This has been a great learning experience.

By the way after the diode I am getting -.01v to 0v

John

CargoAA:
You were spot on. I have been picking up lots of components from the Radio Shack near my house at 60% off. I had grabbed a 50v-1a Diode. It did the trick. I was able to write a quick Sketch that made the ledPin 13 blink when the serial port hard wired across the diode to PIN 6 was set to high. I think I am all set to go on competing my project. I greatly appreciate all the advice. This has been a great learning experience.

By the way after the diode I am getting -.01v to 0v

John

Glad it works for you. Sometimes if you can't kill a problem, you have to trick it!

Good luck with the rest of the project. I do remember my boys and Cub Scouts and pinewood derbies!

Paul