Timer problem with Parallel port monitoring

Hey everyone, I'm very much so a newbie at electronics, but figured I'd try and tackle a problem for my scout group: making a pinewood car timer.

I found this schematic online that uses optical transmitters:

formatting link

I have hooked everything up as seen in the schematic to the best of my abil ity... I have hooked up the parallel port grounds (Pins 18-25) also to the negative row at the bottom of my breadboard, so all the grounds are on the same line (I couldn't figure out how else to do that).

Here's my problem: Using parmon to monitor the parallel port, when I hit a ny of the sensors (say the start gate for example), it changes the status o n all the pins that are hooked up.

Example: Pins 10,11,12,13, and 15 all read "1". I trigger the start gate switch (ho oked up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle ov er to "0". Similar thing happens if I hit just ONE photoelectric diode wit h a flashlight, ALL trip to 0, not just the one pin that that diode is hook ed to.

I've written my matlab code to poll everything and run the race, but since I can't differentiate which sensor is getting twigged, I can't determine wh ich sensor came across first...

Any help/suggestions would be fantastic.

Thanks in advance, Andrew

Reply to
amcgillis
Loading thread data ...

problem for my scout group: making a pinewood car timer.

ability... I have hooked up the parallel port grounds (Pins 18-25) also to the negative row at the bottom of my breadboard, so all the grounds are on the same line (I couldn't figure out how else to do that).

of the sensors (say the start gate for example), it changes the status on all the pins that are hooked up.

up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle over to "0". Similar thing happens if I hit just ONE photoelectric diode with a flashlight, ALL trip to 0, not just the one pin that that diode is hooked to.

can't differentiate which sensor is getting twigged, I can't determine which sensor came across first...

Make sure all the grounds are connected. Then check the 5 volt supply, with a voltmeter maybe, and make sure it stays 5 volts.

--

John Larkin                  Highland Technology Inc 
www.highlandtechnology.com   jlarkin at highlandtechnology dot com    

Precision electronic instrumentation 
Picosecond-resolution Digital Delay and Pulse generators 
Custom timing and laser controllers 
Photonics and fiberoptic TTL data links 
VME  analog, thermocouple, LVDT, synchro, tachometer 
Multichannel arbitrary waveform generators
Reply to
John Larkin

problem for my scout group: making a pinewood car timer.

ability... I have hooked up the parallel port grounds (Pins 18-25) also to the negative row at the bottom of my breadboard, so all the grounds are on the same line (I couldn't figure out how else to do that).

of the sensors (say the start gate for example), it changes the status on all the pins that are hooked up.

(hooked up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle over to "0". Similar thing happens if I hit just ONE photoelectric diode with a flashlight, ALL trip to 0, not just the one pin that that diode is hooked to.

can't differentiate which sensor is getting twigged, I can't determine which sensor came across first...

When you toggle the "start gate" switch, only pin 15 should change from high to low (voltage, I don't know whether that means 0 or 1).

If more than that switches, check the voltage levels from ground to the rest of the pins. It could be that your "power supply" just can't handle the load.

Make sure you're using 10k? resistors (brown black orange). Test them with an ohm meter (removing them from the circuit first).

Make sure your not inadvertently shorting the signal lines some how.

Try disconnecting all the phototransistors. With-out them in the circuits, you should read all high-level except for the start-level switch. If that *isn't* the case, start removing all the other line connections until it is the case.

Perhaps you could upload a photo of your protoboard somewhere for us to look at. Sometimes you think you've wired it one way, but it is actually wired a different way.

Anyway, I hope my suggestions help you. I'm somewhat new to this myself.

Good luck, Daniel.

Reply to
Daniel Pitts

John: Thanks so much for your response. I will check this out, hopefully I can squeeze it in over lunch.

Reply to
amcgillis

The two suggestions that you've gotten -- to check the +5V supply and to check all grounds -- are both things that I'd recommend.

Checking the voltages at pins 10-13, pin 15, and your +5V line when you exercise the start gate and the photodetectors should also be informative. If the circuit is working correctly then the voltage on any one of the five sense lines should be independent of the rest, and the

+5V line should not be affected.

If you _do_ see cross-talk on the data lines but not the +5V, then try it again with the thing disconnected from the 'puter. In general you want to chop the problem up into little bits and solve (or verify) those bits independently.

When you're all done, check that the thing actually times accurately under whatever OS you're using -- both Windoze and Linux aren't real time, and the more we use nifty graphics and such the less real time they get. If the software you intend to use has as decently written port driver and makes wise use of multimedia timing constructs then it should do a pretty good job. If not -- maybe not.

(Or, if you're _really_ techie, use a 4-channel digital scope connected to the four lane sensors, with the start gate connected to the trigger. There's nothing like throwing $5000 worth of equipment at a $10 problem to prove that you're a techno-nerd).

--
My liberal friends think I'm a conservative kook. 
My conservative friends think I'm a liberal kook. 
Why am I not happy that they have found common ground? 

Tim Wescott, Communications, Control, Circuits & Software 
http://www.wescottdesign.com
Reply to
Tim Wescott

le a problem for my scout group: making a pinewood car timer.

ility... I have hooked up the parallel port grounds (Pins 18-25) also to t he negative row at the bottom of my breadboard, so all the grounds are on t he same line (I couldn't figure out how else to do that).

any of the sensors (say the start gate for example), it changes the status on all the pins that are hooked up.

hooked up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle over to "0". Similar thing happens if I hit just ONE photoelectric diode w ith a flashlight, ALL trip to 0, not just the one pin that that diode is ho oked to.

e I can't differentiate which sensor is getting twigged, I can't determine which sensor came across first...

EVERYONE: Thanks so much for your input. I thought I'd have time on my lunch break t o test some things but couldn't squeeze it in. I'm going to go through the se tests this evening and try to isolate/debug it.

Thanks everyone for the help!

Cheers, Andrew

Reply to
amcgillis

break

through

I was not familiar with parmon so I looked into it and it seems like a useful program. I also found many other helpful tutorials and applications. Interfacing to the parallel port was pretty easy with MSDOS and early computers as were standard when I developed some products in the early

1990s, but after Win98 and the ubiquitous USB port, the LPT port vanished and I had to redesign my hardware and software. Here are some links that may help:

formatting link
(updated version with bug fix)
formatting link
formatting link
formatting link
formatting link
formatting link
formatting link
p/0879305134
formatting link
(Jan Axelson)
formatting link
(inpout32.dll)
formatting link

85).aspx

Good luck with your project!

Paul

Reply to
P E Schoen

problem for my scout group: making a pinewood car timer.

ability... I have hooked up the parallel port grounds (Pins 18-25) also to the negative row at the bottom of my breadboard, so all the grounds are on the same line (I couldn't figure out how else to do that).

of the sensors (say the start gate for example), it changes the status on all the pins that are hooked up.

(hooked up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle over to "0". Similar thing happens if I hit just ONE photoelectric diode with a flashlight, ALL trip to 0, not just the one pin that that diode is hooked to.

can't differentiate which sensor is getting twigged, I can't determine which sensor came across first...

"GND" at the bottom if the diagram should be connected directly to "GND" on the parallel port and to nothing else.

+5V should always measure about 5V to gnd (parport pin 25) any voltage from (3.5 to 5.5V) should be ok.

the device can probably be powered from pins 1-5 of the parallel port instead of from an external supply. to do this: to set those pins to output and high. Then disconnect the top end of each resistor and reconnect it to diffetent parport pin.

--
?? 100% natural 

--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Reply to
Jasen Betts

problem for my scout group: making a pinewood car timer.

ability... I have hooked up the parallel port grounds (Pins 18-25) also to the negative row at the bottom of my breadboard, so all the grounds are on the same line (I couldn't figure out how else to do that).

of the sensors (say the start gate for example), it changes the status on all the pins that are hooked up.

(hooked up to pin 15). Now ALL of my pins (10,11,12,13, and 15) all toggle over to "0". Similar thing happens if I hit just ONE photoelectric diode with a flashlight, ALL trip to 0, not just the one pin that that diode is hooked to.

can't differentiate which sensor is getting twigged, I can't determine which sensor came across first...

The RS-232 standard defines the voltage levels that correspond to logical one and logical zero levels for the data transmission and the control signal lines. Valid signals are either in the range of +3 to +15 volts or the range -3 to -15 volts with respect to the ground/common pin; consequently, the range between -3 to +3 volts is not a valid RS-232 level.

see

formatting link

Some PC builders cut corners and then it may work. So try another PC or redesign the schematic.

Reply to
tuinkabouter

logical

or

The OP is using the Centronics parallel port and not the RS-232 serial port. Older computers used a 25 pin Dsub connector for both, but the serial port was male while the parallel port has always been female. The early parallel ports used an 8255 PIO which could be reconfigured by writing to the control port address, but in later machines it was usually incorporated into proprietary chips on the motherboard (or on plug-in ISA or PCI cards).

There were some improvements (enhancements) to the parallel port such as

EPP, which I think was faster and designed for bidirectional data transfer. But it had to be compatible with old versions of software and hardware so there is usually a BIOS option for SPP or EPP. AFAIK all of them use TTL or CMOS logic levels of nominally 0 and 5 VDC with transition at about

0.7V.

I have also found that some parallel ports work much better if pull-up resistors of 4.7k or so are added.

Paul

Reply to
P E Schoen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.