Shop OBEX P1 Docs P2 Docs Learn Events
Converting Propeller project to work with Fiber Optic cable — Parallax Forums

Converting Propeller project to work with Fiber Optic cable

ryfitzger227ryfitzger227 Posts: 99
edited 2014-05-22 22:25 in Propeller 1
Hello everyone.

I'm getting very close to finishing my timing system project, and I have came across another issue that I have gotten confused on.

My timing system works by connecting to an infrared (a Multi Beam Sensor by Banner Engineering) using a pin from the propeller. The propeller uses waitpne & waitpeq to wait for one infrareds beam to break which gets the value of CNT, and then wait for another infrared's beam to break to get another reading of CNT and then the difference of the two values are used to find the elapsed time. The way the two infrareds are connected now are by using two separate pins and regular wire. What I need to do is somehow convert this to a simplex (one strand) fiber optic cable. I sat around for days thinking of a way to get this to work, and did a little research. Since I need to somehow use a one strand fiber optic cable for two infrareds I had to somehow convert their signals into data. I thought maybe I could use a one wire serial I/O expander for this. I've never used one of these before and my research just brought me to it, so I'd like a little input on how to use this. I was looking at something like the MAXIM DS2408. But then I would also need something on the other end of the fiber optic to convert the data to power that will then connect to the two separate pins on the timing propeller. I figured I could just use another propeller for this.

Here's a little diagram (because I'm not good at explaining things).

diagram.jpg


I feel like I could get this to work very easily with two propellers (one to receive and convert the data and the other to replace the DS2408 or other I/O expander), but I felt like having a whole propeller just monitoring two sensors and then sending the status to another was a little overkill. I dont know, maybe the propeller on the other end that is converting the data into power is overkill too and there is another IC that could work for this.

Fiber Optics are still very new to me and the I/O expanders are even newer. I could be completely off on what to do in this case. Also, since this is a conversion I cannot do anything to Propeller 1. It's board has already been made and is working with regular wire.. The whole point of this is to figure out a way to connect fiber optic to this board (through an adapter board that I will make). Any input or ideas?

Hope this makes sense.. If you have any questions, just ask.

