Serial Communication

RS232, RS485, USB, UART, USART, SCI, Ethernet.

Written by Lim Siong
Boon, last dated
13-Nov-09.

Topic Discussion Overview

  1. Communication
  2. Understanding
    USART & RS232
  3. RS485 Interfacing
  4. RS232
    & RS485 signal analysis
  5. Ethernet wiring
  6. WiFi wireless
  7. USB Interfacing
  8. Power Line Communication
  9. SPI
  10. I2C
1. CommunicationCommunication is essential in electronics system. It can be in
the form of wired or wireless, serial or parallel. The main idea is to
transfer information from one system to another system. Communication
in one direction is call a simplex communication system, and duplex
means communication is in both direction at the same time. Half duplex
means that communication is taking place in both direction but only one
direction communication is taking place at any one time.Communication takes place when the information that are sent
is able to be understand by the receiving device. The receiving side
must be able to interpret what message the sender is trying to tell.
Communication between electronics devices usually deals with logic 1s
and 0s. A high pitch sound may indicate a logic 1, while a low pitch
tone may representation logic 0. With the receiving device having this
common understanding, it will be able to understand what information
the transmitting device is trying to convey. Beside using tone as the
mean of signaling, the medium can be in other varying form for example,
frequency, voltage, color, smell, wavelength, etc… A typical
electronic system uses the concept of voltage or frequency. The choice
of signal varies. Voltage/frequency changes can be produced and
detected using simple electronics, so it is relative a easier type of
signal to implement. The information from the sender can be in the form
of voltage. By detecting the voltage, the receiving device is able to
interpret the information. The common understanding or interpretation
of both the sending and receiving device is known as the communication
protocol. The information conversion to a suitable transmission signal
is also known as encoding. Decoding is the other way round. There are
more complex choice of signal transmission but we will not touch on
those area.

In today’s wired communication system,  there are a wide
variety of serial communication standard from RS232, RS485, USB, CAN,
and many more. They are simply the standard defined for communication
hardware. It is the hardware setup for the transmission of signals,
define as the physical layer. Physical layer deals with the choice of
signaling in order for communication to take place. It can be voltage
level or frequency as mention earlier. The speaker and the ear in the
diagram can be interpret as a physical layer for transmitting the
information. Without this physical layer, sound cannot be produce or
received.

Some idea of
wireless communication.This traffic system is
trying to send information to you by signaling green yellow red colored light using visual
means.If you can understand the
information that the hand is trying to show you, wireless communication
is taking place.

Sound transmission
through air medium is another example of wireless communication.

The examples above illustrate
a simplex system, where message is convey in one direction. Information
travel from one system to another, but not the other way round. Ear is
not meant to produce sound while speaker are not design to listen. This
illustrate a simplex system.

Some form of wired communication.


Telephone network (Duplex)

This is a simple simplex
system illustration. The left side is the switch system, which consist
of a mechanical switch moving up and down. The state of the switch can
be easily recognize by the bulb system on the right. The switch
movement is communicated to the bulb which will lights up. The
communication medium is the pair of transmission wire. This simple
circuit demonstration how wire can be use for communication purpose.

Transmission of information using 0V and 5V is simple, but it
can represent only 2 state (or 2 distinct information). Not much
information can be convey using signal with only 2 state. There is also
a limit to the number of voltage level allowed. Defining more discrete
voltage level can represent more information but the signal on the
receiving side could be easy misinterpret due to noise and attenuation.
A new dimension of representing more data can be in the form of time
multiplexing. By coding a signal in sequence, more information can be
send. A 0V followed by a 5V may represent ‘A’. 5V followed by 0V may
represent ‘B’, 5V followed by another 5V may represent ‘C’ and so on.
The size of information that can be transmitted is going to be endless.
This form of signal representation in sequence is used in serial
communication. It is the most commonly use communication method adopted
by various standard USB, RS232, RS485, Ethernet, etc.Communication using logic 1 and 0 is quite simple but seems
far away from the information system we have today. In handle such a
complex information, the data is actually encoded further and further
to a  higher protocol level. This will keep the forming of
information simple and easily managed from various level. It is like
printing dots to form alphabet, arranging alphabets to form word,
forming up words to become a sentence, and forming sentences to tell a
story. The information will be getting more and more meaningful.
 
Protocol is just like a common language that system uses to
understand the data. A Chinese language has a totally different
protocol from an English language. Until we learned the protocol,
communication will still not be possible although human have the same
speech capability (our speech capability can be thought as the physical
layer). Although Malay language  uses the same alphabet “A to Z”
as in English alphabets, the higher forming protocol is still quite
different.In the world of electronics voltages or frequency defines the
logic, forming a sequence of logics to form a data byte. These string
of byte consisting of typical 8 bits, may represent data or control
character. With these common understanding between the two system in
place, application will be able to communicate with one another.

In today’s complex communication, protocol can be interpret in
terms of layers namely physical layer, data link layer, network layer,
transport layer, session layer, presentation layer,
application layer. You may like to read up other website for more
information on this
communication model
.

Communication layer is a very abstract theory, when I was
first expose to the term. If you are still not clear on data layer, the
best thing is to hands-on and built a communication system from
scratch, sending useful data bit by bit. You will be more aware of how
the whole system works and get to understand why data communication
people keep on talking about the layer stuff.

In this article, various serial communication interface USART
are presented. They are TTL version of the serial communication,
represented by 5V / 0V. It is similar to RS232 physical format
represented by -/+10V in the voltage.

USART is not design for distance communication. To enable
longer communication distance, USART signal will need further encoding
into RS232 signal format before transmission. Other common names for
USART (Universal Synchronous Asynchronous
Receiver Transmitter) are UART or SCI (Serial Communications Interface). Serial
data in TTL format is the very basic serial communication interface to
understand.

The articles present common solution in communication between
USART, RS232, RS485 and USB.

 

 

 

www.pic-control.com, Singapore Network Ethernet WiFi RS232 RS485 USB I/O Controller

 
2.Understanding
USART & RS232
USART stands for Universal Synchronous Asynchronous
Receiver/Transmitter. It is simply a form of serial data communication.USART is very common, and a clear understanding can easily
lead you to other form of interfaces. The following article will
present the interfaces from USART to RS232, RS485 and USB.

The article presented focus on the practical aspect of USART
and RS232. For technical details, I would strongly recommend the
following website from beyond logic,


http://www.beyondlogic.org/serial/serial.htm

 Microcontroller
and PC communication using RS232
RS232 is the encoded version of USART. The encoded signal
allows the data to be deployed for longer communication distance. Some
article may have define a maximum communication distance of 15m for
RS232 signal. You can try pulling the communication distance further,
it should still works actually. 15m is only a general guideline.If the data transmission rate is low, the distance can even go
further. There have been reports from the internet that some user have
achieve 50m to 200m without any problem. For me, I have tried baud rate
of 9600bps over 100m without any problem. For baudrate 115000bps over
20m, you might start to encounter transmission error. Baudrate is
presented in bps (data bits per second). The higher the value the more
the data can be transmitted in a given time period. The higher the
speed, the shorter the communication distance.

As what I experience, the data transmission length of the
cable can determine by many factors. The factors include the following,

– data
transmission speed

– quality of the
cable, noise (unwanted signal)

– transmitted
voltage

– receiver
sensitivity

– etc…

We have to remember that electronics are still analog in
nature. Communication distance using RS232 can be increase further if
the cable is of better quality, a shield or coaxial cable for example.

The most significant factor is still the data transmission
speed. The following is a reference that I found in one website
regarding the relationship between data baud rate and cable length.

Baudrate Distance
19200bps 15m
9600bps 150m
4800bps 300m
2400bps 900m

 


http://www.lammertbies.nl/comm/info/RS-232_specs.html

The transmission cable should be twisted as a pair for your
+ve & -ve (or ground/reference signal). The reason for having it
twisted is to ensure that the pair of wire is as close to each other as
possible. Why? This is because the signal energy (or refer as
integrity) is contained between the +ve & -ve wire. Any gap between
the two wire can result in signal distortion (losses). The gap
represent a change in the cable impedance (capacitance/inductance)
affecting the signal integrity on the wire. Electromagnetic, it is
about how the field interact with one between the gap.

I had once wiring up two RS232 communication line without
using twisted wire. In order to save the trouble to lay another set of
cable, I tried to squeeze the two RS232 line to the cable. It end up
with a lot of communication problem. The data I send on com1 is able to
trigger the devices connected to com2. The signal on com1 is actually
coupled over to com2, causing com2 to think that some data is being
received. The data is the corrupted version of the data from com1.

