i am using multiple IR sensors (TSOP1738) on the same Arduino Uno Board.
whenever i test the connections i end up getting inputs from both the sensors, pin11 and pin12, when any one of them is connected.
when pin12 is connected, i observe input on serialMonitor for both the pins.
when pin11 is connected, i see some output for a while, but nothing after that.
i tried using two objects of decode_results, it didn't work.
i have attached the code below.
please let me know where i am going wrong.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Write code for ONE ONLY IR unit, get it working.
Then think about adding the second.
Can you tell us your electronics, programming, arduino, hardware experience?
All input from the last activated input pin goes into a common buffer. You can not have multiple pins active at the same time. Multiple objects also won't help, because they use the same input buffer.
Why do you need multiple IR sensors? Eventually you can tie their outputs together, to one input pin, if that is what you want.
DrDiettrich:
All input from the last activated input pin goes into a common buffer. You can not have multiple pins active at the same time. Multiple objects also won't help, because they use the same input buffer.
Why do you need multiple IR sensors? Eventually you can tie their outputs together, to one input pin, if that is what you want.
Im trying to operate my room's electrical appliances, putting them all on one arduino Uno card.
i want them to operate separately.
i thought of using more than one arduino cards but that will spike the cost.
Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Write code for ONE ONLY IR unit, get it working.
Then think about adding the second.
Can you tell us your electronics, programming, arduino, hardware experience?
Thanks.. Tom..
i attempted running the same with only one sensor at first, i worked perfectly.
but when i started attempting to do the same with more, things didn't workout.
DrDiettrich:
Different codes can be transmitted for different commands. On a remote control you can have multiple buttons, each of which sends a specific code.
yes. that would work for one room.
if i want to extend this to other rooms as well, then using the same remote for sensor in different rooms, integrated on the same arduino Uno R3 card.
is it possible?
i really don't want to increase the cost of the project by buying more uno cards.
is there any possible way to use multiple IR sensors on the same board?
3-pin IR sensors have open collector outputs, so (a few) sensors can be connected in parallel, and connected to one Arduino input. Even different frequencies and/or different locations.
Leo..
DrDiettrich:
If you use the same codes for every room, you need one controller for each room, which can activate the actuator corresponding to a code in this room.
i understand that, but i am concerned about receiving signals from those actuators (3-4) onto the same board.
DrDiettrich:
Actuators don't send signals, they are output devices. Where do your inputs come from?
a signal will be sent from an IR remote to the IR sensor placed at a electric appliance (fan).
once received, it should be processed.
now, this processing would be done on one arduino Uno R3 which should then perform action on the related appliance ( at the moment, i'm just turning on and off a LED to act as a light ).
the arduino uno performing this processing for one IR reciever in one room, is to be processing inputs for another room as well.
how should i program the whole setup so that a single arduino, to handle inputs from 2-3 room's IR receiver?