Author Topic: EEVblog 506:IR arduino How to get code into arduino  (Read 1504 times)

0 Members and 1 Guest are viewing this topic.

Offline BeaminTopic starter

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: us
  • If you think my Boobs are big you should see my ba
EEVblog 506:IR arduino How to get code into arduino
« on: March 21, 2018, 03:47:42 pm »
So I can't figure out how he gets the code sequence into the Arduino. Does that Salaea logic program https://youtu.be/BUvFGTxZBG8?t=18m44s  take the code he recorded and put it into the Arduino sketch? How does it do that?
I understand the video up to this part.

Or did he write out the pattern into the sketch? Wouldn't this mean you would have to use a line of code for each on/off pulse:
pin1 on 10ms
pin1 off 100ms
pin1 on 5ms
etc etc That seems the wrong way to do it.
Max characters: 300; characters remaining: 191
Images in your signature must be no greater than 500x25 pixels
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #1 on: March 21, 2018, 05:46:45 pm »
https://gist.github.com/EEVblog/6206934

He hardwired a single 32 bit code - defined at line 14.

This is just the bare guts of a general purpose program.  Many more codes would need to be decoded somewhere and included into the Arduino sketch.
 

Offline BeaminTopic starter

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: us
  • If you think my Boobs are big you should see my ba
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #2 on: March 21, 2018, 09:38:17 pm »
https://gist.github.com/EEVblog/6206934

He hardwired a single 32 bit code - defined at line 14.

This is just the bare guts of a general purpose program.  Many more codes would need to be decoded somewhere and included into the Arduino sketch.

So he figured out that model remote and found sample code? So then how did the first person get the sequence? Did they sit there with an IR detector and scope and count each pulse? Is there a way to record and play back like on those 3 in one "learning " remote controls through the scope?

The remote that come with the generic Arduino is amazingly bright. I hooked a sensor to a simple transistor circuit and could get the LED to blink with the remote bouncing off two walls at a distance of 50' or so. Are our eyes just not that sensitive to color LED's or are they just not that bright?
Max characters: 300; characters remaining: 191
Images in your signature must be no greater than 500x25 pixels
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #3 on: March 22, 2018, 02:30:31 pm »

So he figured out that model remote and found sample code? So then how did the first person get the sequence? Did they sit there with an IR detector and scope and count each pulse? Is there a way to record and play back like on those 3 in one "learning " remote controls through the scope?

The remote that come with the generic Arduino is amazingly bright. I hooked a sensor to a simple transistor circuit and could get the LED to blink with the remote bouncing off two walls at a distance of 50' or so. Are our eyes just not that sensitive to color LED's or are they just not that bright?

Once you know which 'family' of IR remote you have, it is pretty easy to buy an IR receiver and hook it up to a uC (Arduino will probably work well) and trap the codes versus button pushes.  This type of thing has been done for quite a long time and Google will probably turn up a lot of projects.

Like this: https://learn.adafruit.com/using-an-infrared-library/hardware-needed

There are a few different protocols and apparently the Arduino library knows how to detect them.

We can't see IR at all.  If the transmitting device is truly IR, we won't see it.  However, we can use our cell phone cameras to see it - same with other digital cameras.

A simple photo sensor is not a good substitute for an IR receiver.  Among other things it won't be looking for the 38 kHz carrier.
 

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #4 on: March 22, 2018, 04:40:32 pm »
Here's a short video that walks you through it. I hate videos that "ought" to have a voiceover but don't, but this one at least gives you captions that should allow you to extract codes from an arbitrary remote.

 

Offline BeaminTopic starter

  • Super Contributor
  • ***
  • Posts: 1567
  • Country: us
  • If you think my Boobs are big you should see my ba
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #5 on: March 24, 2018, 11:05:56 pm »

So he figured out that model remote and found sample code? So then how did the first person get the sequence? Did they sit there with an IR detector and scope and count each pulse? Is there a way to record and play back like on those 3 in one "learning " remote controls through the scope?

The remote that come with the generic Arduino is amazingly bright. I hooked a sensor to a simple transistor circuit and could get the LED to blink with the remote bouncing off two walls at a distance of 50' or so. Are our eyes just not that sensitive to color LED's or are they just not that bright?

Once you know which 'family' of IR remote you have, it is pretty easy to buy an IR receiver and hook it up to a uC (Arduino will probably work well) and trap the codes versus button pushes.  This type of thing has been done for quite a long time and Google will probably turn up a lot of projects.

Like this: https://learn.adafruit.com/using-an-infrared-library/hardware-needed

There are a few different protocols and apparently the Arduino library knows how to detect them.

We can't see IR at all.  If the transmitting device is truly IR, we won't see it.  However, we can use our cell phone cameras to see it - same with other digital cameras.

A simple photo sensor is not a good substitute for an IR receiver.  Among other things it won't be looking for the 38 kHz carrier.

Its like a metal box with a metal cross over the sensor bit. About the size of a power transistor but a little smaller. Think it has three leads.
Max characters: 300; characters remaining: 191
Images in your signature must be no greater than 500x25 pixels
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: EEVblog 506:IR arduino How to get code into arduino
« Reply #6 on: March 25, 2018, 08:43:25 pm »

Its like a metal box with a metal cross over the sensor bit. About the size of a power transistor but a little smaller. Think it has three leads.

That's not enough info.  We would need a part number, picture and link to datasheet.

38 khz IR receivers are pretty common and they usually look like a plastic transistor

https://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/TSOP38338/751-1388-ND/1768190

56 kHz IR receivers are also available but read at the link above.

https://www.digikey.com/product-detail/en/vishay-semiconductor-opto-division/TSOP4856/TSOP4856-ND/4074483
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf