Notifications
Clear all

Trying to understand what i have done.

13 Posts
4 Users
1 Likes
603 Views
(@deholsapple)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

Not sure how to explain how i got to this point but here we go.

My son brought a small remote control toy to me that he claimed was not working.  He never plays with this toy but decided to tinker himself and had some pieces removed.  I am new to this hobby and thought this would be a good learning tool for me.  I decided to us a Arduino in conjunction of the toy (turn on certain leds with different remote inputs, add a distance measuring device).  When i tried to get the codes used by the remote and ir receiver, I was unable to get any codes that were useful.  I then tried to use a IR receiver that came with my Arduino kit.  The codes came through on that perfectly and i could use them to control the lights and sensor but the toy would not work. I then decided to see what would happen if I connected the IR that came with the toy to the Arduino.  It did nothing!  

Some how if the new receiver is connected directly to the pc board of the toy and the receiver that came with the toy is connected to power and the signal line connected to any pin of the arduino, everything works great.

I am confused on how the IR signal is getting to the toy when it is not hooked up to it at all.  A little help with theory behind this would be great.  I can give more info if needed and also submit pics if I can figure out how to do that.

 

Thanks All,

 

Dan


   
Quote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@deholsapple

And now I have gotten myself completely confused!

How many IR receivers are we talking about in this scenario?  How many IR remotes?  Think of the remotes as the IR transmitters and the IR receivers as, well, the IR receivers.  Makes sense so far?

In this scenario I see at least 4 devices. The IR receiver in the toy, which I'll refer to as RxA, the IR transmitter for the toy, which I'll refer to as TxA, and then the same devices from your Arduino kit (you did get a receiver and a transmitter in the kit right?) which will become RxB and TxB.

Not being aware of your knowledge of IR devices please don't misinterpret what follows as being critical in anyway.

Have you taken a look at Bill's YouTube video on using RF remotes?

Using IR Remote Controls with the Arduino

Remember that IR controls are line of sight, so if the Tx device is not pointed almost directly at the Rx sensor they won't communicate properly.  And not all IR remotes transmit the same codes.  Use Bill's video to find out if there are differences in your TxA and TxB transmitted codes.  That could be your issue, but you'll have to discover that on your own.

Does the toy already have an Arduino in it, or are you just planning on adding one.

Not sure if that helps a lot, but all I have for now.

SteveG


   
ReplyQuote
(@deholsapple)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

@codecage Thanks for getting back to me Steve.  What i have is a toy with some small controller board that takes in the IR and then controls the two motors in the toy.  I have a Arduino that I was using to do the other experiments with and to interface with the board with the toy.  When i tried to get the codes being used by the toy, I was unable to read anything useful from Rx1 and Tx1.  I then tried to get the codes from Tx1 using the same process but using a different receiver(Rx2). I was able to get the codes from Tx1 using the new receiver but when i try again on Rx1 still nothing but a random number every once in a while.  I tried plugging in Those random numbers and they do not work.

So to get the motor controller and then have control of other items IE lights and sensors, I have to have both Rx1 and Rx2 and use just one transmitter(Tx1).  The part I can not figure out is A: Why cant i get the codes using Rx1 but i can with Rx2

                                                                                                         B: How is the board on the toy getting the commands when Rx1 is not even hooked up directly to it?


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 119
 

There is an IR library at github.com/shirriff/Arduino-IRremote.   There is a sketch in there that is called

IR dump where you use the arduino as a reciever. The IRdump skectch will decode your transmitter, or at least try to. It outputs what protocol your Tx is using. 

As far as RX1 not hooked up the signal must be getting through RX2 via the IR Reciever.

 

 

 


   
ReplyQuote
(@deholsapple)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

@noweare Thanks noweare,

I have used IRremote and a few different sketches to get the codes.  I am able to see the codes coming from the transmitter that came with the toy if i use the IR receiver that didnt come with it.  Trying the same on the IR receiver that came with the to, I am not able to get any usable codes or information. 


   
ReplyQuote
(@deholsapple)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

A picture of what I have set up.

IR Test

 Don't judge the mess.


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@deholsapple

I guess I'm being dense, but I'm unable to quite follow your path at the moment!

How exactly are you interfacing the the Arduino to the toy?   Have you used Bill's IR Video to determine what codes either of the IR Remotes (Tx1 or Tx2; and I'm also going to assume your "1" corresponds to my "A" and the "2" corresponds to the "B")

Posted by: @deholsapple

When i tried to get the codes being used by the toy, I was unable to read anything useful from Rx1 and Tx1. 

