Avatar for arthurmoises

arthurmoises

Member since Apr 2017 • Last active May 2017
  • 0 conversations
  • 3 comments

Passionate Electrical Engineer, aiming to improve the field by adding some computation to "IT".

Most recent activity

  • in ESP8266
    Avatar for arthurmoises

    Hi Wilberforce! Thanks for the reply!

    I've saw this tutorial, and I have the setup for using 2 pins, but I ask if it's possible to do the IR Transmission by using just one pin (discarding the carrier part of 38kHz, and just outputting the signal, in the 38kHz frequency, but for the time required to represent the 0's and 1's).

    If it's impossible (due to the event loop and timing approach), I'll switch to the approach on the link that you shared, using two GPIOs and two transistors.

  • in ESP8266
    Avatar for arthurmoises

    Hi stephaneAG and Gordon!

    I've became very interested in both of your approaches. I've studied a little about IR Transmission and found those great resources:

    ece.ucsb.edu/Faculty/rodwell/­Classes/ece2c/labs/Lab4_2C_2009.pdf

    ti.com/lit/an/slaa644b/slaa64­4b.pdf

    remotecentral.com/features/ir­disp3.htm

    http://forum.espruino.com/conversations/­297428/

    I don't know how, yet, but I've managed to output 38kHz wave using

    analogWrite(D13, 1, {freq: 38000});
    

    on my Wemos D1 Mini.

    Using the IRReceiver module, I could even see the binary data printed on the console terminal.

    I was wondering if it's possible to implement only one port to create an IR transmitter. I've already soldered a prototype PCB with a TIP 122 and 4 IR LEDs in parallel (nothing serious, that I can't add another transistor later), but for the sake of the high optimization (I intend to get better each day with Javascript), I will continue with the quest of only using one uC port.

    By reading those resources above, I found that the IR Transmission protocol that I'm implementing (or trying to do reverse engineering...) uses ASK Modulation, by the variation of the "on" pulse width to differentiate between zeros and ones.

    So, a "ON" signal must have 48x 38kHz pulses and 24x off pulses (which I can just extend the 48º time length to cover that area, saving array space) and an "OFF" signal must have 24x 38kHz pulses and another 24x off pulses (which again I can extend the time duration of the 24º pulse, so I can save space on the array)

    I've tried to do this, but got "Out of memory" limitations. I'll try to use your examples here to try to create an array "on the go" or iterate through lots of "digitalPulse" calls, in a for loop, so I don't need to use arrays.

    Thanks a lot for your colaboration!

    EDIT: Finished paragraph.

    EDIT2: Changed the mistyped "380000" to "38000" in code snippet.

Actions