Connect with us

RS232 message to pulse

Discussion in 'General Electronics Discussion' started by Andy3405, May 11, 2016.

Scroll to continue with content
  1. Andy3405


    May 11, 2016
    I have a device that outputs a serial RS232 message every 5 seconds. I would like to use this device as a pulse generator, but I don't know how to ignore the next highs and lows which are part of the message and will last for about 0.1 seconds, until the next message 5 seconds later. Any ideas of what I should look into?
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    Use a monostable multivibrator (monoflop). It will be triggered by the first edge of the signal on the RS232 line. Make the duration of the monoflop a bit longer than the longers RS232 'message'. This will give you one pulse for every RS232 'message'.
  3. Andy3405


    May 11, 2016
    Yes, this is definetely the solution to the stated problem. Unfortunately, I just realised that I need something a little bit more complicated than this. What If I want to trigger every nth message(let's say 2nd), and the time between messages is 0.1 seconds, not 5, and the messages are about 0.05.
    Reusing your answer, I should be able to set the duration to 0.15 and then I should be good. Also, if I want to trigger every 3rd time, I should just increase the duration to 0.25. But I believe the below 0.1 seconds duration becomes an issue now. Should I use a counter instead?
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    A counter is definitely the better solution.
    Alternatively use a microcontroller with UART interface and manage the complete timing in software, if you're comfortable with programming a microcontroller.
    Minder likes this.
  5. Minder


    Apr 24, 2015
    +1 on a small Micro if practical, you get a interrupt flag every char input, the extra processing power would allow you to do as you wish with the No. of chr's etc. and be more flexible.
  6. AnalogKid


    Jun 10, 2015
    Is the RS-232 message at true 232 signaling levels (+/-9 V or so), or at logic levels (5 V or 3.3 V)?

    A true monostable circuit (with feedback) will put out a constant pulse for each message. That can increment a CD4017 counter that steps through its outputs like a rotary switch until it gets to one that is tied to its reset. That one is your output pulse. If you want independent adjustability of the output pulse width, the reset signal fires another monostable that makes the output pulse. In this way, moving a jumper changes the number of messages desired between output pulses.

    Two CMOS chips:
    CD4093 - both monostable circuits built up with one chip.
    CD4017 - Johnson decade counter.


    Note, no 555's or microcontrollers were employed in the making of this response.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day