Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Power Line Communication for Home Automation

Status
Not open for further replies.
okay., can u pls help me in working out this.. actually, i was interested in working out in this and so only asked all those... so, can u pls send ur project proposals to me?? It ll be very useful for me if u send those... thanks in advance:)
 

Actualy I am still facing problem on the project.
I am using the circuit in the datasheet--> **broken link removed**
Page 15 Figure 15.
But the problem is I don't know how to reduce the data sending speed from the microcontroller (PIC16F877).
I am using UART to transmit and receive.
This is my code:

//==========================================================================
//==================inckude=================================
#include<pic.h>

//===============configuration==============================
__CONFIG (0x3F32);

#define send1 RB0

#define _XTAL_FREQ 20000000

//==============FUNCTION PTOTOTYPE=========================
void uart_send(unsigned char data);
void long_delay(unsigned short i);

void main()
{

char uart_scode = 0b10111;

unsigned char data[6],dat;
unsigned short i;
TRISB = 0;
TRISC6 = 0;
TRISC7 = 1;
PORTB = 0;
PORTC = 0;
SPBRG = 129;
BRGH = 1;
TXEN = 1;
TX9 = 0;
RX9 = 0;
SPEN = 1;
CREN = 1;

send = 0;

while(1)
{

//SEND START BIT
uart_send(uart_scode);
send1 =!send1;
__delay_ms(10000);
}



void uart_send(unsigned char data)
{
while(TXIF==0);
TXREG=data;
}

I suspect it has something to do with the oscillator. Because in the circuit I am using crystal 7.68MHz but in the program I am using 20MHz. But I changed it before and it doesn't help.
 

connect the board to hyperterminal and see what data it is sending., and is it sending correct and proper data??? then you will judge if baud rate is correct or not................
 

I connected the tx pin of my PIC16 to oscilloscope and it shows the data sent is correct... I use the oscilator from tda to drive the pic16 (just like in the datasheet). I wonder it will affect the baud...
 

you could as well connect pic UART to PC and see the data on terminal... that would at least tell if the baudrate in the program is correct or not........
 

try to send some character from the program through UART... connect the UART to hyperterminal and set 9600 as baud rate and see if terminal prints the character properly or not.. if not then change the baud rate and keep trying till you get the character right on the terminal.. thats the baud rate set in the program for your crystal oscillator settings....
 

THIS IS MY CODING FOR THE RECEIVER SIDE:

//==========================================================================
//==================include=================================
#include<pic.h>

//===============configuration==============================
__CONFIG (0x3F32);

#define receive RB0

#define _XTAL_FREQ 20000000

//==============FUNCTION PTOTOTYPE=========================
void uart_send(unsigned char data);
unsigned char uart_rec(void);
void long_delay(unsigned short i);

void main()
{
unsigned char data[6],dat[6];
unsigned short i;
TRISB = 0;
TRISC6 = 0;
TRISC7 = 1;
PORTB = 0;
PORTC = 0;
SPBRG = 129;
BRGH = 1;
TXEN = 1;
TX9 = 0;
RX9 = 0;
SPEN = 1;
CREN = 1;


//send = 0;
receive = 0;
//error = 0;

while(1)
{

for(i=0;i<=5;i++){
dat=uart_rec();
}

__delay_ms(10000);

if(dat[0]=='O')
{
if(dat[1]=='N')
{
if(dat[2]==' ')
{
if(dat[3]=='L')
{
if(dat[4]=='E')
{
if(dat[5]=='D')
{receive=!receive;}
}
}
}
}
}
for(i=0;i<=5;i++){
dat=0;
}
}


__delay_ms(10000);


// send =!send;

}






unsigned char uart_rec(void) //receive uart value
{
unsigned char rec_data;
while(RCIF==0); //wait for data
rec_data = RCREG;
return rec_data; //return the received data
}

==================================================================


The code I write is to light up LED at RB0 when the data is receive.
But the weird thing is even I never connect the transmitter, the LED will blink.
And even I connect the LED to other output pin like RB1 or RB2, they will blink as well.......

I am not sure what is the problem pls help!
 

another question: If i were to use tda5051a which i think it receives x10 commands (am i right?), is that mean i need to convert the pdu data received into x10 command using the uC and send it to the tda5051a. the question is do i need to program the tda5051a or it will automatically function as shown in the table below:

The TDA5051A will neither understand, nor process X10 commands. If you wish to implement X10, the easiest way would be to use a PL513 interface at the transmitter end (fed by a microcontroller, say a PIC, which in turn connects to your GSM receiver).

For each receiver you would then need a TW523 which is a transmitter+receiver. This again would need to be connected to a PIC to process the data it receives.

Advantage being you would never be working directly on the mains, only logic levels, so you'd be spared the actual mains interfacing part.

Incidentally, if you do use a PIC, the compiler Picbasic Pro has built-in commands for X10; XIN, XOUT. Would make things pretty easy.

Regards,

Anand Dhuru
 

Hi ard,
I am not implementing X10 anymore. I just want to send a series of 8bit binary code through power line without following the X10 commands. I wonder anyone successfully implement tda5051a before because it is too sensitive i guess. It is SMD type IC. I have to fab the pcb and solder on it... Plus the information provide in the datasheet is very limited. I am quite regret to choose the IC.
 

You could still use X10 with the setup I described above; X10 allows you 16 unit codes, and 16 house codes. So, you could still transmit an 8 bit number.

Anand Dhuru
 

Yes... I know I can use x10 format.... But if my receiver can not even receive a simple 8 bit number correctly then what's the point I use x10 format?
 

Hi to all!! I am new to this forum..

I have a simple project about power line communication. It is just used to remotely switched two devices connected as load. But what i am concern of is the standards concerning power line communication. I know the right frequency, but i dont know maximum amplitude of the signals allowed. It is never mentioned on cenelec standards i have read so far. Is there someone here have an idea? Thanks!
 

Hi...everybody! I am currently working on the power line communication final year project also. My project also is home automation.
PC==>power line modem 1
Powerline modem2==>PIC==>home appliances
Please feel free to comment or give me any extra idea about the project ya.Thanks
 

i think power line communication should be involved as well since it is to control home appliances which are connected to home electrical system.

btw...where can we purchase this TDA5051A in malaysia as i am planing to do a powerline based project....thnx

---------- Post added at 05:04 ---------- Previous post was at 04:57 ----------

Hi ard,
I am not implementing X10 anymore. I just want to send a series of 8bit binary code through power line without following the X10 commands. I wonder anyone successfully implement tda5051a before because it is too sensitive i guess. It is SMD type IC. I have to fab the pcb and solder on it... Plus the information provide in the datasheet is very limited. I am quite regret to choose the IC.

is this project done by yours completed???....im from malaysia as well need your experience to guide me...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top