The higher the frequency, the worst is gets. This is also why
our network CAT5e CAT6 cable are all twisted inside, protected by
aluminum foil shield. No sharp bending should be allow, as this will
cause the twisted pair to open up a gap in between. A typical cable
bending radius as specify in the manufacturer datasheet is about
25-50cm. All this details comes into the picture when your
communication speed is high. I see many contractor laying the network
cable without any of these consideration. The effect is negligible, for
low speed communication. Most of us might not even realized it too,
because minor transmission error is already resolved through the TCP/IP
protocol. A coaxial cable is a better form of cable structure to
contain the integrity of the signal. The energy is contain on the
dielectric, between the inner conductor core and the outer wire mesh.

RS232 Connection

 

Pin

Function

1

Carrier

2

Rx

3

Tx

4

DTR

5

Gnd

6

DSR

7

RTS

8

CTS

9

Ring

DB9
male socket on DTE (data terminal equipment), example: a computer.

Pin

Function

1

Carrier

2

Tx

3

Rx

4

DTR

5

Gnd

6

DCR

7

CTS

8

RTS

9

Ring

DB9
female plug on DCE (data communication equipment), example: a modem.

Pin

Function

1

DSR

2

Carrier

3

DTR

4

SG

5

Rx

6

Tx

7

CTS

8

RTS

RS-232D is defined as RS232 being
terminated with the RJ45
plug. They are used on
cisco network switch equipment for command control input, and also on
RS232 to Ethernet server for Lantronix products. The advantage of RJ45
compare to DB9 is the size. More ports can be connected to the
equipment with a much smaller panel interface.

Going back to our RS232…..

Loop Back RS232 Connector


Short
Pin 2 to Pin 3 (if no hardware control)


see the
following diagram, Loop Back Plug (for hardware control RS232
communication)

The loop back
connector is useful in troubleshooting communication problem. Data
being sent out to the line is being echo back to the equipment,
indicating that the communication connection is working fine. It also
indicates that the equipment communication is working.The loop back can be deploy on the various point within the
communication line to pin point any communication fault due to
equipment or communication line.
Null Modem(show picture of a null modem cable, data being transmitted
from one direction to another)
 
RS232 Interfacing
Circuit

MAX232 IC and schematics


Click here for MAX232 datasheet

MAX232 circuit layout
reference.

Note: Input pin
11, 13 can be left unconnected. There is a internal pull-up resistor,
pulling pin 11 to 5V and pin 13 to 0V

The physical communication standard defines the signal voltage
of -10V for logic ‘1’, and +10V for logic ‘0’. However in practise, the
voltage can be ranging from +/-3V to +/-25V. Not to worry if the
measured voltage is not +/-10V. Typical receiver is able detect the
incoming signal with voltage as low as +/-3V.A microcontroller like PIC16F877a uses USART (5V system). The
PC (personal computer) that we have in the office/home uses the
standard RS232. To enable a microcontroller to communicate with the
computer, a RS232 to TTL converter is required.

IC chip maker has come up with the integrated circuit for
interfacing RS232 with TTL logic (5V for logic 1, 0V for logic 0),
making the interfacing work very simple. MAX232 is one of the many IC
in the market which helps to convert between RS232 -/+10V and TTL +/-
5V. It is a simple voltage level converter in short. The charge pump
design allows the circuit to generate +/-10V from a 5V supply, with the
help from the four capacitor. With charge pump to double up the supply
voltage for RS232 transmitter, there is no need to design a power
supply for +/-10V.

The diagram on the left shows the schematic of the MAX232 IC
circuit. It consist of only 4x 1uF 16V electrolytic capacitor, and the
MAX232 IC itself. It is that simple. I have include a layout which I
always use for PC to PIC16F877a microcontroller, RS232 interface.

MAX232 alternative:
LTC1386

MAX232 (3.3V version):
MAX3232

 

  
  
  
Coming article,- How to test the communication line.

– Software programming using serial com.

Software for debugging RS232 communication.
Window
OS HyperTerminal
(from WinXp)
  For WinXP user, Click>> Start>>
Programs>> Accessories >> Communication>>
HyperTerminal.exe
Docklight_Scripting.zip
Virtual Serial Ports Emulator.zip (ETERLOGIC.COM)
emulator allows you to
Connector – create
a virtual com port which can be opened twice. Allows two application
program to communicate to each other via the same serial port number.
Data Splitter – create a virtual com port which allows multiple application to share a single existing com port.
Pair – Create 2x
new virtual com port which is cross connected to each other. (A null
cable). Allows two application program to communicate with each other.
Mapper – Remap a
physical com port to another com port number. Useful for old software
which does not allow com port number to be changed.
TcpServer – convert
a physical com port to a TCP port as a server, so that multiple client
can be connected and access to the physical com port.
TcpClient – convert a physical com port to a TCP port as a client. If connection is lost, this client will auto reconnect to the server.
Serial Redirector – connects up between to com port. (A null cable)
UDP Manager – convert a physical com port to a UDP port as a server, so that multiple
client can be connected and access to the physical com port.
Bridge – Connects up two data stream.
Spy – VSPE device to spy on a data stream.Other Software Tools
BillSerialMonitor.zip
EZTerminal.exe
RS232HD30.exe
RS232 data logger.exe


COM Inspector (detects serial communication settings)
   

reference source:


http://www.simplecomtools.com

 

Tool for RS232 or UART TTL testing
usb rs232
USB to RS232 converter.
usb uart
USB to UART converter
usb uart
USB to UART converter
  
 Using Andriod phone as a terminal to test out serial communication.
andriod otg uart rs232

Andriod mobile device, OTG, USB to UART, USB to RS232
otg cable
OTG cable
andriod uart
andriod otg rs232

A OTG cable is required to connect the USB to UART or RS232 device.
Not all USB to UART, or USB to RS232 converter can be used with Andriod device. This is due to the built in driver available.As of 27 Mar 2014, these are some of the USB to Serial converter chipset that can be used with the Andriod devices.
PL2303HXD, PL2303EA, PL2303RA, PL2303SA, FT312D, FT311D
(PL230 3HXA and PL2303XA are not supported)
andriod otg uart
 
free usb serial term andriod apps

Using a free andriod apps “USB Serial Terminal Lite”.
Once
the OTG and USB to UART converter is plugged to the andriod device, the
andriod will automatic detect and attempt to launch the “USB Serial
Terminal Lite” apps.Click on the icon phone, to make a connect
to the USB-UART device. There should be no error when it is connected,
and the phone icon will turned into a ‘X’ icon.To test if the
USB UART is working properly, make a loop back connection by shorting
the Tx and Rx pin. This loop back means that whatever data you send
will be return to the device as data being received. Your device is
able to receive what it sent out. This loop back test is important. It
indicate that the device is able to send out data, and is also able to
receive data. For USB to RS232, short pin 2 and pin 3.

Click
onto the text field on the bottom of the apps. Key in and ascii data,
and click on the send button on the right (logo of an arrow pointing
right). Immediately after you click on the send button, you should be
able to see on the display screen, the same text that you
have sent. If you disconnect the loop back connection, you will
not be able to see the text that you have sent.

This apps is
good. It can display the data in hex, which is used very often in
hardware development work. There are also memory which allows you to
save frequet sent data.

www.pic-control.com, Singapore Network Ethernet WiFi RS232 RS485 USB I/O Controller

 
3. RS485
Interfacing

MAX485 schematics

MAX485 IC and schematics

Click
here for MAX485/MAX488 datasheet

Click
here for MAX3485/MAX3488 datasheet

MAX488 IC and schematics

 

Microcontroller
interface using RS485 & RS422
After a period of research, I found out that RS485 and RS422
is in fact the same.RS422 is a duplex configuration. RS422 using 4 wire to
communicate in both direction. One pair of wire to do transmit and the
other pair to receive. Both sides is able to transmit and receive at
the same time.

RS485 is a half duplex configuration. RS485 using only 2 wire
to communicate in both direction. With only two wire, it means that
when one side is transmitting, the other side of the communication line
will be receiving. Both side cannot be transmitting at the same time.
For RS485 transceiver, use MAX485 or MAX3485. They have the same pin
out except that MAX485 uses 5V supply, MAX3485 uses 3.3V supply.

RS422 can be connected to work with RS485 to either receive or
transmit date, but not both. RS422 can be wired directly using a pair
of wire, +ve to +ve, -ve to -ve terminal. For RS422 transceiver, use
MAX488 or MAX3488. They have the same pin out except that MAX488 uses
5V supply, MAX3488 uses 3.3V supply.

