Tips and tricks for using sensors – a blessing

Create Date: 2024-8-30 12:03:23|Source: P+F/Double Blessing

Tip 1 – Start with the bus stuff

As a first step, the engineer should use the method of first interfacing the sensor to constrain the ignorance through a bus thing. A bus connects a personal computer (PC) to the sensor's I2C, SPI, or other protocol that allows the sensor to "speak". The PC application associated with the bus stuff provides an embedded microcontroller (MCU) driver that is not known and uncertified to send and receive data from a known and job history. In the context of the bus stuff, developers can send and receive audio to get an idea of how that part works, before attempting to operate at the embedded level.

Tip 2 – Write the transport interface code in Python

Once the developer has tried to use the bus stuff for the sensor, the next step is to write the code for the sensor. Instead of jumping directly to the microcontroller code, I write the application code in Python. Many bus stuff in writing scripts comes with plug-ins and model code, and Python is usually one of the languages available with .NET. Writing an application in Python is quick and easy, and provides a way to test sensors in the application without the clutter of testing in an embedded environment. Having a high level of code will make it easy for non-embedded engineers to discover sensor scripts and tests without the need for an embedded software engineer.

Tip 3 – Test the sensor with Micro Python

One of the advantages of writing the first paragraph of application code in Python is that it can be easily replaced by calling Micro Python and using the program programming interface (API). Micro Python runs on a Cortex-M4 processor and is a great environment to debug the code of applications with a number of sensors that engineers can use to understand the value of the real-time embedded software. Not only is it simple, but there is no need to write I2C or SPI drivers here, as they are already included in the Micro Python library. (More details can be found on the EDN website in the articles Using Micro Python for real-time software development or 5 Advantages of using Micro Python for Embedded Software Programming.) )

Tip 4 – Use the sensor vendor code

Any model code that can be "scoured" from a sensor manufacturer would take an engineer a long way to understand how the sensor works. Unfortunately, many sensor vendors are not experts in embedded software design, so don't wait to find a beautiful architecture and elegant example ready for production. Just use the vendor code and learn how this part works, and then the frustration of refactoring will set up until it can be neatly integrated into the embedded software. It may be as preliminary as "spaghetti in Italy", but using the manufacturer's understanding of how its sensors work will help cut a lot of ruined weekends before the product is launched.

Tip 5 – Use a sensor fusion library

Chances are, the sensor's interface isn't too new, and no one has done it before. All known libraries, such as the "sensor fusion libraries" provided by many chip manufacturers, help developers get to grips quickly, and even better, and avoid falling into the cycle of redeveloping or overhauling the product architecture. Many sensors can be integrated into generic types or classes that will allow drivers to be developed smoothly and, if handled properly, almost ubiquitously or rarely reusable. Look for these sensor fusion libraries and learn about their advantages and disadvantages.

                                  Tips and tricks for using sensors – a blessing

More on that
Introduction to the application of the tracking system Introduction to the application of the tracking system

The Finder and the Finder are in use in the automotive industry for the first time, and a variety of ways to use them are proposed: RFID is commonly used in the automotive industry for tracking and traceability. There is a growing demand for customized treatment solutions.

Features of the isolated safety barrier Features of the isolated safety barrier

The isolated barrier can be adapted for PCL applications. If the working environment of the field equipment is relatively bad, resulting in the signal sensing line of the PLC breaking the skin and connecting with other lines of different voltages or shorting to the equipment at the same time, there will be strong electricity into the pIc input port, which will cause the whole module to be burned, resulting in ...

The role and working principle of the P+F encoder The role and working principle of the P+F encoder

The operation principle and infection of the P+F encoder: it is a modified sensor that converts the change displacement into a series of digital pulse signals, these pulses can be used to control the angular displacement, if the P+F encoder is connected to the gear bar or spiral screw, it can also be used to measure the straight line.

A brief introduction to our sensors A brief introduction to our sensors

Proximity sensors are a general term for sensors that replace contact detection methods such as limit switches and do not require contact detection of the detected object. It is capable of converting information about the motion and presence of objects into electrical signals. The detection method of replacing the electrical signal includes: using an electromagnetic induction bow to ...

Benefits and features of our industrial sensors Benefits and features of our industrial sensors

The R2 and R3 series of photoelectric sensors are impressive products that characterize a very small housing plan. Robust R2/R3 miniature photoelectric sensors – smaller than a matchbox, space-saving miniature housing photoelectric sensors R2/R3 series ...

Analysis of the causes of repairs encountered in encoders – Doublebless Analysis of the causes of repairs encountered in encoders – Doublebless

1. Encoder self-failure: It refers to the failure of the encoder's own components, resulting in its inability to generate and output correct waveforms. In this case, the encoder needs to be replaced or the internal equipment repaired. 2. The encoder connection cable is faulty ...

Problems and analysis of P+F encoders in use Problems and analysis of P+F encoders in use

Analysis of the causes of the problems encountered by P+F in the use of encoders: 1. Grating pollution This will reduce the signal output amplitude, and the oil must be quietly wiped off with absorbent cotton dipped in anhydrous alcohol. 2. Encoder connection cable ...

