Design and Implementation of MAC Protocol Based on CSMA/CA

The advantage of the CSMA/CA-based MAC protocol is that it is simple and robust. It is suitable for distributed networks. Each node does not need to maintain and dynamically update the status information of neighboring neighbors. It can decide when to access the channel, as long as the upper layer has The data needs to be transmitted, and the MAC layer will compete for the channel, so the application of the protocol is quite extensive. The development of embedded technology also provides a good technical support for the implementation of the MAC protocol. This paper builds an embedded development platform based on the combination of ARM and FPGA, and designs and implements the MAC protocol based on CSMA/CA. Since ARM and FPGA are reconfigurable devices themselves, and some protocol parameters in FPGA are set by ARM, the modification of ARM code can realize the adjustment of protocol functions in FPGA, which is convenient and fast, and no need to regenerate bit files. Download, which is beneficial to the reconfigurable implementation of the MAC protocol.

1 Protocol function description

1.1 Message Structure

This design implements the basic access mode of the CSMA/CA-based MAC protocol. The communication between nodes is only the data frame (DATA) and the acknowledgement frame (ACK). Figure 1 shows the message structure where ACK has no net data portion. Since the wireless communication of one-hop range is considered, there is no relay node, etc., so only the source node number and the destination node number.

Design and Implementation of MAC Protocol Based on CSMA/CA

1.2 Network Design

The MAC protocol designed in this paper not only satisfies the mechanism of detecting the busy channel of the basic physical carrier sensing and virtual carrier sensing, but also includes the interframe space, random backoff, response confirmation and retransmission mechanism.

A node that has data to send will first listen to the medium. If it is busy, it will continue to wait. If the idle time exceeds or equals DIFS or EIFS, it will enter the backoff process. During the execution of the backoff process, the node randomly generates a backoff time to set the backoff timer while continuing to monitor the medium. If the idle time reaches a slot time, the backoff timer subtracts a slot time, if during the medium To become busy, the backoff process will hang until the medium idle time reaches DIFS or EIFS again and then continues the backoff process. When the backoff timer becomes 0, the node is allowed to start transmitting data, and the timeout retransmission mechanism is also started. If the desired ACK is not received within the specified time, the data frame is retransmitted, and the node retransmits. If the number of times exceeds the retransmission threshold, the data frame will be discarded, or the maximum allowed transmission time of the data frame will be exceeded, and the data frame will be discarded. When the node receives the ACK, it will start to prepare for the next data transmission.

The receiving node receives the data frame that is correct and is sent to the local node and will immediately reply to the source node ACK. If the node does not receive the correct data frame, EIFS will be used; if the correct data frame is received, but not to the local node, the node will resolve the duration, update the NAV, and treat the channel as occupied.

1.3 Functional division

This design makes full use of ARM's flexible and convenient advantages, and is used to implement the management of random backoff algorithms and protocol parameters, such as the number of retransmissions and the setting of interframe space. The random backoff algorithm uses the i-th backoff to randomly select a value in 2i time slots as the value that the node needs to back off. The setting of the protocol parameters is done by ARM, mainly considering that the FPGA is not conducive to the modification of the parameters, which can also enhance the reconfigurability of the protocol. The FPGA is used to manage the transmission and reception control of MAC frames with its excellent real-time signal processing advantages.

Dc Motor

A DC motor is any of a class of rotary electrical machines that converts direct current electrical energy into mechanical energy. The most common types rely on the forces produced by magnetic fields. Nearly all types of DC motors have some internal mechanism, either electromechanical or electronic, to periodically change the direction of current flow in part of the motor.


DC motors were the first type widely used, since they could be powered from existing direct-current lighting power distribution systems. A DC motor's speed can be controlled over a wide range, using either a variable supply voltage or by changing the strength of current in its field windings. Small DC motors are used in tools, toys, and appliances. The universal motor can operate on direct current but is a lightweight motor used for portable power tools and appliances. Larger DC motors are used in propulsion of electric vehicles, elevator and hoists, or in drives for steel rolling mills.

dc motor











Dc motor areas of application: smart home field, robotics, precision medical equipment industry, automotive drive field, electronic products and personal care equipment



Application of the product:




dc motordc motordc motor


Features: high torque, low noise, small volume, light weight, easy to use, running constant speed, etc., can also be matched with various gearboxes to change the output speed and torque.


Features: small volume, fast speed, stable performance, low price, good speed regulation.

N20 dc motor dc motor


Method of use: the best stable in horizontal plane, installed on the dc motor output shaft parts, cannot use a hammer to knock, knock prone to press into the dc motor drive, may cause damage to internal components, and cannot be used in the case of blocked.

Dc Motor 2

Operating temperature range:

DC motor should be used at a temperature of -10~60℃.

The figures stated in the catalog specifications are based on use at ordinary room temperature catalog specifications re based on use at ordinary room temperature (approximately20~25℃.

If a geared motor is used outside the prescribed temperature range,the grease on the gearhead area will become unable to function normally and the motor will become unable to start.Depending on the temperature conditions ,it may be possible to deal with them by changing the grease of the motor's parts.Please feel free to consult with us about this.


Storage temperature range:

DC motor should be stored ta a temperature of -15~65℃.

In case of storage outside this range,the grease on the gearhead area will become unable to function normally and the motor will become unable to start.


Service life:

The longevity of DC motor is greatly affected by the load conditions , the mode of operation,the environment of use ,etc.Therefore,it is necessary to check the conditions under which the product will actually be used .The following conditions will have a negative effect on longevity.Please consult with us should any of them apply.

●Use with a load that exceeds the rated torque

●Frequent starting

●Momentary reversals of turning direction

●Impact loads

●Long-term continuous operation

●Forced turning using the output shaft

●Use in which the permitted overhang load or the permitted thrust load is exceeded

●A pulse drive ,e.g.,a short break,counter electromotive force,PWM control

●Use of a voltage that is nonstandard as regards the rated voltage

●Use outside the prescribed temperature or relative-humidity range,or in a special environment.

●Please consult with us about these or any other conditions of use that may apply,so that we can be sure that you select the most appropriate model.


when it come to volume production,we're a major player as well .each month,we rurn out 600000 units,all of which are compliant with the rohs directive.Have any questions or special needed, please contact us, we have the engineer group and best sales department to service to you Looking forward to your inquiry. Welcome to our factory.

dc motor


Dc Motor,Small Dc Motor,Mini Dc Motor,Robot Dc Motor,Dc Motor With Gearbox

Shenzhen Shunchang Motor Co., LTD. , https://www.scgearmotor.com

Posted on