MAX485 pin

Alternative pin label

Terminal A (+)

Y, TX+, RX+, TX1, RX1

Terminal B (-)

Z, TX-, RX-, TX2, RX2

for Part no. Volt Speed (Kbps)
RS485 MAX485 5V  
RS485 LTC1480 5V  
RS485 SN65HVD10 5V  
RS485 SN65HVD11 5V  
RS485 SN65HVD12 5V  
RS485 SN75HVD10 5V  
RS485 SN75HVD11 5V  
RS485 SN75HVD12 5V  
RS485 SN75176 5V  
RS485 ST485 5V  
RS485 SP481 5V  
RS485 SP483 5V 250
RS485 SP483 5V  
RS485 SP485 5V  
RS485 DS75176 5V  
RS485 SP1485 5V  
RS485 SN65HVD3082 5V 200
RS485 SN65HVD3085 5V 1000
RS485 SN65HVD3088 5V 20000
RS485 SP3082 5V 115
RS485 SP3085 5V 500
RS485 SP3088 5V 20000
RS485 DS3695 5V  
RS485 DS3696 5V  
       
RS485 MAX3485 3.3V 1200
RS485 MAX3483 3.3V 250
RS485 MAX3486 3.3V 2500
RS485 SP3494 3.3V  
RS485 LTC1480 3.3V  
RS485 ST3485 3.3V 12000
RS485 ISL3072 3.3V 250
RS485 ISL3075 3.3V 500
RS485 ISL3078 3.3V 16000
RS485 ISL3172 3.3V 250
RS485 ISL3175 3.3V 500
RS485 ISL3178 3.3V 20000
RS485 ISL83483 3.3V 250
RS485 ISL83485 3.3V 10000
RS485 ADM3493
(Diff from SP3493)
3.3V 250
       
RS422 MAX488 5V  
RS422 SP490CN-L 5V  
RS422 SP3081 5V 115
RS422 SP3084 5V 500
RS422 SP3087 5V 20000
RS422 LTC490 5V 2500
RS422 SN75179 5V  
RS422 DS8921 5V swapped pin5,6  
RS422 UA9638C 5V swapped pin5,6 20000
       
RS422 MAX3488 3.3V 250
RS422 MAX3490 3.3V 12000
RS422 SP3071 3.3V  
RS422 SP3490 3.3V 10000
RS422 SP3493
(Diff from ADM3493)
3.3V  
RS422 ADM3071 3.3V 250
RS422 ADM3074 3.3V 500
RS422 ADM3077 3.3V 16000
RS422 ADM3493 3.3V  
RS422 ADM3488 3.3V 250
RS422 ADM3490 3.3V 10000
RS422 ISL3171 3.3V 250
RS422 ISL3174 3.3V 500
RS422 ISL3177 3.3V 20000
RS422 ISL83488   250
RS422 ISL83490   10000
RS422 SN65HVD30 3.3V 26000
RS422 SN65HVD31 3.3V 5000
RS422 SN65HVD32 3.3V 1000
  check out and update for
MAX3491
MAX3490
MAX3076
MAX3077
MAX3073
MAX3074
MAX3070
MAX3071
   

MAX488 alternative (pin8+,pin7-pin6+,pin5-,5V, version):

 


twisted pair wire (with shielding)

twisted pair wire (without any shielding)

Notice the gap between a normal pair of wires. By twisting the
cable, the gap can be reduce, therefore minimizing the interference.

 

Unlike RS232 signal, RS485 implements
differential voltage as the physical signal to communication. More
information on the physical RS485 signal is illustrated in the next
section. The cable for RS485 or RS422 works as a pair to transmit and
another pair to receive. This is important, because it means that the
cable need to work as a pair in order to transmit the signal properly.
Proper type of cable is required.

The picture on left is a twisted pair wire. It is
recommended to use twisted pair cable to transmit RS485/RS422 signal.
The reason being twisted wire can help minimize the gap between the 2
wire, therefore minimizing interference and signal distortion. This can
be explain through the electromagnetic theory. The gap or loop between
the two wire actually acts as the antenna intercepting nearby signal,
as well as coupling it’s own signal to wire next to it. These results
in distortion in the signal, and ultimately reduces the data rate you
can transmit over the wire pair. The twisted cable also maintain a
distance, make it difficult for another wire to slip in between the
wire pair. For further immunity against interference, the twisted pair
is wrapped with aluminum foil acting as a shield.


http://www.lammertbies.nl/comm/info/RS-485.html

Note that you should deploy twisted pair on a
signal wire pair. You can consider one wire as signal while the other
one as reference or ground. If the twisted group of wires contains more
than one signal, it will make the interference worst.

Attempting to twist the bunch of wires for RS232
will not improve the performance. The wires for transmit (TX) and
receive (RX) will interfere. It is possible that you might receive some
rubbish data immediately after you perform a data transmit. This
problem will be more obvious when you send the data at very high baud
rate and longer wiring distance, eg 115.2kps at 20 meters. It is due to
the signal on the TX wire being coupled onto the RX wire, triggering
the device, thinking that there are incoming data on the opposite line.

For RS232, you might like to twist between TX(pin
3)/ Gnd(pin 5), and another twisted pair RX(pin 2)/Gnd(pin 5) to
improve the transmission. There is only a common pin, therefore the two
wire will have to share the pin 5 ground.

 

RS485 opto coupled interface circuit
RS485 opto coupled interface circuit
RS485 opto coupled USB interface
 
 

www.pic-control.com, Singapore Network Ethernet WiFi RS232 RS485 USB I/O Controller

 
4. RS232
& RS485 signal analysis
 
RS485 and RS232
signal analysis experiment setup. The computer serial com port is
connected to a RS232 to RS485 converter device. Both RS232 and RS485 is
then monitored on the oscilloscope.Unlike digital scope or logic analyzer,
analyzing inconsistence communication signal on an analog oscilloscope
can be difficult. To assist the scope in displaying the data signal,
the data is being send to the com port repeatedly. This periodic signal
enables the scope to display the signal clearly on the screen.Adjust the triggering and the hold time to position the full
data byte transmission on the screen. You can learn more about using
oscilloscope from this ebook “XYZs of Oscilloscopes” from Tektronix
website.
Click
on the signal illustration above for larger view.

The signal level from the output of MAX485 IC depends on the
load from the communication line. Typically the open circuit output of
the MAX485 IC with/without a 120Ω
termination resistor has ?V1 = 5Vdc, ?V0 = 0.8Vdc. When the line
includes the inline resistors and the pull down/up resistor for the
RS485 bus,  ?V1 = 3.2Vdc, ?V0 = 0.6Vdc. These open circuit reading
is taken from the output of MAX485 IC using an oscilloscope. Some note
is observed when attempt to watch the RS485 communication from the
oscilloscope. When the probe get into contact with the signal, the
communication fails. The receiver device is able to decode the signal.
It is believe that the ground reference of the probe might be connected
to earth and will affect RS485 signal

The picture on the
left shows the data byte 0x33 or ascii char ‘3’ being transmitted on
the communication line. The signal starts from the left to the right.
The signal begins with a start bit (logic 0), lowest significant bit
(LSB), follow on to the highest significant bit (MSB), and ends with
the stop bit. The binary form of the data transmitted is as follows.
START bit0 bit1 bit2 bit3 bit4 bit5 bit6 bit7 STOP
0 1 1 0 0 1 1 0 0 0

The baud rate setting is set at 9600bps, data bits of 8, no
parity bit, 1 stop bit.

The top display the actual RS232 signal from a computer
system’s serial com port. This signal is tapped from the TX (+ve
connected) and ground line (-ve connected). It has loaded input from
the converter device. The higher voltage level represents logic 0 at
about 6Vdc, while the lower voltage level is a logic 1 at about -7Vdc.
When there is no transmission, the signal idle at -7Vdc.

The bottom display the RS485 differential signal converted
from the RS232 signal using a converter SNA10A. This signal is tapped
from the A (+ve connected) and B terminal (-ve connected). This is an
open load signal from the output of the converter device. The higher
voltage level represents logic 1 at about +4Vdc, while the lower
voltage level represents logic 0 at about -4Vdc. When there is no
transmission, the signal idle at about 1V.