Applications for capacitive sensors – we are blessed Applications for capacitive sensors – we are blessed

Capacitive sensors have the advantages of simple structure, high temperature resistance, radiation resistance, high resolution, and good dynamic response characteristics, and are widely used in the measurement of pressure, displacement, acceleration, thickness, vibration, liquid level, etc. However, it is necessary to pay attention to the following aspects in the application of the influence on the measurement results: ...

Factors influencing the measurement accuracy of ultrasonic sensors Factors influencing the measurement accuracy of ultrasonic sensors

Measurement accuracy generally refers to the affirmative accuracy of the measurement value of the analog output. Depending on the echo transmission moment, the measurement accuracy of the ultrasonic sensor relies on several physical parameters. These parameters are generally related to air and internal errors. Environment...

The main classification of encoders – Beggarb The main classification of encoders – Beggarb

Encoders can be classified as follows. 1. Classification according to the engraving method of the code disc (1) Incremental type: that is, every time the viewpoint of the unit is rotated, a pulse signal is announced (there is also a sine and cosine signal, and then it is ...

The UHF F190 and F192 series readers are launched on the market The UHF F190 and F192 series readers are launched on the market

With the rapid development of automation technology, what kind of RF identification skills can be called "cutting-edge"? Reliable identification + seamless data transmission + continuous system operation, these three points are indispensable, and the UHF F190/F192 series launched by Bejiafu is a combination of many advantages. On a global scale ...

How to choose a pressure sensor fitting – we are blessed How to choose a pressure sensor fitting – we are blessed

There are not many single ferrule terminal joints on the market now, and most manufacturers are using double ferrule terminal joints, and the market price is about 9-18 yuan, and the price is different according to different types. Fittings, whether double ferrule end fittings or single ferrule end fittings, are all selected.

Attention to the problem of testing six-wire load cells – we are blessed with it Attention to the problem of testing six-wire load cells – we are blessed with it

Because the appearance of the six-wire sensor and the six-wire four-wire sensor can not be distinguished, before the measurement and verification personnel test the sensor, if they find that the sensor input and output cable has six wires, it should be clear whether the sensor is a six-wire sensor, and the six-wire load cell test can not use a fine digital voltmeter...

P+F precautions for the use of safety barriers P+F precautions for the use of safety barriers

The safety barrier, also known as the safety energy limiter, is an important part of the intrinsic safety system. There are two main types of safety barriers: P+F Zener barriers and P+f barrier barriers. The core components of the Zener barrier are Zener diodes, current-limiting resistors and fast fuse wires. ...

The steps of the use of the photoelectric switch The steps of the use of the photoelectric switch

1. Self-conditioning. At the beginning of use, please check whether the switch itself is defective and whether the appearance is defective. 2. When using the EL130 photoelectric switch to avoid obstructions, some goods such as colored goods. Less reflective goods. Goods with large gaps between small pieces ...

The difference between DC and AC contactors – we are blessed The difference between DC and AC contactors – we are blessed

1. The core is different: the core of the communication contactor will suffer eddy current and hysteresis loss, while the DC contactor has no core loss. Therefore, the core of the communication contactor is made of mutually insulated silicon steel sheets, and is often made into an E-shape; The core of the DC contactor is made of a single piece of mild steel, ...

Pressure Transmitter Verification Regulations Pressure Transmitter Verification Regulations

A pressure transmitter is a type of instrument that converts a pressure variable into a consistent output signal that can be transmitted, and there is a given continuous function relationship between the output signal and the pressure variable, which is generally a linear function. Pressure variables include positive and negative pressure, differential pressure and pressure. Pressure transmitters are available in electric and ...

Installation and assembly of ultrasonic sensors Installation and assembly of ultrasonic sensors

Ultrasonic sensors are used for the inspection of printed circuit boards (PCBs), where ultrasonic sensors are used to inspect printed circuit boards. So what factors need to be taken into account when installing and assembling ultrasonic sensors? Ultrasonic ...

Illustrate the dynamic characteristics and linearity of our sensors Illustrate the dynamic characteristics and linearity of our sensors

The dynamic characteristics of a sensor refer to the characteristics of the output of the sensor when the input changes. In practice, the dynamic characteristics of the sensor are often indicated by its echo to some normative input signals, because the echo of the sensor to the normative input signal is easy to obtain by experimental methods, ...

Sensor selection Sensor selection

The company is a company focusing on the development of mechanical motion control and sensing skills, and its products have the characteristics of high reliability, high accuracy and high protection, and play an irreplaceable role in the process of industrial production and mechanical manufacturing. ...

CATEGORIES BYPASS
Customer Service Center

Online Consultation:QQ


ContactContact

Contact: Manager Huang

Contact QQ: 3271883383

Contact number: 13522565663


Scan the code to add WeChat (please save the picture first on the mobile phone)

working hoursworking hours

Weekdays: 9:00-17:00

Holidays: Only emergencies are handled

Contact us

Contact us

Contact number QQ consultation
QQ consultation

3271883383

Company address
Back to top