Sensing the position and movement of automotive control functions such as gear selectors and turn signal indicators is an important requirement in modern vehicle design. However, sensing movement in 3 axes is not straightforward and conventional sensor technologies present engineers with challenges. These range from physical device size and reliability to power consumption and cost. Recently introduced 3D magnetic sensing technology is helping engineers to address these challenges.
Electro-mechanical switching is a common source of failure in many applications, including vehicles. Contacts can corrode over time or burn out, causing failure and inconvenience for the vehicle owner and potentially damaging the reputation of the car manufacturer. As such, manufacturers prefer solid-state technology, such as switching based on Hall effect detection of magnetic-signals, wherever possible to increase reliability and save space and cost.Vehicle controls
Two of the most common things we do when driving are signalling to turn and changing gear. In the past, cars relied on heavy-current wiring harnesses to transmit signals and power around the vehicle. Today, using a turn indicator or moving a gear shift is just as likely to send a high-impedance signal to a central processor as it is to physically switch something.
As vehicle controls become more sophisticated and multi-functional, the trend is towards them moving in more than one plane. Many modern cars with automatic gearboxes now offer sequential control by moving the gear lever into a different plane, thus making the task of sensing position more complex.3D position sensing
There are several ways to implement 3D position sensing based upon the Hall effect. Where the movement to be sensed has multiple fixed positions (in the case of a gear lever or turn signal), one approach is to add individual Hall sensors for each possible position, resulting in as many as seven sensor elements, allowing the controller to know the position by knowing which sensor was 'live'.
An alternative solution can be a Hall-based sensor capable of simultaneously determining the x, y, and z coordinates of a magnetic source to build a 3D image of the magnetic field surrounding the sensor.
In my project I'll be portraying how Infineon's 3D magnetic sensor can be the solution that the automotive industry is looking for.Step 1
First thing were going to do is go to Infineon's 3D Magnetic Sensor webpage and download the GUI for 3D Magnetic Sensor 2 GO, this will be the first software we use to determine that our sensor functions properly and to get a sense of its capabilities.Step 2
Our next step is to go to SEGGER Downloads and download the J-Link related software that we will be using to program our sensor.
Step 3(Integration into the Arduino IDE)
Now open Arduino IDE and go to File -> Preferences.
Paste the following URL into the 'Additional Boards Manager URLs' input field under File > Preferences to add Infineon's microcontroller boards to the Arduino IDE.
To install the boards, please navigate to Tools > Board > Boards Manager... and search for XMC. You will find options to install the board files for the microcontrollers. Click "Install" to add the boards to your Arduino IDE.
In the boards list Tools > Board, the XMC microcontroller boards are added and can be used from now on.
In this step will add the Arduino library needed to be able program our 3D Magnetic Sensor. The library I used is the following TLV493D-A1B6-3DMagnetic-Sensor.Step 5
Our final step will be to upload to Arduino IDE the example code I've provided which will depict on our Serial Monitor the X, Y, Z values of the 3D magnetic sensor and we will also be using the on board LED for this example which in this case is pin 14. Once the knob is turned to an "x" value of more than "-1" then the LED is turned on, below "-1" the LED is off. In the following videos you can see the infineon 3D magnetic sensor board being tested with infineon's GUI, Arduino and finally with the code I've provided.
Remote control of Infineon 3D magnetic sensor
We can also remotely operate our sensor via a computer app In the following steps I'll demonstrate how you can create a simple app to turn the on board LED on/off.
First step is to download an application called Processing. This program will help us create a GUI for our sensor. You can download the software from the following link Processing Download Page.
The second step is once the zip file has been downloaded we unzip it and install Processing.
In this step were going to import the library we need to use for our LED on/off example. The library were going to use is called ControlP5.To install new library from menu, go to: Sketch -> Import Library -> Add Library.
Our final step will be to open Arduino IDE and put in the code I've provided (Arduino Processing GUI Code) and upload to our board. We will also open Processing and put in the code I provided for Processing (Processing GUI Code) and then after were done putting in the code we click on the run button that's on the left side of the programming environment window.