The picture on the
left shows the voltage level of both signal when idling. Idling refers
to the state where no data is present on the communication line.The top display the idling signal level from the RS232. The
idling signal is at -7Vdc level (logic 1).The bottom display the idling signal level from the RS485. The
idling signal is at about +1Vdc level.
The picture on the
left shows the oscilloscope ground reference signal level. This
reference snap shot, is a reference for comparison with the snap shot
taken above. Both signal display the reference of 0Vdc.The top display the ground reference signal level from the
RS232.The bottom display the ground reference signal level from the
RS485.
www.pic-control.com, Singapore Network Ethernet WiFi RS232 RS485 USB I/O Controller

 
5. Ethernet
wiring
Port
Transport Protocol
Name
Application
7 TCP/UDP echo echo
20 TCP ftp File Transfer (data)
21 TCP ftp File Transfer (command)
23 TCP telnet Telnet, unencrypted text
communications
25 TCP smtp Simple Mail Transfer Protocol
43 TCP whois WHOIS protocol
80 TCP http Hypertext Transfer Protocol
101 TCP   NIC host name
107 TCP   Remote TELNET Service protocol
109 TCP pop2 Post Office Protocol 2
110 TCP pop3 Post Office Protocol 3
115 TCP sftp Simple File Transfer Protocol
554 TCP/UDP RTSP Real Time Streaming Protocol
5004 TCP/UDP RTP Real-time Transport Protocol
(media)
5005 TCP/UDP RTP Real-time Transport Protocol
(control)

References:


http://en.wikipedia.org/wiki/List_of_well-known_ports_(computing
)

 

If you are interested in the binary level on Ethernet
standard. Here is some basic information on the low level or hardware
aspect Ethernet from Analog Devices.- 2008-04-00
A Beginner Guide to Ethernet.pdf

The Ethernet looks very remote to me when I first try to
understand it. It is very complex. After a few years of experience, I
slowly gain enough confident to talk about this type of communication.

In fact, Ethernet is another form of serial communication. The
hardware aspect is similar to RS485, with pin 1 & 2 handling the
transmission of the serial data, while pin 3 & 6 is for the
receiving of serial data. I have not find any concrete information, but
I imagine it closely to a RS422. One pair of wire for TX, the another
pair for RX. The physical signal for RS422 is the same as RS485. The
signal are interchangeable. RS422 is a duplex while RS485 is a half
duplex communication line (see above for further information).

The beautiful part of Ethernet is on the streaming bytes
riding on the serial communication line. This stream of bytes is also
define as the data packets or protocol. It is the data protocol that
make Ethernet so special. Which is why there is so little information
on the physical aspect on the Ethernet. Ethernet is all about protocol.
Protocol consist of the data and the header. The header contains the
MAC, IP, PORT and other information which will helps the data packet to
be routed to the correct destination. You can imagine a letter to be
delivered. Letter contains address which helps the post man to deliver
the letter.

What we typical see on the cover of a letter:

Att: David

myCompany Pte Lte
(business registration number J123456789)

Street 3, Blk 3,
#03-33.

myCompany denote the company name which can be quite unique.
You can imagine the MAC address as the company name or as a business
registration number. The MAC address is a set of number (6 bytes, 0x11
0xAA 0x22 0xBB 0x99 0xFF) which uniquely identify the electronics
hardware Ethernet device. It is the basic number the hardware will
have, which identify itself from the rest from other gadgets. Most
computer have at least one network card/adaptor. Each card is a unique
communication device, and therefore have it’s own MAC address. If a PC
has 3 network card installed, it would have 3 different MAC address.
MAC address is the 6 bytes ID of the Ethernet hardware.

Next comes the IP address. You can think of it as your home
address. The number for IPv4 (IP version 4) is 4 bytes long
(192.168.1.255). Unlike a MAC address, IP address can be configured by
the user/programmer. You can imagine that while the company name
remains no change, no matter where it shifted it’s address. IP address
can be changed. Like a letter, the IP address will allows your data
packet to be delivered to the correct place. Each Ethernet hardware
(network card) will have it’s own MAC address. Each MAC address will be
assigned the IP address. Your company will be identified by it’s unique
number and the location address. A typical computer installed with 1
Ethernet card, can be identified with it’s MAC and IP address.

PORT is quite tricky to me at first. What is exactly a port.
You can relate it to the name of the person on our letter example. The
letter may be delivered to the correct address, but it does not
indicate who should receive the letter. Port identify the person that
should receive the data packet. In our computer example PORT is a
number which defines the application software that receive the data.
When you open up your web browser, the browser software will open it’s
port number 80. Any incoming data packet indicating port 80, will be
passed to the browser software. The browser software will then render
the data onto the screen for you to read. Similarly other network
application works in this way. Some common application’s protocol and
it’s port number are as follows,

Protocol in details.IPv4 (Internet Protocol version 4)

IPv6 (Internet Protocol version 6)

TCP (TCP Transmission Control Protocol)

UDP (User Datagram Protocol)

ICMP (Internet Control Message Protocol)

 

My complete understanding about port, actually started off
from it’s strange name “port”. At that time, I cannot visualize what is
exactly a port. I started to think about its name. Why people call it a
port. While writing article on RS232 com port, my mind suddenly opens
up. I am convinced today that, the word port comes from our old
computer parallel/serial port. It is a revolution of data communication.I started to imagine wildly with any references. Imagine in
olden days where Ethernet is not known yet, people used serial/parallel
port for communication. Each application occupy a port, which is the
current situation with serial and parallel port. You cannot have two
software application using the same port number. If there are more
application that needs to communicate, you can imagine that the
computer will need a lot of RS232 port at the back. Each and every port
is being occupied by the respective software for communication. Many
cable as we can imagine. That will be quite a headache. The Ethernet
consolidate these physical communication lines into just only one. In
order for the application to identify their own data, the port number
is implemented into the data header/protocol. The port number actually
acts as a virtual port for the computer, and will route the packets to
the correct software application. Now all packets communicate through
the same physical Ethernet cable. A bit of imagination will helps a lot
in understanding the topic.

The data packet route to the correct IP address, after which
it will check if it arrive to the correct MAC ID. When the packet
reaches into the computer, the packet is further route to the port,
where the appropriate application software will read and further
interpret the data packet.

Ethernet has more features, but the basic concept is still as
easy to understand as a RS232 serial communication.

What we have discuss so far is only the protocol on IPv4
header. Protocol or header is just bytes of information that describe
about the data it carries. The data itself may also contains its own
header which interpret another data within. It is like layers and
layers of onion skin. Just as you peel off the header for the data, you
notice another header to peel. Layer after layer, we finally got our
data.

The first layer is IPv4 (still quite common in this era dated:
July 2009) or IPv6 header (new protocol).

Going deeper, we have another layer typically TCP or UDP. They
defines the manner, the data is being exchanged across the
communication channel. TCP/IP protocol means that the data is
transported using the IP and TCP header. Two layer actually.

References:

http://www.fatpipe.org/~mjb/Drawings/

rfc792 (ICMP protocol)

icmp protocol

an-139 (how to route ethernet PCB)

all about Ethernet

  

Loop
Back Ethernet Connector


Short
Pin 1 to Pin 3


Short
Pin 2 to Pin 6

After so much theory, let’s talk more
physical stuff on Ethernet. As shown on the bottom and left, these are
the typical wiring on the network. Straight cable between the network
equipment and PC, and also cross cable between PC to PC or equipment to
equipment.


Ethernet Pin Out from your computer device

Pin no. Color   Description
1 Orange /White TX+
2 Orange   TX-
3 Green /White RX+
4 Blue  
5 Blue /White
6 Green   RX-
7 Brown /White
8 Brown  

I have been looking for hours a confirmation
on the network pin 1 & 2 (TX±).
Whether the pin out is referring to a DTE (a computer) or DCE (network
switch/hub). Most website indicates the TX RX pin out scheme, but did
not indicate whether the description is for a DTE or DCE. After
searching for so long, I finally found it.

I
would like to give credit to this website for providing the information.


http://www.duxcw.com/digest/Howto/network/cable/cable5.htm

 

  
http://www.winlab.rutgers.edu/~zhibinwu/html/serial.htm
gigabit ethernet rj45 twisted pair wiring
http://www.cyberpost.nl/?p=123
gigabit%20ethernet%20rj45%20pinout.jpg
  
CAT7, SSTP, individual shielding, solid core
1 – Jacket
2 – Shield-braid
3 – Shield-foil
4 – Solid twisted pair
5 – Drain wire
CAT6a, STP, individual shielding, solid core
1 – Jacket
2 – Shield-foil
3 – Drain wire
4 – Solid twisted pair
CAT5e, FTP, shielding, solid core 
1 – Jacket
2 – Shield – foil
3 – Drain wire
4 – Protective skin
5 – Solid twisted pair
CAT5, UTP, no shielding, solid core
1 – Jacket
2 – Solid twisted pair
   
   
   
   

