How to store the frequency of an AC controller

An area for more general discussion by the user community for topics not covered elsewhere
Post Reply
urquiza
Posts: 4
Joined: Mon Jan 06, 2020 3:48 pm

How to store the frequency of an AC controller

Post by urquiza »

Hi. I'm beginner at Arduino world, someone could help me?

I'm trying to make a project with Arduino. The project consists an IR receiver, LEDs to indicate status, IR sender, temperature sensor and push buttons. I want to press the push button and a LED light up indicating to press some button of AC controller to store it on Arduino. How can I do that? I used the post bellow:

https://www.analysir.com/blog/2014/03/1 ... s-arduino/

I used the sketch bellow to get the frequency:

https://www.analysir.com/blog/wp-conten ... als_10.txt

I got the frequency by the Serial Port, but I want to store it automatically at some variable/array after press the push button. After that I want to use IRremote library to sent the frequency to turn on AC when the temperature hits the value I pre set.

Sorry my english, I'm from Brazil.

User avatar
AnalysIR
Site Admin
Posts: 636
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: How to store the frequency of an AC controller

Post by AnalysIR »

The sketch you linked does not report the IR carrier frequency - just pulse timings.

To do that you will need a different type of IR receiver - called an IR Learner. Plus you will need to write code for it.

FYI: Most of the moules in our shop includes an IR Learner along with source firmware.

In your case, most AC signals use 38kHz, so you should be OK to use this frequency directly with IRremote using sendRAW.

Hope that helps.


PS: no issue undertanding the 'english' you posted.

urquiza
Posts: 4
Joined: Mon Jan 06, 2020 3:48 pm

Re: How to store the frequency of an AC controller

Post by urquiza »

Thanks for your answer!!

With this pulse timings I already got turn ON and turn OFF the AC using IR sender and IRremote using sendRAW, but I want to store it. Is there a way to store it? Could you give me some exemples of IR learner?

User avatar
AnalysIR
Site Admin
Posts: 636
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: How to store the frequency of an AC controller

Post by AnalysIR »

If you are just trying to control a few of your devices at home, you can simply write a sketch which contains all of the signals you need.
That is covered in the IRremote examples & we also have other posts on our blog that shows how to do that.

However, if you want to 'Learn' the signals and permanently store them on your MCU to replay when various buttons are pressed....then it becomes a bit more complicated.

The simplest way would be to use the internal EEPROM on the Arduino to store the signals (or HEX code for the signals)....but you would quickly run out of built-in EEPROM strorage.
If you need more storage space then you would have to use something like a an external I2C EEPROM. There are libraries available to support these external EEPROM and many low cost modules available from China. You just need to figure out what size EEPROM to order. As the cost is relatively low it is better to get larger capacity EEPROMs for prototyping.

I am pretty sure there are examples online of how to do this. Unfortunately, we don't have example code available for you. So your best approach is to break down your project into several different parts and implement each one in turn, before combining them into the final project. (Alternatively, searching the internet will likely find some existing examples as starting points)

For learning to work well you will also need to use an IR Learner like the TSMP58000. That way you will be able to measure the carrier frequency as well. Unfortunaltely this is not supported by IRremote, but there is some support in IRLIB2.

urquiza
Posts: 4
Joined: Mon Jan 06, 2020 3:48 pm

Re: How to store the frequency of an AC controller

Post by urquiza »

Thanks!

I'm using IRM-3638 to capture the signal. Is it works as well?

User avatar
AnalysIR
Site Admin
Posts: 636
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: How to store the frequency of an AC controller

Post by AnalysIR »

The IRM-3638 could present some issues with longer AC signals.(based on a quick read of the data sheet)

If you see any issues, then I usually suggest TSOP34438 from Vishay.

With this receiver you cannot measure Carrier Frequency. Most AC units use IR @ 38kHz (>90% but not all)

urquiza
Posts: 4
Joined: Mon Jan 06, 2020 3:48 pm

Re: How to store the frequency of an AC controller

Post by urquiza »

The fact I had already capture the signal with IR-3638 and used with IRremote and sendRAW to turn ON and OFF an AC, could I presume it works?

User avatar
AnalysIR
Site Admin
Posts: 636
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

Re: How to store the frequency of an AC controller

Post by AnalysIR »

Yes...for that AC unit.

If you want to use other units, some of them use very long signals.

So it would be ok to proceed with what you have & if you ever have a problem you could ttry the one I mentioned.

Post Reply