We received our ESP8266 NodeMCU several months ago it has been difficult to find a working example of Hardware PWM to generate crisp Infrared carrier signals. Most posts we have read suggest that there is no PWM readily available on any of the supported platforms. As we have already shown with Arduinos and the Particle Photon we figured it would be possible to use a spare UART pin on the ESP8266 NodeMCU to achieve our goal. After some initial success we encountered some watchdog timeouts/resets and it seemed like the uPWM hack would not be possible on the ESP8266 Node MCU platform. For a few weeks we ‘parked’ the effort and today we decided to try again with all of the latest and updated firmware available from the ESP8266 community via the Arduino IDE. This time we were successful and the ESP8266 NodeMCU Backdoor uPWM Hack for IR signals using works!
One of the most popular projects involving Infrared remote control, is to use an Arduino to control an Air conditioner (AC) system. However, AC signals are usually very long and take up a lot of SRAM on a standard Arduino. Experienced users will go about reverse engineering the AC protocol to make the sketch fit within the 2K Bytes of SRAM. Many hobbyists will struggle, even with the help of tools like AnalysIR to guide them. In this post we cover sending long AC Signals from Flash with IRremote. IRremote (along with IRLib) is a popular open-source library for sending and receiving IR remote control signals with Arduino. The demo code covered in this sketch extends our previous sendRAW example by demonstrating how to store many long AC signals in Flash with little or no SRAM overhead.
A few months ago a new user to AnalysIR, from Canada, asked us to assist in adding ESP8266 NodeMCU Infrared decoding over WiFi into AnalysIR. We set about making some upgrades to AnalysIR for this and in double quick time he had AnalysIR accepting IR signals from the ESP8266 over WiFi. He stressed the ease of use of the support within the Arduino IDE for ESP8266 devices and he wasn’t kidding. This motivated us to go and order an ESP8266 for US$3.60 including shipping from Aliexpress. Just the other day the NodeMCU arrived, presumably delayed somewhat by the extended XMAS holidays & celebrations, in this part of the world. So we set about porting our existing firmware for Arduino & Photon over to the new device.
ESP8266 NodeMCU now joins a growing list of devices supported for use with AnalysIR, including: Continue reading ESP8266 NodeMCU Infrared decoding added to AnalysIR
In this blog post we follow up on our recent article about generation of infrared PWM from the Photon’s UART where we suggested that it may be possible to achieve something similar with the Arduino. In our previous attempt the Arduino was only able to generate PWM at 40 kHz and 33 kHz using the same approach. After some investigations we discovered a new approach which provides an even better set of results using the Arduino’s USART. Yes, we were able to generate 30, 33, 36, 38, 40 , 56 and surprisingly the illusive 455 kHz which was not possible on the Photon (using this approach). Read on for the details. Readers should also study our original series of articles on ‘softPWM‘ for a better understanding of the source code which can be downloaded below.
Since we received our Photon several months ago it has been difficult to find a working example of Hardware PWM on the Photon. Initially, we ported our softPWM approach to the Photon, which is excellent. However, we figured it must be possible to use at least one of the spare UARTs on the Photon to achieve our goal. So first we started prototyping on the Arduino and quickly got a working example with some limitations – only 40 kHz and 33 kHz carrier frequencies were possible with the UART without delving into the registers a bit more. Then we moved the code over to the Photon, leveraging our previous softPWM examples, upgraded with the Arduino code – EUREKA! The Backdoor uPWM Hack on Photon for Infrared signals.
The sixth and last member of our first MakeIR series of devices & kits is BeamIR the Infrared Light Barrier. This pair of modules is based on an Infrared Light Barrier system with a range of additional applications. In addition to Light Barriers, BeamIR can also be used to deliver solutions involving Security projects, Lap Timers, Laser Tag – invisible trip wire, Photography, Photo Interrupter, Reflective sensors for hand dryers, towel or soap, Dispensers, water faucets, toilet flush, Vending machine fall detection, Virtual ‘fence’, CNC wireless Probes, Security and pet gates, Person or object vicinity activation. BeamIR is built with only the highest quality IR components available and includes constant current drivers, noise suppression circuitry and visual indicators on signal lock.
We have provided a link below to the preliminary product data sheet and would welcome feedback on additional, nice to have or missing features, if any. Please read the data sheet for a more detailed description of the A.IR shield. Continue reading Preview: BeamIR the Infrared Light Barrier
In Part 1 of this series, we demonstrated how to send signals using soft or Simple Infrared PWM on Arduino. In our Part 2 post we looked at sending RAW IR signals – specifically a RAW NEC signal and a longer RAW Mitsubishi Air Conditioner signal using soft PWM. We have since improved the PWM method shown in Part 1 Part 2 to provide better performance and improve portability. In this Part 3, we will take the signals from Part 2 and show how to send them using their binary (or Hex) representation, which can save lots of SRAM in many projects, particularly when dealing with longer AC signals.
We are often asked on discussion boards, about conflicts between IRremote or IRLib and other Arduino Libraries. In this post, we present a sketch for ‘Simple Infrared PWM on Arduino’. This is the first part in a 3 part series of posts. Part 1 shows how to generate the Simple Infrared PWM on Arduino (AKA carrier frequency), using any available IO pin and without conflicting with other libraries. Part 2 will show how to send a RAW infrared signal using this approach and Part 3 will show how to send a common NEC signal from the binary or HEX value.
Our recent post about the silver bullet IR receiver proved very popular and we promised that we would follow-up with another variant of the poor maker’s Infrared receiver. This time we are using an IR Led (emitter), 2 resistors and any standard Arduino. You will also need to download the Arduino code provided below, compile and upload it. One of the most common problems encountered when trying to decode IR signals is that makers don’t always have the appropriate IR receiver for the job in hand or have to wait for one to be delivered by mail. Here we present an affordable method to allow you to use any IR emitter (LED) as a receiver and as a bonus we are publishing the Arduino code to make it all work.
Many electronics enthusiasts will be familiar with how Infrared receivers demodulate IR signals. In this post we show a visualisation of the time lag and distortion of the signals as they pass through the IR receiver for demodulation and noise filtering. Most DIY projects use the raw timings from the IR receiver to decode individual signals. However, not many will be aware that IR receivers can distort the signal timings by significant amounts. Fortunately, common IR decoders take this into account and compensate for timing distortions introduced by infrared demodulators / receivers.