Cable manufacturers

     



About Network
cable

Notice that a
network cable contains 4 pair of twisted cable, and the pair is
differentiated by the 4 sets of color pair. If you remember the RS485
wiring as mention in the earlier section, these twisted wire will look
very familiar to you again. The twisted wire provides a better
protection against possible interference. Notice how the twisted pair
is assigned to the RX signal± and the
other pair assigned to TX signal±.

There are many
type of cat cable to choose from. Depending on your deployment need,
these are some of the selection that you may have to consider.

– CAT5e, CAT6a,
CAT7, CAT8

– FTP, SSTP/SFTP,
STP/USTP, UTP

– Solid or
Stranded wire core

– Indoor or
Outdoor

– AWG wire size

Some people may
refer the network cable as RJ45, which is not correct. RJ45 is actually
the name of the plug. Another name for the plug is 8P8C connectors.

The twisted pair
cabling standard is refer as the CAT standard. The term is typically
being referred to when selecting the type of network cable. The CAT
define the signal frequency that the cable is able to carry for a
distance of 100m. High frequency signal gets filter away as the cable
becomes longer, which also means that the data rate will be reduced.
This means that a short CAT5e cable is able to transmit as fast as a
longer CAT7 cable. Therefore 100m is a normalize distance to compare
between the cable quality.

 
Standard Max Frequency
CAT7a 1000Mhz
CAT7 600Mhz
CAT6a 500Mhz
CAT5e 100Mhz

Some
network cable comes with aluminum foil shielding to protect the signal
from external noise interference. FTP cable have a single foil covering
the 4 twisted pair. STP call for a foil shielding for each twisted pair
inside the cable, improving interference from adjacent twisted pair.
SSTP is similar to STP with an extra foil around the 4 twisted pair,
creating a double foil shielding. Unshielded cable is indicated by UTP.

The
cable may also comes with either a solid or stranded for the core of
the wire. Solid core is typically suitable for permanent deployment
where it is unlikely that the cable position would be changed. Stranded
version is suitable for patching purposes, where the cable get to be
used or bend more frequently. Stranded cable is more robust then a
solid core version for patching use.

Network
cable also comes in a more rugged packaging for outdoor use. The
protective cable skin is tougher and the cable core may be reinforced
with a backbone that protects the cable from being crush by heavy
weight.

The AWG (America
wire gauge) specify the size of the copper wire core. Bigger AWG number
denote a smaller cross section area, though lower current than a
smaller AWG cable. Network cable has AWG ranged from AWG 22 to 24.

Coaxial
cable is a much better structure than a twisted pair configuration.
Coaxial cable can carrying a much higher frequency due to it’s
structure carrying signal in transverse electric magnetic (TEM) mode.
The cable is however bulky, heavy and more costly as compare to a
twisted pair alternative.

reference from:


http://www.hyperlinesystems.com/catalog/cable/sstp4_c7_solid_outdoor.shtml


http://en.wikipedia.org/wiki/Category_7_cable

Network
troubleshooting command example

ping localhost

ping 192.168.1.1

ping www.yahoo.com.sg

ping /help (for more help)

ping -t 192.168.1.1 (ping non-stop until Ctrl+C is pressed)

tracert 192.168.1.1 (trace packet route)

netstat (check network connection IP:Port & protocol used)


http://commandwindows.com/netstat.htm


http://www.over-look.com/site/index.php/documentation/fing-features


http://www.garykessler.net/library/is_tools_scan.html

Ethernet network
troubleshooting tools

TCP IP test
tool

UDP test tool


SMTP email test tool

PuTTY, telnet, ssh,raw, serial communication tool

reference source:
http://www.simplecomtools.com

Ethernet low level data packets analyzing tools

http://www.etherdetect.com/
(very neat display)

http://www.wireshark.org/
(very good packet filter)

To check if the
remote PC is connected to your local PCping 192.168.1.100To check the MAC
address of the remote PCissue the following

ping 192.168.1.100

arp -a 192.168.1.100

www.pic-control.com, Singapore Network Ethernet WiFi RS232 RS485 USB I/O Controller

6. WiFi wireless 
 WiFi modules


SPB104-WiFi 802.11b+g SDIO, from ATMEL (H&D Wireless AB). Other
part number hdg104, spb104, spb105, spb106, aro104, aro105.
– ZG2100M / ZG2101M Wi-Fi module 2.4GHz 802.11b low power transceiver module, from Microchip & zeroG
– WLM10x Low power WLAN Module from Laird Technologies
– WIZ610wi WiFi module from WIZnet
– BCM4329 802.11n/Bluetooth chip from Broadcom
– MRF24WB0MA/MRF24WB0MB 2.4GHz WiFi RF transceiver chip from Microchip.
– G2M5477 Wifi module, from Microsystems
– CYWM6935 WirelessUSB LR Radio Module, from Cypress Perform

 

7. USB
Interfacing


FT232BM datasheet

Virtual COM Port (VCP)
drivers and direct (D2XX) drivers

USB to Serial TTL
converter using FT232BM

Please click image for
larger schematic

USB socket type B, pin
no. & dimension

Microcontroller
and PC communication using USB

USB is getting popular replacing RS232 in the consumer market.
However the use of serial communication is much more popular in the
industry because it is much simpler to deploy and troubleshoot. In the
view of this, conversion between USB, RS232 and USART is certainly an
advantage in bringing products into the consumer market in the fastest
possible time.

The presented interface uses the IC FT232BM to interface
between a USB from the computer and USART which is used in a
microcontroller. From the computer and microcontroller point of view,
it is the same old serial communication that are discussed previously.

USB is that simple. This is possible with the help of the IC
FT232BM from FTDI Chip. The IC
and it’s virtual com
port driver
has transform the conversion from USB to USART almost
invisible. With the driver installed into the PC, it acts as a bridge
which transforms the USB hardware into a virtual serial com port. The
computer software will transmit the data to the virtual com port as
what it will do when sending data through a normal Com1 Com2 port. The
virtual com port will be run by the FTDI USB driver which will
communicate through USB communication to it’s IC FT232BM. The
manufacturer has also provide IC control through a *.dll direct driver,
a alternative solution to the virtual com port driver. For further
information, you may like to visit their website.

Alternative there is a even more integrated USB to UART
solution from Silicon Laboratories.
IC CP2102 is much more simpler, with no external components. It is an
attractive solution, however I have not try it before.

The circuit present the hardware conversion between the USB
and USART using FT232BM. The circuit can be implemented on top of
existing USART electronics, so that USB bus can be used, for serial
communication with the PC.

FTDI chip

FT232BM

Silicon Laboratories

CP2102, CP2101

references:

http://www.beyondlogic.org/usbnutshell/usb1.shtml

8. Power Line Communication (PLC)  
 Module:

– ST7540 FSK powerline transceiver (AN2451), from ST

 

9. SPI  
 not available yet
10. I2C  
 I2C is a 2 wire, simplex communication physical protocol. It is usually used in the inter IC chip communication, like SPI.I2C
uses only 2 wire and is able to send and receive data. The data
transfer rate is slower compare to SPI. The protocol is much more
complex than SPI, which is why troubleshooting I2C is not simple. The
protocol consist of many header signal for protocol control. It is
those header that makes the decoding tedious with using a i2c logic
analyser instrument.

Once you got the hang out of it, it is fairly managable.

 

SDA—____—___—___——————————__________–
SCL—-____—___—___—___—___—___—___—___—___–___
……^….^…..^…..^…..^…..^…..^…..^…..^…..^
……1….2…..3…..4…..5…..6…..7…..8…..9…..10

The following signal shows communication between a microcontroller (master) and IC MCP79410 (slave), using bit banging method.The yellow signal is SCL, clock line.
The blue signal is SDA, data line.

The command/data that was sent to MCP79410 are as follows (Write data to EEPROM),
– start
– 0xAE (write command to MCP79410)
– 0x00 (address for the following data)
– 0xAA (data to be written into the address)
– end

1- START signal. SCL is held high when SDA perform a negative edge signal (logic high to low).

2- Logic 1 is sent. The SDA is loaded with logic 1 just before SCL is clock positive edge.

SDA signal/data line should remain stable during the HIGH period of the clock pulse. Any changes during the HIGH clock pulse duration are inteprested as control signals (START or STOP command).

