Final Year Project - control 10 aircons with Arduino

good day,
Am busy with Final Year Project - control 10 separate aircons in separate rooms (with Arduino).

i have been able to successfully send a few commands to 1 aircon with IR LED. HOWEVER, all the arduino code i have come across only uses PWM pin3 to send IR code. i need more pins or alternative ideas how to work around this in order to control all 10 the aircons.

how/ what is the best and most economical way to control all the aircons remotely as the arduino only has 1 pin used for sending IR signals.

please help to resolve, thanks.

What's an aircon?

CrossRoads:
What's an aircon?

I think it is American slang. :smiley:

SamsungACProject:
how/ what is the best and most economical way to control all the aircons remotely as the arduino only has 1 pin used for sending IR signals.

That depends to some extent on what you mean by 'remotely'.

If they're all close enough for it to be feasible to control them from a single Arduino (and you're prepared to make wired connections to somewhere with a line-of-site to the IR sensor for each one) then you could look for solutions based on the IR libraries you have already located. It doesn't sound like the thing that ought to be pin-specific and maybe it would be possible to extend the implementation to support multiple pwm output pins. Mega Arduinos have more than enough pins for what you need.

If hard wiring isn't feasible or you can't get the library working on multiple pins then you could use an Arduino per unit. There are numerous wired or wireless communication options, and you can even get Arduinos with integral wireless transceivers, which you would then control from a central master (most likely attached to a PC where the management smarts would reside).

As an American, I'm not sure what he's talking about either, but I'm guessing an Air Conditioner.

You need to include more info like, how you are controlling them remotely, and since you mention IR do you have line of sight to each of them? How does the IR control the AC? Does sending the signals to one interact with the others if they see it too?

Based on my assumptions, which I am not listing so keep that in mind, you could possibly also Mux all of the IR LEDs together and control it using 5 pins (Signal out + 4 Mux channels)

Sorry let me clarify. Here are 10 adjacent Labs each with its own Air Conditioner (AC) with 5 rooms/labs on the right side of the passage and 5 on the left. These need to be controlled (together with lights, but lets forget about the lights for now).

The main requirements are for the 10 Air conditioners to be controlled:

  1. individually with a motion sensor <ON if movement in room/OFF when no movements XX period>
  2. individually with a temp sensor in each room <so the AC will need to automatically i.e increase/ decrease>
  3. individual control--> i.e increase/decrease/OFF/ON functions for any individual AC.

To date i have used 1 x Anruino UNO, Visual Basic 2010 (to display all the temp values, control buttons ect.) and connected UNO with USB. i this way controlled one AC by using PWM Pin 3 to send IR signal with IR LED to the aircon. BUT now i'm stuck as all the tutorials only use PIN3 to control 1 AC. i need to control all 10 ACs.

i need to know what are other alternatives/ methods to control the other 9 (of the 10 ACs) remotely (even via the internet) as all need to be controlled on the same webpage/ screen.
i found visual basic to be very easy to create control buttons, display temperature, use timers and communicate with Arduino. The intention was to maybe get a mux shield, run some wires to the other rooms from the Arduino and control the ACs with IR LEDs this way.

hope this clarifies? any suggestions are welcome please.

mirith:
...you could possibly also Mux all of the IR LEDs together and control it using 5 pins (Signal out + 4 Mux channels)

thank you @ mirith
this sounds good. i have not heard or read of this before. do you perhaps have more information regarding this which i can look into to control 10 units separately?

PeterH:
If hard wiring isn't feasible or you can't get the library working on multiple pins then you could use an Arduino per unit.

@PeterH thanks,
working on multiple pins is the showstopper.
as well as the fact that i dont know how to use the single pin (3) to control all the units.

hard wiring would be best option , as 1 x Arduino per unit would be costly option for me unfortunately.

What if you use a Mega instead? Then you'd have plenty of PWM pins to support 1 pin/unit and not need any external hardware.

CrossRoads:
What if you use a Mega instead? Then you'd have plenty of PWM pins to support 1 pin/unit and not need any external hardware.

Even if all these rooms are 'close' together, I have to wonder what kind of electrical issues you will run into running wires dozens of feet and putting an IR LED on the end of it. The capacitance of the wire may slope the edges of the 38kHz square wave enough to make reception unreliable. Or it might work just fine. I dunno, just a thought.

Microcontrollers (the chips used in the Arduino) are not expensive. You could, for example, use an ATTiny85 chip (which costs less than $2/ea) at each aircon. A 10-pack of small perfboards to mount them on is not expensive either.

SamsungACProject:
1 x Arduino per unit would be costly option for me unfortunately.

