Synchronising high frequency pulses - Page 1
Forum section: electronics / beginners

author: Infraviolet
author_rank: Super Contributor
timestamp: February 25, 2024, 08:16:55 pm
content: This is a bot of a vague post, as it relates to a problem I've not yet encountered but which I expect to, later on (months away) in a project. To that end I'm not looking for detailed answers, as much as a general indication of what topics and component types to be reading up about if/when I meet this obstacle.I'm considering a distributed system of blinking LEDs transferring data, pretty quickly, in an area a few metres by a few metres. The blinking will have a carrier frequency in the > several MHz <20MHz range (a more exact frequency will be chosen when it comes time to do this, accurate to +/- a few %), and there will be pulse length, or on-off-keying or some other encoding scheme atop it to actually carry 1s and 0s. The carrier frequency will be detected (and amplified) by a fairly tight bandpass filter of some form, and the presence or lack of a signal of this frequency used to know when the signal is on or off.There are circumstances where it is deliberately desirable for multiple LEDs to emit at once, this is not a CSMA type thing in which an emitter checks nothing else is emiting before it starts.But when multiple emitters are emitting I'd want any receivers present to see a carrier signal from them, and not to get destructive interference in which one emitting unit's LED is in the ON part of its carier wave and another unit's is OFF at the same instant, which then swaps over so that two signals 180 degrees out of phase are added to give a long constant ON period and "destructive interference"*. Nor would I want to have emitters with frequencies that differ so over the course of some partially time overapping transmission they drift back and forth between constructive and destructive interference. I'll want constructive interference at any times when more than one emitter is emitting.*as well as this term applies to something ON or OFF but with OFF as the natural state and without a negative state the way sine signals about a mid-level on a wire could cancel to give a flat line at that mid-level voltageIs synchronising signals for such a situation possible? At these sort of carrier frequencies? What sort of topics and component types does one look up when considering this?Thanks

author: Andy Chee
author_rank: Super Contributor
timestamp: February 25, 2024, 08:37:02 pm
content: Quote from: Infraviolet on February 25, 2024, 08:16:55 pmIn networking protocol language vocabulary, what you appear to be describing is indeed an optical version of a packet collision. It's an inevitability with any asynchronous wireless communication, whether it's HF packet radio, 2.4GHz WiFi or LED.QuoteCSMA/CD (or in the case of wireless networks CSMA/CA) can be implemented in your optical systems, but if you don't want to deal with that, an alternative technique (for low bandwidth data) is to use GPS synchronised time division multiplexing (TDM) i.e. device 1 transmits on the 1st second of every minute, device 2 transmits on the 2nd second of every minute, device 3 transmits on the 3rd second of every minute, etc, etc. As long as each device has a dedicated time slot, and each device knows the other devices' time slots, then you won't get any packet collision.You could potentially use a second LED master clock channel to substitute for the GPS (and a master clock generator), but this will likely interfere with your existing LED data channel (unless you can somehow arrange for a "green" LED to be received only by a "green" receiver, and "red" LED to be received by a "red" receiver, in order to separate the clock and data channels*). Another substitute for GPS for a master clock would be a clock pulse transmitted over 433MHz ISM.Note that TDM won't work with independent clocks inside multiple transmitters, because the clocks will drift relative to each other, causing the data to go out of sync.*"separate "red" and "green" LEDs are effectively a form of frequency division multiplexing, though normal FDM would be data in both channels

author: tggzzz
author_rank: Super Contributor
timestamp: February 25, 2024, 10:24:14 pm
content: This needs to be thought through in terms of networking and mobile comms technology.The scheme you mention has a carrier frequency of 1015Hz, and a bit rate of 20MHz.You assume bits are encoded as on-off-keying or pulse width modulation.You assume that the only way of detecting interference is by detecting invalid bits.You may benefit from considering different modulation schemes, and considering either CRC or DEC on frames.