3- Logic 0 is sent. (at the +ve edge of SCL)
4- Logic 1 is sent.
5- Logic 0 is sent.
6- Logic 1 is sent.
7- Logic 1 is sent.
8- Logic 1 is sent.
9- Logic 0 is sent.
10- The SDA and SCL lines are release at this moment in time. SCL
returns to logic high, but SDA is still at logic low even when both
lines are release. This shows that the slave device is actually holding
the SDA line down. The holding of this SDA line is the slave
acknowledging the data received. This is important because it shows
that the slave is responsing to the command send. The slave is working.
The SDA line is release shortly.

Program hang when executing a read command.

Problem was resolved. The microcontroller was able to read the data properly from MCP79410.

The command/data that was sent to MCP79410 are as follows (Write data to EEPROM),
– start
– 0xAE (write command to MCP79410)
– 0x00 (address for the following data read)
– start
– 0xAF (read command to MCP79410)
– read byte(data to be written into the address)
– endThe
signal stop while executing the read byte function. Further
investigation shows that there was a coding problem with the I/O port.
The program was expecting a logic but it didn’t happened. The reason
for the hang.

After resolving the problem, the micrcontroller was able to read from MCP79410 successfully.

 
*** Very useful tips summary in intepreting the I2C signal

1) Any changes in data logic on the SDA signal must be done when
the SCL signal is low. SDA data sampling will take place when SCL is
positive edge.

2) SDA signal change (positive or negative edge trigger) while the SCL
signal is high will be intepreted as command (START, STOP, RESTART).

3)START or RESTART command happens when SDA is negative edge while SCL
is at logic high. STOP happens when SDA is positive edge while SCL is
at logic high.

4) To issue RESTART, set both the SDA and SCL line to idling state
without issuing a STOP (meaning release SDA first then SCL). Then issue
a START. This START command is a RESTART command.

Simple notes to Troubleshooting I2C:

1)
Perform a write process, and take note of the Data line, to ensure that
the I2C device is responsing. If it is not responsing, it could be that
the IC is not properly soldered, or it could be damaged (unlikely).

2)
Ensure that the minimum clock duration is met. Typical clock high
should be of a minimum of 0.6us, and the clock low should have a
minimum of 1.3us. Check the signal waveform to ensure that this
condition fulfil.

Tips

The pulling down of the SDA line is ACK, meaning the slave I2C device has responsed to the request.

ACK is also triggered by master if master still wants to read more data
from the slave. This is reading with ACK. If this is the last byte to
be read. It will be read with NACK.

Some illustration taken from http://mbed.org/users/okano/notebook/i2c-access-examples/

References:

http://www.beyondlogic.org/

Keyword: RS232, RS485, USB, UART, USART, SCI, Ethernet

Remote Detector Notification System

Protect what matters most — anytime, anywhere.

The Remote Detector Notification System is a smart security solution that instantly detects unauthorized movement and alerts your team in real time. Whether it’s at a jetty, warehouse, factory, or restricted zone, this system ensures you never miss a threat.

Remote Notification System Architecture

Smart Perimeter Security with Instant Alerts

The Remote Detector Notification System is designed to safeguard sensitive areas such as jetties, company boundaries, and other high-security zones. Using motion detection and instant notification technology, the system ensures authorized personnel are alerted the moment an intrusion occurs.


✅ Why Choose Our System?

  • Instant Alerts – Get notified the moment motion is detected.
  • Multi-Channel Notifications – SMS, WhatsApp, Telegram, or Email.
  • Up to 10 Recipients – Alert your whole security team at once.
  • Customizable Messages – Set your own words for every alert.
  • Reliable Hardware – PIR sensor, blinker, and siren integration.
  • Cloud-Ready – Manage, monitor, and update remotely.
  • Flexible Power – AC input, battery backup, and solar panel options.

🌟 Perfect For

  • Coastal security & jetties
  • Industrial facilities
  • Warehouses & storage yards
  • Remote locations without CCTV
  • Perimeter protection for restricted zones

💡 Key Benefits

  • Simple – Easy to set up and operate.
  • Scalable – Add more users and locations as needed.
  • Cost-Effective – Low monthly subscription fees.
  • Future-Proof – Cloud-based design adapts to new messaging apps.

🔍 How It Works

Control – Adjust settings anytime via cloud software.
Detect – PIR sensor picks up intruder movement.
Deter – Siren and blinker activate instantly.
Notify – Customized alerts sent to your team’s phones.

  1. PIR Sensor Detection
    • The Passive Infrared (PIR) sensor detects movement across the secured boundary.
  2. Alarm Activation
    • Connected blinker and siren trigger immediately to deter intruders.
  3. Notification Delivery
    • The system sends a customized message alert to up to 10 mobile numbers, notifying personnel on duty.
    • Flexible options also include Email, Telegram, WhatsApp or SMS notifications.
  4. Cloud Software Control
    • Remote configuration and monitoring through a simple user interface (Google Sheet).
    • Allows customisation of recipient contact numbers, customizing SMS content, and checking device status.

⚙️ Key Features

  • Multi-Channel Notifications: SMS, Email, Telegram, WhatsApp.
  • Customizable Alerts: Define your own notification messages.
  • Scalable Setup: Supports up to 10 personnel at a time.
  • Cloud-Based Control: Manage system settings remotely.
  • System Status Monitoring: Check if the system is operating and connected online.
  • Flexible Power Options: AC power input, battery UPS, and optional solar panel integration.
  • Strong Connectivity: 3G/4G/5G modem with Ethernet/WiFi support.
  • Security Hardware Integration: Compatible with existing PIR sensor, blinker, and siren.

📦 Package Includes

  • Sensor Controller (with battery backup)
  • 3G/4G Modem
  • Cloud Software Development & Hosting
  • Enclosure
  • 1-Year Warranty & Support

Optional Monthly Fees

  • Network SIM Card (4G): Estimate about $10/month
  • WhatsApp Alerts (est.): Estimate about $10/month
  • SMS Alerts (est.): Estimate about $10/month
  • Email & Telegram Alerts: Free

Contact Us

Click here to contact us for more details.

⚙️ PIC‑WEB32: Industrial Ethernet Dry Contact Controller for Seamless I/O Integration

Web I/O 32 digital input output

The PIC‑WEB32 is a high-performance Ethernet I/O controller purpose-built for industrial and automation environments where stable, networked dry contact control is essential. Featuring a rugged, fanless aluminum enclosure and wide operating tolerances, the PIC‑WEB32 integrates easily into existing infrastructure with both web-based management and enterprise-level protocol support.

Engineered with IP40-rated protection and designed for DIN-rail or wall mount installations, this versatile controller ensures consistent operation under harsh electrical and environmental conditions.


🌐 Network-Ready for Smart Control Applications

Featuring pluggable terminal connection for easy connection.

With support for 32 digital input/output (I/O) channels, the PIC‑WEB32 delivers precise, low-latency relay control. Each I/O can function as a dry contact or pulse-enabled wet contact interface, making the unit adaptable for a wide range of automation and remote monitoring scenarios.

Equipped with two independent Ethernet ports (10/100 Mbps), the controller supports dual MAC and IP addresses, offering network redundancy or segmentation for mission-critical operations.

Whether for smart buildings, legacy equipment bridging, alarm management, or SCADA systems, the PIC‑WEB32 streamlines Ethernet-based I/O expansion across your facilities.


🔧 Key Technical Features

  • Processor & System:
    Industrial-grade ARM9 processor @300 MHz running embedded OpenWRT Linux for stability and upgradability.
  • Ethernet & Protocols:
    • Dual 10/100 Mbps ports with Auto-Negotiation & Auto-MDIX crossover detection
    • Protocol support includes: Modbus TCP, TCP/UDP Server & Client, HTTP, SNMP, Telnet, SSH
  • Digital Input/Output:
    • 32 independently configurable I/Os
    • Dry and wet (pulse) contact supported
    • Status LEDs for each I/O line
  • Management Interfaces:
    • Accessible via Web GUI, Telnet, SSH, and Windows configuration utility
    • SNMP supported for enterprise monitoring systems
  • Power Supply:
    • Accepts wide voltage range: DC 12–55V or AC 12–40V
    • Built-in surge, overload, and reverse-polarity protection
    • Supports redundant power input
  • Mechanical & Environmental:
    • IP40 anodized aluminum casing
    • DIN-rail or wall mount compatible
    • Fanless, passive cooling for noise-free operation
    • Operating Temp: −40°C to +85°C
    • Humidity: 0–95% RH (non-condensing)
  • MAC & Interface Standards:
    • Fully compliant with IEEE 802.3 Ethernet standards
    • RJ45 connectors with dynamic MAC address learning

🧩 Where It Fits In

