[vc_row][vc_column width=”1/1″][vc_column_text]LinkSprite low-cost narrowband powerline communication module moves serial data over the power line network at a speed of 500 bps, and achieves the target of replacing serial cables by the ubiquitous power line network.
It can work on AC 220V/110V, 50Hz/60Hz, or DC line.
Simple MAC powerline communication module carrier module includes not only the circuits regulate 110V/220V AC, coupling circuits, and other complex peripherals, but also can provide 5V power to the user’s device. It supports a baud rate of 600,1200,2400,4800 , 9600 or 19200bps (default baud rate). It also has a TTL level interface directly with the microcontroller’s RXD, TXD connection.
Simple MAC powerline communication module provides half-duplex communication function, it can achieve local communications through 220V/110V, 50/60Hz power line . This module provides users with transparent data transmission channel, has nothing to do with the user data transmission protocol, data transmission protocol to authenticate users from positive data transmission reliability. In the same transformer, multiple modules can be connected to the same power line, in a master-slave communication mode.
[/vc_column_text][vc_tour][vc_tab title=”Basics” tab_id=”1389581257-1-98″][vc_column_text]The TXD and RXD of the module is a 5V TTL logic.
Pins A,B, and C on the module are used to select the baud rate. As the ABC three-pin defaults to an internal pull-up, default baud rate is 19200kps, other ABC baud rate configurations are in the following table:
Note: The above table represents a pick or not to pick 5V, 0 to GND.
Micro-controller module connection method is as follows (the default module baud rate is 19200):
Micro-controller serial port settings: 8 data bits, 1 stop bit, no parity bit, no flow control bit.
Note: Power lines L and N has no polarity. (Requires safety attention when dealing with 110V/ 220V power supply).
The frame length is 20 bytes. If transmitting less than 20 bytes of data, the remaining portion of package will be filled with zeros (binary value 0x00).[/vc_column_text][/vc_tab][vc_tab title=”Powered with external DC” tab_id=”1393290409854-4-0″][vc_column_text]If we are going to supply external DC to power the module, please connect to VH:
[/vc_column_text][/vc_tab][vc_tab title=”Connection between Arduino and pcDuino” tab_id=”1389581257-2-78″][vc_column_text]Now we are look at how to communicate between Arduino Uno and pcDuino through a pair of Simple MAC modules. The UART level of Arduino is 5V, so we can directly connect the UART of simple MAC module to the UART of Arduino Uno. But the UART level of pcDuino is 3.3V, we need a level shifter in between shown below:
The final setup is shown below:
[/vc_column_text][/vc_tab][vc_tab title=”Test Codes and Results” tab_id=”1389581802687-2-3″][vc_column_text]The code for the Arduino Uno is shown below:
const int led = 13; int flag=0; void setup() { Serial.begin(19200); pinMode(led,OUTPUT); } void loop() { char dat; if(Serial.available()) { dat = Serial.read(); Serial.write(dat); } else { Serial.print(“www.linksprite.com\r\n”); delay(2000); if(flag==0) { flag=1; digitalWrite(led,HIGH); } else { flag=0; digitalWrite(led,LOW); } } }
The code for pcDuino end is as below:
#include <core.h> int flag=0; void setup() { Serial.begin(19200); printf(“linksprite!:\r\n”); } void loop() { if(flag==0) { Serial.print(“pcDuino!\r\n”); printf(“Data is send!\r”); } else if(Serial.available()) { printf(“%c”,Serial.read()); } }
By using the above sample code, we are making pcDuino and Arduino exchange data.
[/vc_column_text][/vc_tab][vc_tab title=”Appendix” tab_id=”1389581850893-3-3″][vc_column_text]
- SimpleMAC has a 5V output pin. It can supply power to other devices.
- The signal level of UART of SimpleMAC is 5V.
- The frame size of simpleMAC is 20 bytes. If more than 20 bytes are transmitted, please split the data.
- User Manual of the simpleMAC module
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
August 26, 2014 at 10:22 am
Hi Alvin, maybe you can help me. It happens that I bougth some of this modules and tried myself to put them to work using two circuits based on the AT Mega Microcontroller that uses the Arduino UNO and till now I did not have success. The basics of my test is that the circuit number 1 send some characters to the second one and the second one turn on a LED in the number 13 pin. If I conect back to back (tx-rx and rx-tx pins in both sides) the circuits everything runs as I described. The same scenario using the narrowband plc modules it never works. I wonder if there is some special treatments. For example I am confused with the specs, in one side it tells that its transmiting at 500 bps and in other side it tells that can reach the speed of 19200. Is there some more detailed info I can review or there is some advise from you ?
Thanks in advance
October 20, 2014 at 3:46 pm
You said connect to VH, what exactly should be connected there? Voltage from the arduino or the DC voltage?