Offline
Newbie
Karma: 0
Posts: 9
|
 |
« on: September 30, 2012, 03:07:46 pm » |
Hi all, i am starting a project that i develop android apps to control a remote dimmer through arduino board. however, the signal must pass through the arduino board, it also need a RS-232 port to connect a RS-232 wireless controller and the controller control the remote dimmer. a few questions to wait any suggestions. do i need to buy a arduino wifi shield? could the board do the above opeartion at the same time? actually i am new to arduino. please give me any suggestions or ask more about the project. 
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #1 on: September 30, 2012, 08:16:10 pm » |
To go from phone to Arduino, you could use Blue Tooth, wifi shield, or Ethernet shield with Cat 5 cable.
You can connect a Max232 chip to Arduino to get RS232 output.
The Arduino can most likely do what you need with time to spare. We need more specifics to give more specific information.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #2 on: October 01, 2012, 12:16:57 am » |
To go from phone to Arduino, you could use Blue Tooth, wifi shield, or Ethernet shield with Cat 5 cable.
You can connect a Max232 chip to Arduino to get RS232 output.
The Arduino can most likely do what you need with time to spare. We need more specifics to give more specific information.
origianlly the remotre dimmer can be controlled by a remote control(it transmits signal through zigbee), the remote control need to link up with a remote dimmer before using a sort of functions. it can set on/off and also the brightness of the light now i want the android apps replace the functions of remote control. if i need to do so, i suppose to use a set of devices (android phone >> arduino board as a platform to transmit the signal from wifi to RS-232 and send out to a RS-232 wireless controller>> remote dimmer so how could i solve this problem? or wt information you need to know abt this project?
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #3 on: October 01, 2012, 12:54:54 pm » |
suppose to use....android phone Through a home network, or over the web? transmit the signal from wifi Do you have a wireless router hooked to a home network? RS-232 and send out to a RS-232 wireless controller Do you know what messages need to be sent for the wireless controller to work? Just to let you know, this project requires a fair bit of work. The forum can help you but, you need to be the one to provide effort, show your code, show hardware information, and ask specific questions for you to make progress on your project.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 14
|
 |
« Reply #4 on: October 08, 2012, 09:12:32 pm » |
Hi, I just posted a way to do this using a windows phone, no app required, so it should work with the android. The Arduino doesn't need to be connected with a wifi shield. I used the wireless router in the house, just an ethernet shield and a cable. The Arduino serves up a webpage and then it runs the x10 which do the dimming. So, you access the web page from the android and click the buttons. I have put 'dim and brighten', along with a number of x10 on/off command buttons. The thing about x10, you have to select a specific address and then send an on, then you can dim/brighten. Here is the video link. I posted the code in a previous post. http://youtu.be/0a1vkSB2LQYRegards, Walt,
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #5 on: October 14, 2012, 09:44:50 am » |
Hi, I just posted a way to do this using a windows phone, no app required, so it should work with the android. The Arduino doesn't need to be connected with a wifi shield. I used the wireless router in the house, just an ethernet shield and a cable. The Arduino serves up a webpage and then it runs the x10 which do the dimming. So, you access the web page from the android and click the buttons. I have put 'dim and brighten', along with a number of x10 on/off command buttons. The thing about x10, you have to select a specific address and then send an on, then you can dim/brighten. Here is the video link. I posted the code in a previous post. http://youtu.be/0a1vkSB2LQYRegards, Walt, i got your point, but i think it doest work in my project, because i need to assume that there will have 2 or more lighting dimmer to connect my android phone through arduino board, if i change the shield as Ethernet, capacities will be the problem. in my project, i got some idea now, i used the serial device tester,software, to send hex to the RS232 wireless controller, it's work! i can turn the light on and off and also the brightness. but some fuctions do not function. ( i will show it later) so, in other word, i need the arduino board to send out hex(should it be byte?) through serial port. i will keep trying my work. all guys could share your ideas here  ah... another question, is it possible to directly connect my arduino uno r3 board TX and RX and gnd pin to RS232 serial port pin 2,3 and 5?
|
|
|
|
« Last Edit: October 14, 2012, 10:34:05 am by 011345687 »
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #6 on: October 14, 2012, 04:35:43 pm » |
ah... another question, is it possible to directly connect my arduino uno r3 board TX and RX and gnd pin to RS232 serial port pin 2,3 and 5? You need a max232 chip for that. A link for example: http://sodoityourself.com/max232-serial-level-converter/
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #7 on: October 14, 2012, 09:56:03 pm » |
so i cant directly wire up those of pins of TX, RX and GND?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #8 on: October 14, 2012, 09:56:31 pm » |
so i cant directly wire up those of pins of TX, RX and GND? and why?
|
|
|
|
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #9 on: October 14, 2012, 10:19:42 pm » |
The voltages of RS232 are different and sometimes higher. Look on this page about the middle area where it talks about voltages. http://en.wikipedia.org/wiki/RS-232
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #10 on: October 15, 2012, 01:46:06 am » |
how abt the device has the input voltage of 5V? 
|
|
|
|
|
Logged
|
|
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #12 on: October 15, 2012, 06:35:54 am » |
how abt the device has the input voltage of 5V? With no datasheet, I can not say much. However, I think the 5V part is referring to the charging voltage of the battery.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #13 on: October 22, 2012, 10:13:33 am » |
i tried to directly wire up from arduino to RS-232 ( yea seriously). and I try to write a program.
unsigned long = dimmerON = 0x02FF400D; // i tested those of hex (02 FF 40 0D) can be turned on the remote dimmer by serial device tester unsigned long = dimmerODD = 0x02FF000D; // and this hex can turn off the remote dimmer
void setup() { Serial.begin(9600); }
void loop() { if (Serial.available () == 0) { Serial.print ( dimmerOFF,HEX); }
if ( Serial.available () == 1) { Serial.print (dimmerON, HEX); } }
i tested this program and i watched the status from the serial monitor, it kept print the value 2FF000D repeatedly while i send 1 to the monitor, it changed the value to 2FF400D but still repeatedly and i tried to send another num to monitor, it stopped.
how come the value keep looping, how can i send hex once only?
however i tried the above step after i connected between TX,RX and GND of arduino board and 232port 2,3,5 pin. i sent 1 out , i could see the monitor that showed the hex of 2FF400D, but the remote dimmer didnt turn on. what's the problem here?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 12
|
 |
« Reply #14 on: October 27, 2012, 03:16:03 am » |
i tried to directly wire up from arduino to RS-232 ( yea seriously). and I try to write a program.
i tested this program and i watched the status from the serial monitor, it kept print the value 2FF000D repeatedly while i send 1 to the monitor, it changed the value to 2FF400D but still repeatedly and i tried to send another num to monitor, it stopped.
how come the value keep looping, how can i send hex once only?
however i tried the above step after i connected between TX,RX and GND of arduino board and 232port 2,3,5 pin. i sent 1 out , i could see the monitor that showed the hex of 2FF400D, but the remote dimmer didnt turn on. what's the problem here?
Reference the serial.available() function: http://www.arduino.cc/en/Serial/Available . Serial.available() returns the number of data bytes available. In your code the statement if (Serial.available () == 0) means that every time there are 0 bytes available to read, Serial.print ( dimmerOFF,HEX); will be executed. What you want to do is test for when Serial.available() > 0 and then read the byte from serial. You can then have an if statement, or switch statement to determine what should happen when a given byte is received.
|
|
|
|
|
Logged
|
|
|
|
|
|