Sci.Electronics.Basics

on Electronics-Related.com

  Home  |  Books  |  Sci.Electronics.Design  |  Sci.Electronics.Basics  |  Resources  |  Contact  | 
Sign in
username:

password:

Remember Me

Not a member?
Search Sci.Electronics.Basics

Search Tips

Sci.Electronics.Basics -> Simple circuit to measure baud rate on a serial link

There are 9 messages in this thread.
You are currently looking at messages 1 to 9.






Author: Simon
Date: 02:56 21-04-07

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.



Author: jasen
Date: 09:59 21-04-07


On 2007-04-21, Simon <simon@dfgdgdf.invalid.com> wrote:
> 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.



--

Bye.
Jasen

Author: redbelly
Date: 11:22 21-04-07

On Apr 21, 2:56 am, "Simon" <s...@dfgdgdf.invalid.com> wrote:
> 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


Author: Si Ballenger
Date: 12:35 21-04-07

On Sat, 21 Apr 2007 07:56:20 +0100, "Simon"
<simon@dfgdgdf.invalid.com> wrote:

>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.

Author: John
Date: 19:13 24-04-07

On Sat, 21 Apr 2007 07:56:20 +0100, "Simon"
<simon@dfgdgdf.invalid.com> wrote:

>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


Author: Bob Myers
Date: 23:51 24-04-07


"John" <look@sig.net> wrote in message
news:0k3t23l5skf1n28hr0m8f0e30fn31ua5d1@4ax.com...
> 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.



Author: Bill Bowden
Date: 16:49 27-04-07

On Apr 20, 11:56 pm, "Simon" <s...@dfgdgdf.invalid.com> wrote:
> 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


Author: Simon
Date: 07:09 28-04-07


"Bob Myers" <nospamplease@address.invalid> wrote in message
news:f0mj7q$562$1@usenet01.boi.hp.com...
>
> "John" <look@sig.net> wrote in message
> news:0k3t23l5skf1n28hr0m8f0e30fn31ua5d1@4ax.com...
> > 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.
>
>

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



Author: jasen
Date: 23:01 28-04-07

On 2007-04-28, Simon <simon@dfgdgdf.invalid.com> wrote:
>
> "Bob Myers" <nospamplease@address.invalid> wrote in message
> news:f0mj7q$562$1@usenet01.boi.hp.com...
>>
>> "John" <look@sig.net> wrote in message
>> news:0k3t23l5skf1n28hr0m8f0e30fn31ua5d1@4ax.com...
>> > 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.
>>
>>
>
> 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.

1


      Contact  |  Electronic Portal


Sci.Electronics.Basics by Keywords
ADC
Antenna
CAD
Coil
Generator
IDE
LCD
Modulator
MOSFET
NiMH
Opamp
Oscilloscope
PID
RS232
Telephone
Transformers
TTL
USB

Sci.Electronics.Basics By Author