Shop OBEX P1 Docs P2 Docs Learn Events
Receiving serial comms from a non-38kHz modulated pulse stream — Parallax Forums

Receiving serial comms from a non-38kHz modulated pulse stream

I intend to use a 10kHz (or similar) pulse stream for modulated serial communications.
Is there an existing program which will examine the 10kHz pulse stream and abstract the serial data?
I have looked through OBEX and other learning materials but I cannot find anything which I can use as a starting point.
Many thanks.

Comments

  • Heater.Heater. Posts: 21,230
    Look for Full Duplex Serial (FDS) on OBEX. Or other serial communications objects. I'm sure there is more than one. Generally one uses RS232 style asynchronous communications over a serial link but there are other schemes there as well I think.

    Are you hinting an infra red communications link?
  • Heater,
    Yes, it is a laser comms link. The laser cannot be modulated much above 10kHz.
    I am hoping for the Prop to examine the 10kHz pulse stream directly and abstract the modulated serial signal (probably only 300baud or so).
  • evanhevanh Posts: 15,918
    edited 2015-11-06 11:38
    For modulation, I'm going to guess you are thinking about encoding a clock into the signal? Or are you attempting to provide channel or noise separation with the modulation?

    If it's just for synchronisation then your average UART style encoding will be a lot easier to deal with, ie: No modulation needed. What Heater has listed is fine for this purpose.
  • Heater.Heater. Posts: 21,230
    What kind of laser? What power? What range do you want?

    I'm thinking that if you are blasting a few milli watts over a few meters into suitable photo diode you won't need any modulation and use something like Full Duplex Serial directly.

    If you want bounce a beam off the moon that might be another story :)
  • Heater,
    It is one of these cheap ebay low power 5mW 650nm red line lasers.
    http://www.ebay.com.au/itm/Hot-Focusable-650nm-5mW-Red-Focus-Line-Laser-Module-Focus-Adjustable-laser-Head-/321784902878?hash=item4aebdff4de:g:ZLAAAOSw-vlVgSHR
    I find the laser line is very sharp and well adjustable. Quite impressive really.
    I want it to work over 20m. My tests indicate that this is feasible.
    I have applied a low pass filter to remove the 50Hz mains hum and electric light noise, and amplified the signal, so the receiving sensor pulses are quite sharp and well defined at a close range of 1 - 2m.
    However at 10 - 20m, the signal is quite weak and noisy and I think modulation will be necessary to clean up the signal, just like IR remote control communications. Evanh said it very well "are you attempting to provide noise separation with the modulation?"
    I will try your idea of direct serial and revert, I was going to do that anyway.
    I have experimented with modulation and find that 10kHz is the maximum achievable with the with the laser/photodiode combination.
    In the meanwhile, I would appreciate any links to a program which will abstract modulated serial data (say, 300baud) from a carrier frequency (say 10kHz).
  • I once did something similar for a STEM event, sending ASCII characters (albeit at a slow rate) by using one cog to work an LED as a light sensor. Long pulse =1; short pulse = 0.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-11-06 17:38
    You can use a FIR filter to create a narrow bandpass at 10 kHz. The resulting amplitude fluctuations can then be thresholded to provide your 300 baud on-off-keying signal.

    As an alternative, you could send and receive the data at 1200 baud via Bell 202 modem signaling.

    'Just curious: what are you building?

    -Phil
  • Phil,
    Thank you for your response.
    Your filter and modem programs are very impressive, and I think they can can help my project.
    I am trying to build a simple robot location and driving system.
    1) There will be two fixed transmitting beacons, each with a horizontally rotating module which sweeps a vertical red laser line.
    2) Each fixed transmitting beacon will have a compass sensor on the rotating module oriented on the laser line and the laser line will continually transmit data by some data scheme giving the following data message (beacon number, laser line compass bearing, checksum).
    3) The distance and the compass bearings between the fixed transmitting beacons must be measured as constants. Coordinates for the transmitting beacons can be established.
    4) A receiving robot within the range of the beacons will be equipped with a laser sensor and a compass module.
    5) As the each laser line sweeps past, the receiving robot laser sensor will receive that laser line compass bearing and number of the fixed transmitting beacon.
    6) With the compass bearings from each of the fixed transmitting beacons known, the coordinates and direction of the receiving robot can be deduced by simple coordinate geometry.
    7) Waypoints can be fed in as constants (or calculated from a bounding geometric shape) and the robot can repetitively transverse the geometric shape.
    8) The ultimate aim is to robotically cut my lawn. However, I probably could have cut the lawn a thousand times by the time I finally get this robot lawnmower working!
  • Ha! I've often thought that would be a good way to provide nav beacons indoors, say, in a gymnasium. Your project will be a real tour de force if you're able to get it working outdoors. This is really cool! Please keep us posted with your progress.

    -Phil
Sign In or Register to comment.