author: langwadt
author_rank: Super Contributor
timestamp: February 25, 2024, 10:27:12 pm
content: what data rate?

author: Infraviolet
author_rank: Super Contributor
timestamp: February 26, 2024, 12:13:23 am
content: Data rate: unknown as yet, but likely to be in the 100s of K bits / secCarrier frequency: somewhere from 2MHz to 20MHz, with data rate definitely being <1/10th of the carrier freq

author: tggzzz
author_rank: Super Contributor
timestamp: February 26, 2024, 12:43:03 am
content: Quote from: Infraviolet on February 26, 2024, 12:13:23 amYou are continuing to confuse concepts which should be kept separate. In this case you are confusing encoding of bits for a channel with a carrier frequency.There is a lot of knowledge comms systems. Unless you learn the terminology and concepts, you are doomed to repeat history, poorly.

author: max_torque
author_rank: Super Contributor
timestamp: February 26, 2024, 04:30:08 pm
content: you could do a poor mans TDM by having all devices listen to any transmission and only start their specific transmission when the module before them has finished.ie you have say 10 modules, module 0 to module 9.Every 10 seconds module 0 transmitsModule listen, and if they read a transmission that is one module below them, they wait till that has completed then send their data.in this way you only need one master "clock" in module zero, which is effectively responsible for triggering each sequence of transmissions, then each module is triggered by the module before it.If you need duplex transmission, then of course you need to allow a timeslot for the replying data, ie a module hears a TX from the module one below it, it waits for that transmission to finish AND for any reply to that transmission to finish.Obviously, this all assumes you have either fixed length or "maximum" length transmissions so the time between bursts can be fixed (although you could use some sort of packet start / end identifiers (perhaps with byte stuffing) to allow for both variable length data and to minimise the idle time of the network

author: Infraviolet
author_rank: Super Contributor
timestamp: February 26, 2024, 07:11:39 pm
content: "you are doomed to repeat history, poorly"Any suggestions for good resources to read to avoid this? Thanks

author: tggzzz
author_rank: Super Contributor
timestamp: February 26, 2024, 08:20:24 pm
content: Quote from: Infraviolet on February 26, 2024, 07:11:39 pmMy sources mostly predate the web, and a lot of good stuff has become available since then.I foundhttps://www.amazon.co.uk/Digital-Communications-Fundamentals-Bernard-Sklar/dp/1292026065useful, but my 1988 edition is light on optical comms.One difference between optical comms and radio comms is that optical receivers are unipolar, so codes that rely on +ve and -ve symbols won't work. That reduces the number of available codes is reduced.

author: MarkT
author_rank: Frequent Contributor
timestamp: February 26, 2024, 08:25:19 pm
content: So you want to synchronize various 20MHz signals in an area of a few metres across. Distribute this clock via coax? Or LVDS? 3m of coax has a delay of 15ns, which is significant phase error at 20MHz. So either use equal length coax runs from the clock source, or provide a way to adjust for phase error at each station.Stepping back I think this is all a bit unwieldy for 20MHz - something more like 2MHz is more likely to work well, can live with phase error, and more types of LED and photodiode will be available that work ok at that speed. Beware LEDs with phosphor (white), many phosphors have long time constants.If the emitters can be chosen to match 50 ohms you can simply power the LEDs over that coax from a central driver, but they would all be modulated the same. Otherwise you'd have to combine the carrier signal with modulation at each emitter somehow... Hard to give more advice without more information.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 26, 2024, 08:54:26 pm
content: Could you not just send a coded message with an address that'll be ignored (or not) by other recievers?So global and local commands. Like IR remote control schemes??

author: Andy Chee
author_rank: Super Contributor
timestamp: February 26, 2024, 09:10:25 pm
content: Quote from: Terry Bites on February 26, 2024, 08:54:26 pmWithout taking precautions, this scheme would not work with multiple transmitters. When multiple transmitters try to talk at the same time, the received light signal will be a messed up combination of the simultaneous transmissions.