can i transmit a square wave generated by pic mcu using a led and photo transistor ?

Discussion in 'Embedded Systems and Microcontrollers' started by Layan_AK, Apr 28, 2017.

  1. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    hi guys ..

    I am using pic microcontroller to generate a square wave with a frequency depends on a temperature which is read from lm35 sensor.

    so i need to transmit the square wave wirlessly.
    can i do that using a led and photo transistor ?

    Regards
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    15,911
    4,668
    What distance do you want to transmit over, it is commonly done short distance using matching TX/RX pair.
    What frequency?
    Max.
     
    Layan_AK likes this.
  3. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    any distance can do what i need :)

    1khz-45khz
     
  4. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,013
    1,033
    Could one quarter of an inch, be far enough?
     
  5. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    if it is the max distance ,yes :)

    it is just a task which a doctor asked if it is possible to do :)

    regards
     
  6. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,013
    1,033
    oh, I see.....you were talking to a doctor......and he asked you if you can send a square wave wirelessly.

    And you thought you would ask here.

    Are you going to call the doctor and get the needed information?

    You are not going to get any answers.........without lots more info.

    The distance..............whatever you think that means..............can never be "any distance".

    So after the distance figure.......we need the specs on the sensor output............and the power available at the sensor location.

    Now...............depending on that info........there could be more questions.

    AND.....if this is for medical use.........it should be certified. That is a whole different ballgame.

    There are experts on this forum that are quite capable of such certifications. However......they can not work on second hand info.

    The doctor will have to fully explain the wanted application.
     
    absf and Layan_AK like this.
  7. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0

    thanks a lot for your reply :)

    it is just a project for measurements laboratory and only need to see the output on the oscilloscope ^_^
    regards :)
     
  8. absf

    Senior Member

    Dec 29, 2010
    1,850
    505
    And what we used to call "doctor" in our uni is actually our "professor".:p:D
     
    Layan_AK likes this.
  9. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,013
    1,033
    Have you got your pic set up to where you get a different blink rate with a change in temperature?
     
    Layan_AK likes this.
  10. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    In my country we call him a doctor :D:cool::rolleyes:
     
  11. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    I wrote a program to generate a square wave with frequency =1300*T. where T varies 1C each step in range (0<T<=30)
    T>30 or T=0 the output always low :)
    eg;if T=1 C >> f=1300 hz
    if T=10 C >> f=13khz ...

    I tested the program and it worked fine ..
    but the prof :) asked if we can transmit the square wave wirlessly using a LED :)

    REGARDS
     
  12. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,013
    1,033
    Sorry Layan.....your last post really confused me. And I believe that we use the same words differently. I don't believe that I understand what it is.......that you are doing......or trying to do.

    I will back off and see if someone can help you. Good luck with your doctor. I hope that I didn't confuse you.
     
    Layan_AK likes this.
  13. Layan_AK

    Thread Starter Member

    Mar 28, 2017
    76
    0
    thanks a lot :)

    the doctor need to reflect the temp as a frequency :)
    I dont why ^^
     
  14. John P

    AAC Fanatic!

    Oct 14, 2008
    1,719
    254
    I wonder if the doctor is the same doctor as the one in "Can i exchange data between two pics using Led ?"
     
    atferrari likes this.
  15. JohnInTX

    Moderator

    Jun 26, 2012
    3,340
    1,671
    I believe so and will lock them both pending clarification from them.

    EDIT:
    New member was using 2 names and will continue as Layan_AK. This thread addresses the same basic problem as this one:
    https://forum.allaboutcircuits.com/threads/can-i-exchange-data-between-two-pics-using-led.134767/
    but with different approaches that warrant keeping both to avoid confusion.
     
    Last edited: Apr 29, 2017
    Layan_AK likes this.
Loading...