The PIC-WEB32 is ideal for systems where networked dry contact inputs/outputs are needed with high reliability:

  • 🏢 Building automation
  • 🚨 Alarm trigger systems
  • 🏭 Factory floor control panels
  • 🌐 Remote I/O over TCP/IP
  • 🧠 Intelligent relay expansion for PLCs or SCADA systems

Setup Connection

These are some illustration of a typical connection setup.

Typical connection setup for a single server
Paired server setup connection

💬 What Customers Say

“We were able to migrate our legacy relay panels into a smart Ethernet system with the PIC‑WEB32. Reliable, compact, and easy to manage.”
— Systems Engineer, Building Infrastructure Solutions

“Plugged it into our Modbus TCP network and had all contact signals online in minutes. Excellent industrial controller.”
— Automation Manager, Precision Manufacturing


✅ Contact Us

Experience the power of streamlined industrial control with the PIC‑WEB32.
👉 Contact Us Today

-> Click here for PIC-WEB32 product brochure.

Other Similar Products

PIC-WEB16
PIC-WEB08

Guard Sensors for Machines Safety

Machine Safety Sensors – Protect Your People. Secure Your Production.
Ensure Maximum Safety with Reliable Machine Safety Sensors
Industrial environments are full of potential hazards. Our advanced machine safety sensors provide the protection your team needs while maximising uptime and productivity. Whether you run an automated factory, a warehouse, or a logistics hub, we help you stay compliant, reduce accidents, and operate with peace of mind.

Why Choose Our Machine Safety Sensors?

  • Comprehensive Protection: Detect unsafe conditions before accidents happen.
  • High Accuracy: Fast, precise sensing—even in harsh environments.
  • Easy Integration: Works seamlessly with all major machinery brands.
  • Fail-Safe Design: Redundant safety features ensure maximum reliability.
  • Compliance Ready: Meets ISO 13849, IEC 61508, and CE safety standards.

Our Sensor Types

  1. Safety Light Curtains
    Create invisible barriers to instantly stop machines when crossed.
  2. Emergency Stop Buttons
    Large, high-visibility E-stops for immediate shutdowns.
  3. Safety Laser Scanners
    Monitor complex zones with configurable detection fields.
  4. Safety Interlock Switches
    Ensure guard doors stay closed during operation.
  5. Safety Mats
    Detect presence with pressure-sensitive flooring.

Industries We Serve

  • Automotive Manufacturing
  • Electronics Assembly
  • Food & Beverage Processing
  • Warehousing & Logistics
  • Packaging & Bottling
  • Factories & Warehouses
  • Construction Sites
  • Logistics Hubs
  • Offices & Commercial Buildings
  • Laboratories & Workshops

Empower Safer Workplaces with Safety Guard Sensor

Smart Safety Compliance. Total Peace of Mind.
Make workplace safety effortless with Safety Guard Sensor—the all-in-one platform that helps you achieve, maintain, and prove your commitment to a safe and productive environment.

Discover the Guard Sensor Advantage

All-in-One Safety Management Platform

Automated Digital Checklists.

Simplify daily and weekly safety inspections with smart checklists tailored to your operations.

Live Sensor Monitoring

Install wireless sensors at key locations—get real-time insights on machinery status, hazardous zones, emergency exits, and more.

Instant Safety Alerts

Receive notifications directly to your mobile or desktop if conditions deviate from your safety parameters.

One-Click Compliance Reporting

Generate professional, audit-ready safety reports at any time—perfect for management review or stakeholder updates.

Employee Training Hub

Give your team access to interactive safety modules, track their progress, and reinforce a culture of safety.

Maintenance & Incident Tracking

Log hazards, schedule maintenance, and track incident responses for full transparency.

See Our Sensors In Action

Safety Light Curtain Installed on Conveyor

A slim, yellow safety light curtain mounted on both sides of a conveyor, with bright

indicator LEDs and a hand reaching near the detection zone.

Emergency Stop Button Close-Up

A large red emergency stop push button with a yellow background, clearly labelled for quick access on a machine control panel.

Safety Laser Scanner Monitoring Robot Cell

A compact safety laser scanner mounted near the base of an industrial robot projects a visible safety zone on the floor.

Guard Door Interlock Switch

A heavy-duty metal interlock switch is installed on a safety gate, with clear locking mechanism and status indicators.

Contact Us

Protect Your People. Safeguard Your Equipment.
Ready to upgrade your machine safety?

Stay Safe. Stay Efficient.
Your safety partner for smart industry.

Contact our sales engineer today.

PayNow Voice Announce Notification System for Payment Received

Looking to make your business more efficient and never miss a sale?

Our PayNow Payment Notification System is the perfect solution for small businesses in Singapore!

Here’s what makes it a game-changer:

  • Instant Alerts
  • Real-Time Notifications
  • Seamless Integration
  • Easy Setup, Easy Use
  • Better Cash Flow
  • Secure and Reliable
  • Easy Recordkeeping
  • No Extra Apps Needed

Instant PayNow Payment Alerts

Get notified the moment a customer pays you via PayNow—no more checking your bank app, waiting for payment confirmation, no more guesswork or missed transactions. This device will announce the payment amount that you have received in real time, loud and clear. You get to know that every sale is successful

Real-Time Notifications for Every Sale

Stay updated with real-time alerts right at your countertop or cashier’s desk. No need to check your phone or bank app—our device does the work for you.

Secure & Seamless Integration with Your Bank

Seamless Integration: Our system integrates smoothly with your PayNow bank setup. Once you’ve registered your business account with PayNow through your bank, our notification system connects directly to your bank’s payment gateway to deliver real-time payment alerts automatically. Ensuring all your payments are safe, recorded, and easy to track. No extra hardware or complicated software needed!

Easy Setup, Easy Use

Just place the compact device on your counter, display the PayNow QR code, and start receiving instant alerts. It’s perfect for retail stores, cafes, and market stalls.

Better Cash Flow

With real-time notifications, you can process orders, deliver goods, or provide services immediately, keeping your customers happy and your business running smoothly.

Secure and Reliable

Built on Singapore’s trusted PayNow infrastructure, every transaction is safe and protected by your bank’s security systems.

Easy Recordkeeping

Each payment comes with a clear notification, making it simple to track sales and reconcile your accounts.

No Extra Apps Needed

Customers pay using their own banking app—no new downloads or training required.

Upgrade your business today with our PayNow Payment Notification System—fast, secure, and designed to help small retail store, cafe businesses like yours grow!

Empowering Small Businesses

With “Empowering Small Businesses with Smart Payment Alerts” as our promise, you’ll join a growing community of savvy business owners enjoying hassle-free, cashless payments.

PayNow Payment Voice Announcer Device

A sleek, compact notification device placed on a countertop or cashier’s desk.

Display a visual cue on the device such as a glowing light or sound wave icon to symbolize instant payment alerts.

Show on a smartphone screen with a PayNow payment confirmation or notification popping up, reinforcing the instant alert feature.

What our customer says about this product.

“Instant PayNow Payment Alerts”

“Real-Time Notifications for Every Sale”

“Secure & Seamless Integration with Your Bank”

“Empowering Small Businesses with Smart Payment Alerts.”

Contact Us for your PayNow Payment System

Click here to contact us.

REFCO AquaSwitch Aircon Water Leakage Sensor

The REFCO AquaSwitch Aircon Water Leakage Sensor is a specialized electronic device designed to detect water levels in air conditioning units, thereby preventing potential water damage due to leaks (or aircon condensation).

AquaSwitch water leakage sensor

This sensor is particularly useful in environments where air conditioning systems are prevalent, such as commercial buildings and server rooms, where water leakage can lead to significant operational disruptions and costly repairs.

Overview of AquaSwitch

The AquaSwitch operates using solid-state electronic sensing technology, which is not affected by oil films or metal surfaces. This feature enhances its reliability in various installation scenarios. When water comes into contact with the sensor, it triggers a relay output that can activate alarms or pumps, ensuring immediate response to potential leaks.

Key Features

  • No Moving Parts: The AquaSwitch is designed without mechanical components, reducing the risk of wear and tear and increasing longevity.
  • Relay Output: It provides a dry contact switch output that can be easily integrated into existing alarm systems or control panels.
  • Versatile Installation: The sensor can be mounted in various locations, such as in the water tray of an air conditioning unit or at specific heights to monitor water levels effectively.
  • User-Friendly: The installation process is straightforward, making it accessible for both professional technicians and DIY enthusiasts.

Applications