You don't have to use an official board - these would typically only be used in small quantities for prototyping. There are lots of inexpensive clones available at a fraction of the cost, and various clones have additional ancillary devices integrated onto the main board which can help reduce the costs even further. For example you can get integral motor drivers, wireless transceivers, SD cards, inertial sensing devices. If you just want the basic microcontroller with the minimum hardware necessary to run then you only need to pay a couple of quid each.

If worried about signal integrity:
Run CAT5 type network cable from central processor to each.
+5, Gnd, and +/- RS485 signal. At far end, MAX488 chip to turn RS485 back into 0-5V signal to drive the LED.
Central processor then just needs a daughter card with RS485 drivers and connectors for the cables.
4mA enough to drive the LEDs?

You could build 10 hackduinos. This is a Arduino built on a perfbord with just the bare necessities. The creator estimates the cost at less then $8.00 per hackduino. Put one in each room. Each one would have its own temperature sensor, buttons to control the settings, an LCD to display the temperature setting and a way to communicate with the AC. Add some programming to switch the display to the current temperature after 5 sec.

http://hackduino.org/mapblog/?page_id=2
http://hackduino.org/mapblog/?page_id=46

http://portfolio.jmsaavedra.com/works/hackduino-project/
http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

CrossRoads:
If worried about signal integrity:
Run CAT5 type network cable from central processor to each.
+5, Gnd, and +/- RS485 signal. At far end, MAX488 chip to turn RS485 back into 0-5V signal to drive the LED.
Central processor then just needs a daughter card with RS485 drivers and connectors for the cables.
4mA enough to drive the LEDs?
http://www.digikey.com/product-detail/en/MAX488CPA%2B/MAX488CPA%2B-ND/948031

I like this idea. This would also solve your multiple units on a single pin problem too. You could use a couple of the digital pins to multiplex the output by using the RE pin on the level shifters to select a channel to send the data down.

possible 1 use the other pwm pins same way as pin3 (find where it is defined) you may use the called functions many times.
possible2 use some relays to switch for every LED, so you only use pin3 as signal output and some others to enable a single LED.
possible 3 use a demultiplexer with enable input. (watch how much amps the LED is!

possible 4 use two UNO for each side 1.

thank you all for the suggestions, i am still going through them

@PeterH & @CrossRoads for proposing the use of a Mega.
referring to (A Multi-Protocol Infrared Remote Library for the Arduino)
Ken Shirriff: "My code won't work with an Arduino mega as it has a different processor and the pins are all different. (Sorry I didn't mention that in my original article.)"

However if sending IR with pin9 of Mega was/is possible, would it make sense to

  1. have pin9 connected to multiple IR LED Anodes/+ve legs and
    2)the Cathodes/-ve legs of the IR LEDs connected to their own individual digital pin, and control each individual IR LED by switching the corresponding pin "HIGH" or "LOW".?

https://github.com/shirriff/Arduino-IRremote/blob/master/IRremoteInt.h

  • Modified by Paul Stoffregen paul@pjrc.com to support other boards and timers
  1. have pin9 connected to multiple IR LED Anodes/+ve legs and
    2)the Cathodes/-ve legs of the IR LEDs connected to their own individual digital pin, and control each individual IR LED by switching the corresponding pin "HIGH" or "LOW".?

This would add quite a capacitive load to the driving pin as you are having the IR LEDs also connected via long wires.
I would use an external driver to drive the ganged up anodes.

thanks for the help. i have now successfully tested the IR over 30Meters cat5 cable and it works OK, for now. before i start with final installation i need to pick up motion(high) and no motion(low) with ardiono using PIR motion detector (with 7 terminals not 3).
(http://www.thecrowgroup.com/Products_Systems/swan_quad/swan_quad/)

when using multi-meter and motion is detected (LED on motion detector goes on) i measure Open Cct (infinite resistance) on the 2 "RELAY" terminals & measure approx 40 Ohm when no motion is detected (LED on motion detector goes off) on 2 RELAY terminals.

does anyone know how can i use this Open Cct /40 Ohm to easily pick up (differentiate) high/ low on adrino digital input?

PS: detector has the following 7 terminals and i use external power (9V):

  1. "-V"; 2) "+V"; 3&4) "two x TAMP"; 5) "EOL"; 6&7) "two x RELAY".

SamsungACProject:
does anyone know how can i use this Open Cct /40 Ohm to easily pick up (differentiate) high/ low on adrino digital input?

Yes, you would connect the two terminals to ground and an Arduino input, and in the program set the internal pull-up.

Then monitor the input to see whether the relay was open (logic high) or closed (logic low).

hi all who contributed,
thanks for all the replies as i could not have done it without you guys.
managed to get my degree (finally).
regards,