Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsElectronicsBasicsRepairDesignCADComponentsEquipmentElectrical Engineering
ElectronicsKB.com
Contact UsLink To UsSearch & Site Map

Electronics Forum / Basics / April 2007



Tip: Looking for answers? Try searching our database.

Simple circuit to measure baud rate on a serial link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Simon - 21 Apr 2007 07:56 GMT
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.
jasen - 21 Apr 2007 14:59 GMT
> Hello -
>
[quoted text clipped - 11 lines]
> 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.

Signature

Bye.
  Jasen

redbelly - 21 Apr 2007 16:22 GMT
> Hello -
>
[quoted text clipped - 11 lines]
> 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
Si Ballenger - 21 Apr 2007 17:35 GMT
>Hello -
>
[quoted text clipped - 11 lines]
>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.
John - 25 Apr 2007 00:13 GMT
>Hello -
>
[quoted text clipped - 11 lines]
>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
Bob Myers - 25 Apr 2007 04:51 GMT
> 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.
Simon - 28 Apr 2007 12:09 GMT
> > 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
[quoted text clipped - 5 lines]
>
> 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
jasen - 29 Apr 2007 04:01 GMT
>> > 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
[quoted text clipped - 14 lines]
> 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.
Bill Bowden - 27 Apr 2007 21:49 GMT
> Hello -
>
[quoted text clipped - 11 lines]
> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.