winterhunter
New Member
Hi everyone,
I'm currently building a small SCADA for my house, using a computer as supervisor and connecting it to a PIC via the serial port.
The first step will be to control the air conditioners (I have two in my living room).
I have tested the PIC and it does communicate successfully with the computer, and also can control one A/C perfectly. However, I have two EMC problems, and I wanted to get your opinions:
1) I use PWM at 38 kHz to control the A/C. I multiplex the CCP output using a 74HC00 to be able to selectively control one, the other or both A/Cs. This goes to a 7 m cable that feeds both power and signal (+5V,GND, PWM output) to an NPN transistor controlling an IR LED. However, the A/Cs don't recognize the IR commands (they do when I don't use the cable).
Is there a simple fix for this?
2) In the final configuration, I will be placing the PIC around 10 m away (make that 15 m of cable) from the computer. I've read somewhere that this is pretty much the limit for RS-232, and was thinking of using RS-432. On the µcontroller side, the PIC won't even notice if I replace the MAX232 for a MAX488. However, can I use a MAX488, suitably connected to the computer serial port to "translate" back to RS-232?
Thanks a lot!
I'm currently building a small SCADA for my house, using a computer as supervisor and connecting it to a PIC via the serial port.
The first step will be to control the air conditioners (I have two in my living room).
I have tested the PIC and it does communicate successfully with the computer, and also can control one A/C perfectly. However, I have two EMC problems, and I wanted to get your opinions:
1) I use PWM at 38 kHz to control the A/C. I multiplex the CCP output using a 74HC00 to be able to selectively control one, the other or both A/Cs. This goes to a 7 m cable that feeds both power and signal (+5V,GND, PWM output) to an NPN transistor controlling an IR LED. However, the A/Cs don't recognize the IR commands (they do when I don't use the cable).
Is there a simple fix for this?
2) In the final configuration, I will be placing the PIC around 10 m away (make that 15 m of cable) from the computer. I've read somewhere that this is pretty much the limit for RS-232, and was thinking of using RS-432. On the µcontroller side, the PIC won't even notice if I replace the MAX232 for a MAX488. However, can I use a MAX488, suitably connected to the computer serial port to "translate" back to RS-232?
Thanks a lot!