Remember that you can't read anything "from" the IR receivers, they are just that, receivers, not transmitters.  But at least one working IR receiver is required to "receive" the codes transmitted from the IR remotes.

I suggest you try using the sketch Bill shows in the video to determine what codes, if any, your TxA & TxB are transmitting.

If you have to load the IRremote library that Bill refer's to in the video, don't load the latest (3.0.0) as it doesn't work with the code as shown in Bill's video.  Load version 2.2.3.  If you use 3.0.0 you will get a message in the Serial Monitor about (&results) being deprecated.  Ask me how I know! 😎  I just went back to the version Bill used (if you look real close in his video you can see it!) and it worked. I may or may not try to figure that out later.  I'd also suggest putting a "delay(500);" between the last two right curly braces "}" to give a little delay between reading button presses.  If you see a string of 8 F's that is just an indication it saw the same key again (part of why I said put in the delay).  Valid codes are 6 HEX digits with the first two being FF.  The other 4 will change somewhat for each key you press.

For my Elegoo IR Remote I get FF02FD for for the "OK" key and FF42BD for the "*" key.

Different manufacturers use different codes and your toy will most likely not function well with a different set of codes.  If you get nothing, be sure to check the battery in the Remote.

Have fun!  The best part of all of this is the fun of finding what is going wrong and fixing the problem.  You will learn a LOT more if there are issues than if everything works perfectly the first time.

 

SteveG


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@deholsapple

I see you were getting other replies while I was composing my last long winded reply and setting up my own wiring mess.

I see you are way ahead of what I was suggesting, but if the toy is working at all then the RxA must be receiving something.  My approach would be to eliminate the toy from the picture all together for now and using the TxB on your breadboard just try each Tx and see what results you get.  If the toy is responding then it has to be getting codes from its RxA since RxB is only on the breadboard.  If by some lucky chance they send the same codes.

I'm wondering if the toy Tx doesn't transmit as many codes as the one from your Arduino Kit.  Although they may just be ignoring codes they don't need!

SteveG


   
ReplyQuote
(@deholsapple)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

@codecage Thanks again.

I did try both Rx and I have been using just the remote that came with the toy.  This just started as a way to discover how these work since I have been reading all the great posts on here.  When I could not read any codes from RxA TxA combo using the Arduino and the script to find the codes, I removed RxA with no change.  That is when I decided to see if it was TxA.  I grabbed RxB that i had on hand.  I pushed the controls on TxA and was able to get the codes being transmitted by the toy remote this way.  The problem was that RxB would not activate the controller board on the toy but I could use codes to insert into a sketch that would turn on LEDs depending on what button was pushed(Forward, Back, Left, Right, Stop), using a Arduino.  Since i could not get the codes that the controller board is looking for I had to hook up RxA also.

What I ran into then is I can hook up RxB to the signal in line of the toy controller board and RxA signal to any pin or 5v rail or ground.  Im so confused on how the controller board is getting the correct signal.

IR Test 1

Sorry that my explanations are clear as mud.


   
ReplyQuote
noweare
(@noweare)
Member
Joined: 4 years ago
Posts: 119
 

I guess that narrows it down to the toy board.


   
ReplyQuote
Sumanta
(@sumanta)
Member
Joined: 3 years ago
Posts: 197
 
Posted by: @deholsapple

I am confused on how the IR signal is getting to the toy when it is not hooked up to it at all. 

I am a beginner to this topic. So please pardon me if I am wrong. According to my knowledge, remote control toys work with radio signals from the remote and not with IR signals. This was the case with my RC car. 🙂 


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1037
 

@sumanta

Not all toys, or even TV remotes, use RF as some use IR instead.  The main disadvantage of using IR is that the IR signal must have a direct path to the IR receiver.  For instance you have a toy car that if you stand behind it, and stay behind it, that you drive forwards, backwards, left, and right just fine.  But if you remain stationary and turn the car enough, either left or right, you will find that the IR receiver will no longer be able to "see" the IR signal, unless you get lucky enough the the signal reflects off of a surface and reaches the receiver.

For that reason, especially with remote control devices that move, RF is the better solution.  Your TV probably doesn't move too much, at least on its own, and when you watch TV you are most likely sitting down so IR makes perfect sense for that application.  The remote for my DirectTV receiver actually has both IR and RF capability.  It uses IR to control the volume of the TV but RF to control the functions of the DirectTV receiver.

Hope that helps.

SteveG


   
Sid reacted
ReplyQuote
Sumanta
(@sumanta)
Member
Joined: 3 years ago
Posts: 197
 

@codecage

Okay. Thanks for the information. 😀 


   
ReplyQuote