**Understanding CAN Bus: A Key Component in Car Electronics**
The Controller Area Network (CAN) bus is a powerful technology that enables communication between different devices within a vehicle. In this article, we will delve into the world of CAN bus and explore its features, benefits, and applications.
**Voltage Requirements and Signal Interpretation**
For CAN bus to function properly, the differential voltage between high and low levels must be above 2 volts. In our case, the common voltage is 2.3 volts, with a high level of 2.9 volts and a low level of around 1 volt. This ensures that data transmission is accurate and reliable. When both lines are actively driven by a CAN transceiver, the data represents a zero, which is dominant. Conversely, when the transceiver is in the idle state, the voltage returns to the common voltage, representing a 1 and is recessive.
**CAN Bus Priority System**
One of the key advantages of CAN bus is its ID-based priority system. When two devices in the CAN bus system of a car want to send a frame at the exact same time, one device will override the other based on its ID. For instance, if one device has the ID 0 and the other has the ID 5, both will start sending out lots of zeros. However, since the dominant bit (zero) is actively driven, it overrides the recessive bit (one) voltage values, resulting in a zero on the data line. The ID zero device reads the line and says everything is fine, but the ID five device reads the zero as an ordered sent-out bit one, realizing that there's another device attempting to send with a lower ID and thus higher priority.
**CAN Bus Frame Protocol**
A typical CAN frame consists of the CAN ID, actual data, 16 bits for cyclic redundancy check (CRC), and two-bit phone acknowledge. These bits allow the transmitter and receiver to check whether the correct data was being transmitted, making the CAN bus frame protocol pretty error-free. Combine this with the fact that the data wires come as a twisted pair and use a differential voltage, and you get a robust system similar to RS-485.
**CAN Bus Applications**
The CAN bus is used in various applications, including car electronics, industrial control systems, and medical devices. Its advantages include:
* High-speed communication (up to 1 Mbit/s)
* Low-power consumption
* High-reliability data transmission
However, the CAN bus has some limitations, such as half-duplex operation, asynchronous signaling, and lack of standardized connectors.
**Conclusion**
In conclusion, the CAN bus is a powerful technology that enables reliable communication between devices within a vehicle. Its ID-based priority system, robust frame protocol, and high-speed communication capabilities make it an essential component in car electronics and other applications.
WEBVTTKind: captionsLanguage: enI'm currently creating a giant battery pack for my electric longboards which I showed you how to build in a previous video but while I was getting close to finishing the first test with its I started to notice that while using a very small total inputs both hub motor wheels do not start spinning at the exact same time even though both electronic speed controllers get the same ppm signal from the remote control since the inputs are basically connected in parallel of course such a small misalignment of the unloaded RPMs does not mean that there will be a big power difference between both wheels while driving since I could not feel anything significant like that during my previous test rides but just to be on the safe side I will show you in this video how I used the can bus of the FS EC's in order to fix this problem and while we're at it I will also tell you the most important information about the can bus and show you where else it has been used let's get started this video is sponsored by jl CPC bia who is currently offering free SMT assembly service for one month which started at thanksgiving 2019 so make sure to upload your java files and get your excellent quality PCBs produced within 24 hours for one of the cheapest prices in the industry when having a look at the documentation of the original vese then we can easily find out that the campus porch is located next to the mini USB port it's 4 pins are labeled as 5 volts and ground which are the power lines and can age and can L know the term can is an abbreviation for controller area network basically puts it is a serial bus system that allows microcontrollers and devices to communicate with one another through messages without the need of a host computer and it was firstly used and is still mostly used in cars you know I actually just upgraded the music system of my car and that was the moment I started to wonder how exactly all the buttons knobs lights motors and sensors talk to each other in order to fulfill simple tasks like lifting up a window or more complex tasks like a parking assistance the answer is obviously the campus which only requires two wires known as can age and can L in order to connect all electronic control units in a car which are also known as nodes in a canvas this way all nodes can send messages aka frames to one another and since this linear bus configuration only requires two wires we also save quite a bit of copper which makes the system pretty cheap to implement because the hardware is also not expensive now the H stands for higher and the L behind can for low but before understanding exactly why I cut myself to four pin connectors which I pushed into the cam ports of the FS ECS and whose can age and can L wires I then solder together to activate the can functionality of the f SE C's I simply had to alter the can status message mode in the vese software as well as changing the multiple VES CS over can up - true afterwards I obviously had to repeat the software procedure with the second FS ESEA and as you can see even though I removed the RC input wire from one of the FS ESEA both wheels turned perfectly fine and this time even without any noticeable rpm difference between them so it was finally time to inspect the can H and canal voltages on the oscilloscope and as some of you probably already suspected we can h-line swings up to a high voltage while we can outline swings down to low voltage if we simplify it's a proper parts of a can bus frame could look something like this electrically speaking the command bus voltage should be between 1.5 and 3 point 5 volts and the differential voltage between high and low should be above 2 volts in our case the common voltage is 2.3 volts with a high level of two point nine volts and a low level of around 1 volts which is certainly good enough when both lines are actively driven by a can transceiver then the data represents a zero which is dominant and when the transceiver is in the idle state the voltage returns to the common voltage which represents a 1 and is recessive those key words dominance and recessive are important for the canvas as an example let's imagine we got two devices in the campus system of a car that want to send a frame at the exact same time one of the first things they send out according to the can friend protocol is the can idea so as an example one device has the ID 0 and the other the ID 5 both start off by sending out lots of zeros and it is important to note that after every bit transmission each device reached the voltage lines and you will see why in a second because now the device with the ID five cents out one while the device both id0 still sends out a zero but because the dominant bit zero is actively driven it basically overrides the recessive big bond voltage values and thus there's a zero on the data line the ID zero device reads the line and says everything is fine because I just send out a zero but the ID five device reads the zero which is obviously an ordered sent out bit one and realizes that there's another device also attempting to send with a lower idea and thus a higher priority at this point the ID five device stops a transmission and will only restart it after the ID zero device is done talking in a nutshell that means that the Kambiz features an ID based priority system which prevents collision arrows between devices almost the last big advantage of the campus can be found if we look at a typical can frame like already stated we got the can idea as well as the actual data we want to transmit but also sixteen bits for cyclic redundancy check and two-bit phone acknowledge those bits allow the transmitter and receiver to check whether the correct data was being transmitted which makes the campus frame protocol pretty error-free combine that with the fact that the data wires come as a twisted pair and use a differential voltage and you got yourself a pretty robust system which is actually kind of similar to the rs-485 data transmission I talked about in a previous video with that I mean that it is also half duplex which means a device can either send or receive data but not simultaneously it is asynchronous which means there's no clock line and thus all devices synchronized themselves depending on the set baud rate and the time point when a voltage change occurs there's no standardized connector and they both require termination resistance whose location and value were slightly altered for the campus depending on what kind of campus you are working with there exists high-speed can with speeds of up to one megabit per second low speed can both 125 cubed per second and can FDA were 5 megabyte per seconds but since talking about each of them and detail here or how exactly the kind of frame protocol looks like would be a bit too much I highly recommend you to check out the link articles in the video description in order to find out more about the subject but anyway with the most important information being in your head now i reassemble my electric long boards whose wheels not only react identical now but also feature our traction control simplified speaking this feature matches the power consumption and rpm of the wheels and thus the board should have better traction in for example curves or in muddy terrain and with that being said my electric longboard improvement was complete and I hope that you learned a bit about what the campus can do and why it was an important step for car electronics and everything involved with them and by the way they're also exists handy can controller / transceiver boards online which you can easily connect to not we know in order to read or write from or to a can bus and thus send out control data or read data in order to add a bit of extra functionality to an existing system but that is a subject for another video until then don't forget to Like share subscribe and hitting the notification bell stay creative and we'll see you next timeI'm currently creating a giant battery pack for my electric longboards which I showed you how to build in a previous video but while I was getting close to finishing the first test with its I started to notice that while using a very small total inputs both hub motor wheels do not start spinning at the exact same time even though both electronic speed controllers get the same ppm signal from the remote control since the inputs are basically connected in parallel of course such a small misalignment of the unloaded RPMs does not mean that there will be a big power difference between both wheels while driving since I could not feel anything significant like that during my previous test rides but just to be on the safe side I will show you in this video how I used the can bus of the FS EC's in order to fix this problem and while we're at it I will also tell you the most important information about the can bus and show you where else it has been used let's get started this video is sponsored by jl CPC bia who is currently offering free SMT assembly service for one month which started at thanksgiving 2019 so make sure to upload your java files and get your excellent quality PCBs produced within 24 hours for one of the cheapest prices in the industry when having a look at the documentation of the original vese then we can easily find out that the campus porch is located next to the mini USB port it's 4 pins are labeled as 5 volts and ground which are the power lines and can age and can L know the term can is an abbreviation for controller area network basically puts it is a serial bus system that allows microcontrollers and devices to communicate with one another through messages without the need of a host computer and it was firstly used and is still mostly used in cars you know I actually just upgraded the music system of my car and that was the moment I started to wonder how exactly all the buttons knobs lights motors and sensors talk to each other in order to fulfill simple tasks like lifting up a window or more complex tasks like a parking assistance the answer is obviously the campus which only requires two wires known as can age and can L in order to connect all electronic control units in a car which are also known as nodes in a canvas this way all nodes can send messages aka frames to one another and since this linear bus configuration only requires two wires we also save quite a bit of copper which makes the system pretty cheap to implement because the hardware is also not expensive now the H stands for higher and the L behind can for low but before understanding exactly why I cut myself to four pin connectors which I pushed into the cam ports of the FS ECS and whose can age and can L wires I then solder together to activate the can functionality of the f SE C's I simply had to alter the can status message mode in the vese software as well as changing the multiple VES CS over can up - true afterwards I obviously had to repeat the software procedure with the second FS ESEA and as you can see even though I removed the RC input wire from one of the FS ESEA both wheels turned perfectly fine and this time even without any noticeable rpm difference between them so it was finally time to inspect the can H and canal voltages on the oscilloscope and as some of you probably already suspected we can h-line swings up to a high voltage while we can outline swings down to low voltage if we simplify it's a proper parts of a can bus frame could look something like this electrically speaking the command bus voltage should be between 1.5 and 3 point 5 volts and the differential voltage between high and low should be above 2 volts in our case the common voltage is 2.3 volts with a high level of two point nine volts and a low level of around 1 volts which is certainly good enough when both lines are actively driven by a can transceiver then the data represents a zero which is dominant and when the transceiver is in the idle state the voltage returns to the common voltage which represents a 1 and is recessive those key words dominance and recessive are important for the canvas as an example let's imagine we got two devices in the campus system of a car that want to send a frame at the exact same time one of the first things they send out according to the can friend protocol is the can idea so as an example one device has the ID 0 and the other the ID 5 both start off by sending out lots of zeros and it is important to note that after every bit transmission each device reached the voltage lines and you will see why in a second because now the device with the ID five cents out one while the device both id0 still sends out a zero but because the dominant bit zero is actively driven it basically overrides the recessive big bond voltage values and thus there's a zero on the data line the ID zero device reads the line and says everything is fine because I just send out a zero but the ID five device reads the zero which is obviously an ordered sent out bit one and realizes that there's another device also attempting to send with a lower idea and thus a higher priority at this point the ID five device stops a transmission and will only restart it after the ID zero device is done talking in a nutshell that means that the Kambiz features an ID based priority system which prevents collision arrows between devices almost the last big advantage of the campus can be found if we look at a typical can frame like already stated we got the can idea as well as the actual data we want to transmit but also sixteen bits for cyclic redundancy check and two-bit phone acknowledge those bits allow the transmitter and receiver to check whether the correct data was being transmitted which makes the campus frame protocol pretty error-free combine that with the fact that the data wires come as a twisted pair and use a differential voltage and you got yourself a pretty robust system which is actually kind of similar to the rs-485 data transmission I talked about in a previous video with that I mean that it is also half duplex which means a device can either send or receive data but not simultaneously it is asynchronous which means there's no clock line and thus all devices synchronized themselves depending on the set baud rate and the time point when a voltage change occurs there's no standardized connector and they both require termination resistance whose location and value were slightly altered for the campus depending on what kind of campus you are working with there exists high-speed can with speeds of up to one megabit per second low speed can both 125 cubed per second and can FDA were 5 megabyte per seconds but since talking about each of them and detail here or how exactly the kind of frame protocol looks like would be a bit too much I highly recommend you to check out the link articles in the video description in order to find out more about the subject but anyway with the most important information being in your head now i reassemble my electric long boards whose wheels not only react identical now but also feature our traction control simplified speaking this feature matches the power consumption and rpm of the wheels and thus the board should have better traction in for example curves or in muddy terrain and with that being said my electric longboard improvement was complete and I hope that you learned a bit about what the campus can do and why it was an important step for car electronics and everything involved with them and by the way they're also exists handy can controller / transceiver boards online which you can easily connect to not we know in order to read or write from or to a can bus and thus send out control data or read data in order to add a bit of extra functionality to an existing system but that is a subject for another video until then don't forget to Like share subscribe and hitting the notification bell stay creative and we'll see you next time