The AquaSwitch is particularly effective in:

  • Air Conditioning Units: It helps monitor condensation trays where water accumulation is common.
  • Server Rooms: Given that air conditioning failures can lead to overheating and equipment damage, the AquaSwitch provides critical early warnings of leaks2.
  • Industrial Settings: In environments with extensive piping and machinery, the sensor aids in maintaining operational integrity by detecting leaks before they escalate into larger issues.

Advantages

The AquaSwitch offers several benefits:

  • Early Detection: By alerting users to leaks promptly, it helps mitigate damage and repair costs.
  • Peace of Mind: Users can operate their systems with confidence, knowing that potential water issues are being monitored continuously.
  • Cost-Effective Solution: The initial investment in an AquaSwitch can save significant amounts in potential repair costs due to water damage.

The REFCO AquaSwitch Aircon Water Leakage Sensor is a reliable and efficient solution for detecting water leaks in air conditioning systems. Its advanced technology and user-friendly design make it an essential tool for maintaining the integrity of HVAC systems across various applications.

Buy AquaSwitch here.

Click on this buy button to purchase.
24V ac/dc model.

or Contact our sales for ordering of AquaSwitch water leakage sensor.

For more technical details of the AquaSwitch sensor, click here.

Custom Cable Fabrication

Our company provide custom cable fabrication and connector cable assembly services in Singapore.

The demand for custom cable fabrication and connector cable assembly has surged globally, driven by the growing need for specialized electronic components across various industries.

custom cable fabrication

This article explores the key aspects of this industry, the processes involved in custom cable assembly, and the benefits of tailored solutions for diverse applications.

dsub connector cable assembly drawing

The Custom Cable Assembly Process

The process of custom cable assembly starts from client providing information of the custom cable project. Cable wiring connections various from project to project.

Our engineer will obtain the relevant information or documentation of the required cable. We will also understand the context of your cabling project to ensure that the connector and cable type that we select are suitable for your application.

custom RS232 cable assembly fabrication

Material Selection: Choosing the right materials is critical for ensuring durability and functionality. This includes selecting insulation, shielding, and jacketing materials that comply with industry standards.

Connector Selection: The choice of connectors is crucial as they must be compatible with both the cable and the devices they will connect to. Proper selection enhances reliability and performance.

Manufacturing: Once designs are finalized, the manufacturing process begins. This includes cutting wires to precise lengths, stripping ends, and attaching connectors through soldering or crimping methods.

Testing: Each assembly undergoes thorough testing to verify its performance against specified standards. This may include electrical testing, environmental assessments, and functional tests.

Shipping: After passing all quality checks, the custom cables are packaged appropriately for delivery to clients.

Benefits of Custom Cable Assemblies

Custom cable assemblies provide several advantages over standard options:
Tailored Performance: Clients can specify exact requirements regarding materials and configurations, ensuring optimal performance for their unique applications.

custom JST wire assembly

This is especially for specialised communication cable type like RS232, RS485, RS422, CAN bus, Profibus, etc…

custom dsub connector cable assembly

Quality Assurance: The rigorous testing protocols associated with custom assemblies lead to higher quality control than off-the-shelf products.

Increased Efficiency: Custom assemblies can integrate multiple types of cables into a single solution, reducing clutter and minimizing potential damage from multiple connections.

Flexibility in Production: Manufacturers can produce exactly what is needed without excess inventory, allowing for better resource management.

custom cable wiring diagram

Contact us for custom cable fabrication

Contact our engineer today for your custom cable wiring connection fabrication.

Program microcontroller using MPLAB X IPE software.

This is a simple and safer way to upload your compiled firmware onto a microchip microcontroller.

A second method is loading the project source code files, compile and load. It is not a preferred method for uploading as the source code may be accidentally edited.

The following is the recommended method to load firmware safety.

Checklist before proceeding.

  1. A computer with USB port.
  2. IPE software installed on your computer.
  3. PICKit programmer hardware.
  4. The *.hex file of your project.
  5. Your microcontroller board.

Installing IPE Software

IPE software (Integrated Programming Environment) is a tool from Microchip that allows you to upload your compiled firmware the the microcontroller.

Visit this page to download MPLAB X IDE from Microchip website.
https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide

  1. Visit this page to download MPLAB X IDE from Microchip website.
    https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide
  2. Install this application.
  3. Please take note to select the following options during the installation process.
    • “MPLAB IPE”
    • “8 bit MCUs”
    • “16 bit MCUs”

Loading Firmware to Microcontroller.

This section will guide you in programming your controller board.

Step 1:

Connect the PICkit programmer tool to your controller circuit board.

Ensure that pin 1 (which is indicated by the triangle arrow marking) is aligned with the same marking on the circuit board.

Step 2:

Open up the “MPLAB IPE” software.

Select the “Family” and “Device” names for your controller board.

eg.

Family: 16-bit MCUs (PIC24)
Device: PIC24FJ256GA702

Click on the “Apply” button to select.

Step 3:

Connect up your USB PICKit tool to your computer.

Select the “Tool” for your PICkit programmer tool.

Step 4:

Under the section “Hex File”, click on the button “Browse” to select the *.hex file that you want to load to your controller.

Step 5:

Ensure that the pins on the PICkit programmer tools are properly connected/touching your controller board, by the programmer with some pressure.

Then click on the “Connect” button.

Step 6:

Maintain contact of the PICkit programmer tool with the controller board, then click on the “Erase” button.

You should see on the output window that the erase operation is completed successfully.

Step 7:

Maintain contact of the PICkit programmer tool with the controller board, then click on the “Program” button.

Messages will be displayed on the output window to indicate that the programming is done successfully.

Design a vending machine to accept digital cashless payments.

Modern vending machine design involves integrating modern peripheral like cashless payment terminal and telemetry system. MDB Multi Drop Bus is a communication standard established in the vending industry to enable vending peripherals to talk to one another by simply plug-and-play. This made integration among the devices used on a vending machine much easier.

Most cashless payment terminal for digital and cashless payment are MDB ready. They allow you to accept payment like Visa/Master credit card, Apple Pay Google Pay, NFC payment, WeChat pay, etc…

This is where MDB to Pulse or RS232 converter comes in. They enable newly developed vending system to seamlessly connect to a modern cashless payment terminal. Through simply plug-and-play, your vending machine can accept a wide range of payment method fast. There is no need to spend time and effort in the learning and development work on the MDB protocol. communication protocol. Using converter enables your vending machine to accept a wide range of digital cashless payment instantly.

Convert Coin Vending to Cashless Payment

This solution is to buy PIC-031 to enable a modern cashless payment terminal to collect payment for the old coin vending machine. PIC-031 is an MDB to Pulse Converter.

MDB is also known as Multi Drop Bus. It is a “plug & play” standard connection commonly used in the vending industry which allows peripherals to talk to one another.

Convert old coin vending machines to accept modern cashless payment methods like credit cards, QR codes, NFC, PayPal, WeChat, etc…

Convert your coin vending machine to cashless payment

Increase your vending sales by enabling modern cashless payment method.

You can purchase a cashless payment terminal from your local area. They are configured for payment suitable for local transactions.

Most of these modern terminals can easily connect to modern vending machines that can accept MDB connect. Little to no integration effect is required. For old vending machines that were not designed to the MDB standard, it is much harder and expensive to integrate.

PIC-031 is designed to resolve this issue. It converts the complex MDB protocol into simple pulse command that the old coin type of vending machine can easily understand.

Modern payment terminals can be enabled to accept a wide range of new digital and cashless modes of payment. Any new mode of payment can easily be upgraded on a payment. This is not the case for old coin-accepting vending machines.

The payment method over digital and cashless means has become more and more common. By enabling these modern payment channels, you can increase your sales compared to a vending machine that only collects physical cash coins and notes payment.

Credit Cards and Payment Networks:

  • Visa
  • Mastercard
  • American Express
  • Discover

Mobile Wallets:

  • Apple Pay
  • Google Pay
  • Samsung Pay

Digital Wallets:

  • PayPal
  • Venmo
  • Cash App

Online Payment Platforms:

  • Stripe
  • Square
  • Braintree (a PayPal service)

Unified Payments Interface (UPI):

  • Google Pay (in some regions)
  • PhonePe
  • Paytm

Contactless Payment Solutions:

  • PayWave (Visa)
  • PayPass (Mastercard)
  • Express Transit (Apple Pay)

Cryptocurrency Platforms:

  • Coinbase
  • Binance
  • Kraken

Banking Apps:

Many banks offer their mobile apps for cashless transactions.

Upgrade your old coin vending machine today.

Upgrade Old Vending Machines

Click here for more information about PIC-031 MSB to Pulse converter.

or Contact our engineer today.