Go Down

Topic: Pinewood Derby Christmas Tree - Laptop RS232 PINS 4 and 5 (Read 231 times) previous topic - next topic

CargoAA

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. 

PaulRB

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

TomGeorge

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.

en.wikipedia.org/wiki/Talk%3APinewood_derby

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

Tom.... :)
Everything runs on smoke, let the smoke out, it stops running......VK3DMK

CargoAA

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 

CrossRoads

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.

http://www.amazon.com/YellowKnife-RS232-Serial-Adapter-Cable/dp/B00A7NGAUO/ref=sr_1_24?s=electronics&ie=UTF8&qid=1423251147&sr=1-24&keywords=rs232+usb-b+adapter

http://www.amazon.com/USB-Type-Female-Male-Adapter/dp/B000AA2SMS/ref=sr_1_6?s=electronics&ie=UTF8&qid=1423251078&sr=1-6&keywords=usb-b+adapter
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CargoAA

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. 

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. 

PaulRB

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!

CargoAA

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. 

PaulRB

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.

Paul_KD7HB

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

CargoAA

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


Paul_KD7HB

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

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy