BS2 Serial stream diminished....failure?
Hey guys,
I have a BS2 w/ accelerometer on the back of a radar dish monitoring vibration (for possible gear train problems).
I'm using the programming port (p16) to output the data which is then read with a monitoring PC.
Things work great....
Recently we lost the data stream.· I hooked up an oscilloscope and I could see the data...but it was at a lower voltage level then previously.
Does this mean the RS232 driver on the BS2 is kaputz?
A few times before we had lost the data stream and in the midst of connect/disconnecting wires, it all of a sudden appeared.
We ARE running about 200ft; which is within spec (I think spec is 150m).
Anyhow....some thoughts were noise or capacitance on the line (as it runs close to some power cables too).
I don't recall the voltage levels on the scope...but it sure wasn't +/-15Vdc and if it was at least TTL, it would work.
Anyhow....is this "diminished" voltage level of the data stream a failure mode of the rs232 driver on the BS2?
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I have a BS2 w/ accelerometer on the back of a radar dish monitoring vibration (for possible gear train problems).
I'm using the programming port (p16) to output the data which is then read with a monitoring PC.
Things work great....
Recently we lost the data stream.· I hooked up an oscilloscope and I could see the data...but it was at a lower voltage level then previously.
Does this mean the RS232 driver on the BS2 is kaputz?
A few times before we had lost the data stream and in the midst of connect/disconnecting wires, it all of a sudden appeared.
We ARE running about 200ft; which is within spec (I think spec is 150m).
Anyhow....some thoughts were noise or capacitance on the line (as it runs close to some power cables too).
I don't recall the voltage levels on the scope...but it sure wasn't +/-15Vdc and if it was at least TTL, it would work.
Anyhow....is this "diminished" voltage level of the data stream a failure mode of the rs232 driver on the BS2?
thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Comments
This is a very ingenious approach, which takes just 1 or 2 transistors to implement. So, if this is not working, either the PC's transmit voltage is having troubles, the wire is intermittent, or one of the BS2 transistors is having troubles. I would bet the PC's RS232 driver is having trouble, or the wire has a bad crimp somewhere.
RS232 'standard' is 50 feet, by the way, not 150 meters. That's for 19,200 baud. If the 200 feet has worked for you before, don't let it bother you. Good cable with good grounds can extend the distance easily.
Dave
I have installed an opto cct inbetween the PC and the BS2. (see cct below)
Now...this DID work.· worked for a while actually.
Like I said, the data is there...but at a VERY low level.
I'm guessing I'll have to use a MAX232CPE and borrow +5Vdc off the stamp.· I have room in the box....but really wanted to keep the setup simple!
I'm only running 1200 or 2400 baud (today's my dumb day....don't remember!
(rs232 is only 50feet eh....dang, I swore I thought it was longer than that....today IS dumb day!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
We're not looking for graphable data...at least not fine resolution graphs.
We have a large radar dish who's motor control system is a bit...well...crappy.· Although it works great most of the time.· There are times when it gets funny (not in a good way) and has issues controlling the motors.· With a big dish this can really break things with all the shuddering (it's on a 100ft tower and I've been to sites where the building at the base of the tower was shaking too).
Anyhow, we're just looking for peaks and I include some basic averages for the graphing curves.
We decided just to try it and see if it helps us monitor the condition of our bearings/gearings/motors at the top.
go to my personal site to get a few details on the accelerometer I pieced together.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Oh! I assume the tower is where the Stamp is. Hmm. Yes, if you want to continue using the opto-isolators, you'll have to put a MAX232 on the tower with the Stamp. The good news is you can then use any two I/O pins of the stamp, and you won't get the echo back anymore.
Also, do you have bi-directional comm *to* the tower? From the diagram it looks like you have two comm lines *from* the tower, and none going out to it.
Yes, the stamp is in the tower....I'm using a BOE RevB I think (the one without the servo switch).
I'm using an ADXL210 accelerometer on the board.
It's been working great.· And it worked flawlessly previous to the opto's being installed (worked for a couple months anyhow--but at a shorter cable length too).·
We've since gone to a "special" computer that we needed to add protection on, hence the opto's.· BUT, it did work!!· Worked for a couple weeks then would stop.· I'd fuss with the wires and get it to work.· I'm now thinking that I jumpered the wires over the opto's and directly to the PC.·
We only need data from the stamp....any reprogramming will be done on special circumstances and the 'box' removed.
So we just used the Txline and the Gndline from the stamp.·
By jumping JUST these 2-wires past the opto's, is that enough to "kick-start" the serial transistors and get it going.
Any idea on why it would work before?
Capacitors holding a charge?· Wouldn't think they could for that long?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I am using the programming port to send the data.
I honestly don't remember why I decided to use 120R.·
Doing a quick calculation on 5Vsource with the 120R gives just over 40mA.
I might have got this stuck in my head as a regular LED...looking at the 4N35 opto datasheet, the forward current is 10mA.
but I did disconnect the opto and measure straight from the wires to the tower and that's how I saw the signal (at around 200mV levels).
The other channel on the opto works fine, although it's a different source (a single board computer near to the same length of cable).
I've also swapped opto channels to be sure the opto cctry is still working.
Thus, I'm lead to the stamp.
What's the failure mode of an oversourced I/O pin?·
If I get a chance I'll leave the thing disconnected and see if it can sort itself out (I know, sounds funny).
This is on a weather radar and we don't have the luxury of shutting it down....especially if there's 'good' weather to look at.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
I really think your opto-isolator might work perfectly well at 0 to +5 volts, if you used a 470 ohm resistor (for a 10 mA LED). The only concern is the line length may low-pass filter your signal. Use pin 1 and try it. A low-pass filtered digital square wave looks like a sine-wave -- you lose all those nice sharp edges, but it can still work at low (2400 and below) baud rates.
Looking at the scope trace now....it certainly isn't square....but it worked with the opto anyhow.· I did toss the RC back on and it still looked fine.
Could the signal I'm seeing now (~200mV) be crossover from the other side of the bad transistor?· There certainly IS data present...just not at usable thresholds!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Best solution: *Stop using the Port16*. You're trying to use it *way* outside its intended purpose. Instead, use one of the standard I/O pins, and connect it through a 470 ohm resistor to the opto-isolator. In PBasic code, all you have to do is change the SEROUT '16' to the pin number you've chose.
Next best solution: put zero volts on the 'TX' line going out to the BS2, so it has *something* to modulate.