Thanks.
- Ryan
500 x 250 - 622K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-05-21 15:59
    Why not use a set/reset flip-flop. The first beam interrupter would set the FF; the second, reset it. Then all you'd have to do is measure the width of the single resulting pulse coming down the fiberoptic cable.

    -Phil
  • Clock LoopClock Loop Posts: 2,069
    edited 2014-05-21 16:17
    The DS2408 is a 1-wire device, which communicates back to its host. (bi-directional communication) You cannot do this with a fiber optic link with only 1 fiber inside it. Most fiber optic transceivers are actually made up of two separate fiber wires built into a single strand, of which each transciever has a tx emitter, and a rx detector inside the unit. These are also prohibitively expensive (go to digikey and search "fiber transceiver".)

    If you want to use a single fiber wire, then you will need to do something like Phil suggests, where the fiber signal only goes one way, from multi-beams, TO propeller ONLY.
  • ryfitzger227ryfitzger227 Posts: 99
    edited 2014-05-21 18:41
    Clock Loop wrote: »
    If you want to use a single fiber wire, then you will need to do something like Phil suggests, where the fiber signal only goes one way, from multi-beams, TO propeller ONLY.

    This was originally my plan. I thought the DS2408 did that.. I guess I misunderstood the meaning of 1 wire. Thanks for letting me know that!

    Is there any I/O expanders that are just one way communication? I don't even need an output for this case, so if there is such a thing of just an input expander, could that work?

    Phil,

    I think I understood your idea correctly.. What you're saying is use the first beam to light the transmitter and then the second to turn it off - then measure the time the transmitter LED was on for the time. If that's correct then it can't work that way. There are multiple timers all running on separate cogs. I have to know what each individual infrared's status is. Otherwise it won't start/stop the right timers. For example. Infrared 1 stops timer 1, but starts timer 2. Infrared 2 stops timer 2 only (Timer 1 was started on another "bundle" of 2 sensors). If I didn't quite understand, please clarify.

    Since this timing to 1 microsecond is important, I'm trying to stay away from 2 microcontrollers. I would then have to account for the overhead of the microcontroller at the sensors and also the overhead for the propeller at the end of the fiber optic. Not to mention, it brings up the cost of the project (there are a total of 7 bundles of infrareds).

    - Ryan
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2014-05-21 20:58
    There are ways to do 2 way on a single fiber .

    allmost every BPON and GPON FiOS connnection is single fiber . ( looks in my closit )

    Also I did some R and D on LEDs as sensors and as transmitters on a Plastic fiber connection .
    Forrest Mimms did a thing a Long time ago about LEDs as sensors and was the basis of my old project .
    You can use water clear LEDs as RX and TX if you use some crafty logic Tristate buffers and some way to prevent collisions .
  • ryfitzger227ryfitzger227 Posts: 99
    edited 2014-05-22 03:34
    I can get duplex fiber optic fairly cheap ($250 for 1000'). I don't think this would be too big of a change and it could be done. Would an I/O expander with a propeller work now? Or is there an easier alternative?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-05-22 11:11
    Any I/O expander will have to be addressed to capture the proper inputs. But the addressing overhead will completely shatter any hopes of getting microsecond resolution in the times. It sounds like you will need a direct interface to each detector to get that kind of precision.

    -Phil
  • Clock LoopClock Loop Posts: 2,069
    edited 2014-05-22 18:08
    Forrest Mimms did a thing a Long time ago about LEDs as sensors and was the basis of my old project .

    You mean like this?
    >:D
    
    http://www.youtube.com/watch?v=A22i5l_zHo4
    http://forums.parallax.com/showthread.php/154191-MimsMirrorZero-and-MimsMirrorOne-(it-blinks-rgb)

    Using LEDS as a transmitter/receiver is somewhat a specialty of mine. I also made the BlackBox use leds as detectors.
    http://forums.parallax.com/showthread.php/114131-TheBlackBox-v2.0-Propeller-HSS-Fx-Sequencer-has-LEDS-as-buttons-amp-indicators.

    The problem with using LEDS as recievers, is the detection time is wayyyy too slow for any really fast communication.
    But if you look at my MimsMirror Zero/One video, you can see its faster than the typical human reaction time.
    I wouldn't doubt that some LED voltage "priming" could be done to speed up the detection a bit, along with a really bright emitter cycle.
    But the timing of most leds as detectors today is much more than 1ms, i dont know the exact timing, each led differs.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-05-22 21:14
    Hello everyone.

    I'm getting very close to finishing my timing system project, and I have came across another issue that I have gotten confused on.

    My timing system works by connecting to an infrared (a Multi Beam Sensor by Banner Engineering) using a pin from the propeller. The propeller uses waitpne & waitpeq to wait for one infrareds beam to break which gets the value of CNT, and then wait for another infrared's beam to break to get another reading of CNT and then the difference of the two values are used to find the elapsed time. The way the two infrareds are connected now are by using two separate pins and regular wire. What I need to do is somehow convert this to a simplex (one strand) fiber optic cable. I sat around for days thinking of a way to get this to work, and did a little research. Since I need to somehow use a one strand fiber optic cable for two infrareds I had to somehow convert their signals into data. I thought maybe I could use a one wire serial I/O expander for this. I've never used one of these before and my research just brought me to it, so I'd like a little input on how to use this. I was looking at something like the MAXIM DS2408. But then I would also need something on the other end of the fiber optic to convert the data to power that will then connect to the two separate pins on the timing propeller. I figured I could just use another propeller for this.

    Here's a little diagram (because I'm not good at explaining things).

    diagram.jpg


    I feel like I could get this to work very easily with two propellers (one to receive and convert the data and the other to replace the DS2408 or other I/O expander), but I felt like having a whole propeller just monitoring two sensors and then sending the status to another was a little overkill. I dont know, maybe the propeller on the other end that is converting the data into power is overkill too and there is another IC that could work for this.

    Fiber Optics are still very new to me and the I/O expanders are even newer. I could be completely off on what to do in this case. Also, since this is a conversion I cannot do anything to Propeller 1. It's board has already been made and is working with regular wire.. The whole point of this is to figure out a way to connect fiber optic to this board (through an adapter board that I will make). Any input or ideas?

    Hope this makes sense.. If you have any questions, just ask.

    Thanks.
    - Ryan

    Isn't the timing between the two sensors important? Why don't you just have a carrier for each and mix into the one fibre one way? You could just use a tiny 8-pin PIC for the modulator or even some type of FSK/ASK type chip etc. Down the receive end you can filter out the two signals and the good thing is that they are being received simultaneously. I have used all kinds of LEDs for sensors but you should use PIN photodiodes for the speed and sensitivity but it is possible to use regular infrared leds for the transmitter.

    I don't know how you came by the DS2408 but it really has nothing to do with this nor does it look suitable, especially for timing.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-05-22 21:56
    For 1 usec resolution, you'd need to modulate carriers in the 10 MHz range. Is that feasible?

    -Phil
  • kwinnkwinn Posts: 8,697
    edited 2014-05-22 22:09
    How about using 2 leds or laser diodes with different wavelengths and filters on the receiving end to separate them.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-05-22 22:25
    I didn't see that 1us resolution anywhere until you mentioned it Phil :)
    Why is it that these exacting projects are undertaken with nary a clue by many?
    Idea: If all sensors are in receive mode when they are not sending then send synch signals from the master to the sensors so that they can correct their timing and then start an absolute count from that signal. The sensor timings are not sent in real time but they are captured in real time and buffered so that when the master polls them with simple asynch then they can respond and send their timing as a long, perhaps packetized. The speed of this transmission can be well in keeping with the limitations of the medium and the method used. I don't know why fibre "needs" to be used as this distance is covered quite well by RS485 anyway.
Sign In or Register to comment.