Maker Pro
Maker Pro

Simple circuit to measure baud rate on a serial link

S

Simon

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.
 
J

jasen

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.

In practice if you can measure the lenghth of the briefest line state that'll
give you a good clue as to the rate.

if you can make other assumtions other characteristics can be meaningfully looked at.
 
R

redbelly

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.

If you have access to an oscilloscope, looking at the data signal
would be one way to check baud rate.

Mark
 
S

Si Ballenger

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.

Get two female and one male serial connectors (DB9 or 25 as
appropriate), and some wire, and make a jumper where you can tap
off the ground and tx/rx wires. Connect the tap off wires to the
rx and ground on a computer. Get the free Portmon program off the
net and run it on the computer to monitor the activity between
the two devices.
 
J

John

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.

Find the serial monitor that HeathKit once sold. It has male & female
DB connectors so it can be plugged in the serial line. Uses LEDs to
display the baud rate being sensed, up to 19,200 or 38,400 (not sure
about the highest rate - haven't used mine in a while ;-)

John
 
B

Bob Myers

Jan 1, 1970
0
John said:
Find the serial monitor that HeathKit once sold. It has male & female
DB connectors so it can be plugged in the serial line. Uses LEDs to
display the baud rate being sensed, up to 19,200 or 38,400 (not sure
about the highest rate - haven't used mine in a while ;-)

Minor quibble - is the desire here to measure BAUD rate, or
BIT rate? Those two aren't exactly the same thing, y'know...

Bob M.
 
B

Bill Bowden

Jan 1, 1970
0
Hello -

I'd like to be able to measure the baud rate that a couple of sealed devices
are using to talk to each other over a serial (RS232) cable. I know that
they only use the common baud rates 9600, 19200, etc.

Can anybody give me some pointers on a circuit I could build that I could
daisy chain with the serial cable to do this? A digital readout would be
nice, but an analogue dial or set of LEDs would do. Or perhaps even a
circuit that generates an audio tone at a frequency that is some fraction of
the baud rate, and the tone could be compared to a set of reference tones
(or even tuning forks) by the user.

I'd like to build something cheap, compact and simple, rather than buying a
hardware or software protocol analyser.

Well, you could use the serial data lines (tx,rx) to clock a binary
counter such as CD4040 and hang a few LEDs off the counter bits. That
would give a visual indication but you probably need a extra 9 volt
battery for power. Also the data will be bi-polar so you need a diode
to block the negative swings into the counter and also limit the
counter input to +9. Shouldn't take too many parts.

-Bill
 
S

Simon

Jan 1, 1970
0
Bob Myers said:
Minor quibble - is the desire here to measure BAUD rate, or
BIT rate? Those two aren't exactly the same thing, y'know...

Bob M.

Thanks for all of the replies. In answer to some of the issues raised:
- I hadn't really thought about baud vs. bits/s, but aren't they the same
thing for a 2-level scheme like RS232?
- Ideally I'd like to build something that requires no additional power
supply, and can make do with the 10mA or so that can be leached from the
RS232 lines. The idea of building useful circuits that are powered from
signal lines appeals to me, eg. http://www.riccibitti.com/pc_therm.htm
 
J

jasen

Jan 1, 1970
0
Thanks for all of the replies. In answer to some of the issues raised:
- I hadn't really thought about baud vs. bits/s, but aren't they the same
thing for a 2-level scheme like RS232?

- Ideally I'd like to build something that requires no additional power
supply, and can make do with the 10mA or so that can be leached from the
RS232 lines. The idea of building useful circuits that are powered from
signal lines appeals to me, eg. http://www.riccibitti.com/pc_therm.htm

the easiest way is to use a microcontroller programmed to look at pulse
lengths. it may be possible to finesse an LM3915 into doing the task too.

for line powered operation there may be enough power in the line your
monitoring to run the LED at sufficient brightness. you may need to recover
the power lost when the line is on the wrong side of ground.

here's an idea.

.------ASCII-SCHEMATIC----------------------------------------.
| This is an ascii schematic, if the diagram appears garbled |
| try switching to a fixed-pitch font (courier works well) |
| pasting it into notepad works well on ms-windows. |
| or in google groups "view source" (found under options) |
`-------------------------------------------------------------'

LED1 on 300
// //
in --[4.7K]-+----------+--->|---+-->|--------> to microcontroller pins
| | |
| | | // 600
+->|- VCC | +-->|-------->
| V |
| T | // 1200
| | +-->|-------->
| +- pulse |
| | | //
| | +-->|-------->
10uF === 330K ... ballast LED
| | | //
| | +-->|--+
| | |
| | |
---------+----------+---------------+-----------

here the LEDs operate like a zener diode to regulate the voltage to the
microcontroller the balast led isd a slightly higher voltage led that the
rate leds to stop the voltage giong too high when ther are all unlit and
so that it goes out when any of the other leds are on.

two LEDs in series will get you 3-6V depending on which LEDs you pick.
(mostly it's determined by colour red, green is moddle, blue is high

the ballast led is a slightly higer voltage led that the other rate
indicator leds

pulse goes to an input pin on the micro.
Vcc to the positive supply pin.

hmm... if you (ab)use the clamp diodes built into the micro to rectify,
you get current on both half-cycles....

txd----[4K7]--------------------------------------.
|
.-----------------------------------|------.
| // power led | |
+->|+---+---+---+---+---+---+---+---|---. |
| | | | | | | | | | | |
| | | | | | | | | | | |
| V V V V V V V V | | |
.---+ T T T T T T T T | | |
| | | | | | | | | | | | |
| _-___-___-___-___-___-___-___-___-___-_. | |
| | | | |+
| |-- _____ | | === 10uF
| | | /||MEL ATtiny2313 | | |
| |__' ~~~~~~ | | |
| | | | |
| `-_---_---_---_---_---_---_---_---_---_-' | |
`---' | | | | | | | | | | |
| | | | | | | | `---|--+
1 1 1 1 1 1 l | | 1 ballast led
A A A A A A A | | A
| | | | | | | | | |
`---+---+---+---+---+---+---|-------+--'
|
gnd-------------------------------------------'

the software would be the fun bit...
maybe 30-60 lines of assembler...

bye.
 
Top