Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

CAN BASED INDUSTRIAL SERIAL WIRING SYSTEM

By Prabakaran P.M

Summary:

This Article is to explain some of the basics of CAN and show how choosing CAN for embedded systems networked applications beneficial.

In today’s world, every industry need is automation so the industries will need automation, protocol, this project focused on a system in which CAN protocol is used to monitor and control 4 different devices by single Arduino called as master and another Arduino called as a slave. Implementation of CAN protocol, which is a message based protocol, the single master will broadcast short messages which are to be received in the at multiple slave locations simultaneously.

Description:

Prerequisites & Equipment:

You are going to need the following:

  1. Two Arduino Board or Arduino clone(Here is a guide if you need)

  2. A 5v TTL -UART Bluetooth module.

  3. LCD, Relays and its Driving circuits.

  4. Arduino IDE for the programming.

  5. Two CAN Tranciever

Controller Area Network (CAN) Protocol was initially created by German automotive system developer Robert Bosch in the mid of-1980s for automotive applications as a method for enabling robust serial communication. The aim was to make automobiles more reliable, robust and safe while decreasing wiry tension, weight and complexity. Since its acceptance, the CAN protocol has gained worldwide popularity in industrial automation and automotive/truck applications. For more details refer this article.

As our project is a single master message broadcast system that is suitable for systems where data contained in short messages are sent simultaneously to the other devices in other locations. As CAN protocol is not an address based messaging procedure, messages are not addressed to the exact slaves, but the sender’s identifier that is included in a message not only helps the receiver to know the data it contains but also tells the receiver to keep the data or ignore it if it is not intended to it. 

 

Working Principle:

This Project includes two distinct parts, Display section and a Control section. Transmitter section consists of LCD to show the status of devices and the control switches. The receiver section consists of relay circuits with Optocoupler protection. The communication between both sections are carried out by the MCP2515 CAN transceiver.

For more details about CAN protocol interface with Arduino refer Getting Started with CAN interface with Arduino.

The DISPLAY Section:

DISPLAY section consists of an Arduino with a MCP2515 CAN module and an TJA1040 transceiver chip. The Microcontroller is operated from a 16MHz crystal. And MCP2515 has an SPI interface which is used to connect using SPI pins in Arduino. The Pins CANH and CANL of the transceiver chip are connected to the CAN bus. LCD is connected to Arduino to display the status of the devices and Switches are connected to send control data to the Control Section.

The CONTROL Section:

The COLLECTOR section consists of an Arduino with a MCP2515 CAN module and an TJA1040 transceiver chip. The Digital pins of Arduino are used to controlling the Relays, which in turn ON the Devices in the Industry. For Real Time Switching of the Devices Interrupt based message reception is used for more details refer this article Using interrupt in Arduino CAN interface.

Running the program:

Transmitting Control Data and displaying in LCD:

Load the program TX.ino after you save it onto your computer and open it in Arduino IDE .

  • Compile the program in the Arduino IDE

The following function is used to send the values to the CAN bus. Detailed instruction can be found here.

CAN.sendMsgBuf(0x70,0, 2, stmp);

Receiving CAN data and Controlling Relays:

Load the program RX.ino after you save it onto your computer and open it in Arduino IDE .

  • Compile the program in the Arduino IDE

The following function is used to receive the values from the CAN bus and to display in an LCD. Detailed instruction can be found here.

CAN.readMsgBuf(&len, buf);

Loading software for Arduino:

If you are new to Arduino you can start with here. You have to start with the Arduino IDE (Integrated Development Environment) from Arduino . Download the code from below link and upload it to the Arduino board.

Hardware assembly:

Prototype of Industrial Serial Wiring Over CAN Bus designed on Breadboard

Fig. 1: Prototype of Industrial Serial Wiring Over CAN Bus designed on Breadboard

 

Image showing Industrial Serial Wiring Over CAN Bus demonstrated by controlling AC Bulbs

Fig. 2: Image showing Industrial Serial Wiring Over CAN Bus demonstrated by controlling AC Bulbs

 

Prototypes of CAN Transmitter and Receiver circuits designed on breadboards

Fig. 3: Prototypes of CAN Transmitter and Receiver circuits designed on breadboards

 

Make the circuit as is given by the circuit diagram. Make the circuit with your selected parts and connect the motors to the circuit. Optocouplers are used to safeguard the Arduino from High voltage risks.

Project Video


Filed Under: Electronic Projects

 

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Pull up via GPIO
  • Code Optimization
  • Poly Spacing Effect
  • Thyristor Gate Drive
  • Passive Harmonics Filter

RSS Electro-Tech-Online.com Discussions

  • Someone please explain how this BMS board is supposed to work?
  • HV Diodes
  • Question about ultrasonic mist maker
  • DIY bluetooth speaker
  • Disabled son needs advice please
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering