IR 38Khz frequency out

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
pmulvey
Posts: 16
Joined: Sun Jul 29, 2018 8:12 am
Location: Athlone, Ireland

IR 38Khz frequency out

Post by pmulvey » Wed Aug 15, 2018 9:05 am

The Arduino (ATMega 328) has a timer register that can be preloaded and set to pulse an I/O pin on overflow so that a 38KHz output waveform is generated outside of program control. Has the ESP8266 anything like this? Bit banging with micropython is not fast enough I'm sure.
Paul Mulvey

User avatar
pythoncoder
Posts: 3449
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: IR 38Khz frequency out

Post by pythoncoder » Wed Aug 15, 2018 9:19 am

I have doubts whether the ESP8266 could do this as it's prone to latency issues and the frequency needs to be quite stable. But you could experiment.

The Pyboard should cope easily.
Peter Hinch

User avatar
mcauser
Posts: 379
Joined: Mon Jun 15, 2015 8:03 am

Re: IR 38Khz frequency out

Post by mcauser » Wed Aug 15, 2018 11:44 am

I haven’t tried it but hotplot on github says you can generate a 38 kHz signal in hardware by configuring the MTMS pin as the I2S clock signal and setting the frequency appropriately.

Platformio code example here:
https://github.com/hotplot/BlastIR/blob ... r_send.cpp

User avatar
pythoncoder
Posts: 3449
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: IR 38Khz frequency out

Post by pythoncoder » Thu Aug 16, 2018 8:16 am

Clever ;) I'd go with that solution.
Peter Hinch

pmulvey
Posts: 16
Joined: Sun Jul 29, 2018 8:12 am
Location: Athlone, Ireland

Re: IR 38Khz frequency out

Post by pmulvey » Thu Aug 16, 2018 11:08 am

Has anyone implemented this method in micropython?
Paul Mulvey

Zolee
Posts: 13
Joined: Thu Jul 27, 2017 12:09 pm

Re: IR 38Khz frequency out

Post by Zolee » Thu Mar 28, 2019 7:41 pm

Arduino code for esp8266:
https://github.com/markszabo/IRremoteESP8266
Tested with wemos d1 mini. It works!

Post Reply