{"id":79086,"date":"2024-10-04T10:05:37","date_gmt":"2024-10-04T10:05:37","guid":{"rendered":"https:\/\/electronicsmaker.com\/?p=79086"},"modified":"2024-10-07T04:23:40","modified_gmt":"2024-10-07T04:23:40","slug":"lid-angle-detection-with-2-st-sensors-or-the-better-way-to-track-hinges-on-foldable-products","status":"publish","type":"post","link":"https:\/\/electronicsmaker.com\/lid-angle-detection-with-2-st-sensors-or-the-better-way-to-track-hinges-on-foldable-products","title":{"rendered":"Lid angle detection with 2 ST sensors or the better way to track hinges on foldable products"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"600\" height=\"257\" src=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/Featured-image-1140x489-6.jpg\" alt=\"\" class=\"wp-image-79087\" srcset=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/Featured-image-1140x489-6.jpg 600w, https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/Featured-image-1140x489-6-300x129.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n<p>What if the industry has been doing lid angle detection all wrong, and the solution wasn\u2019t to use magnets? The claim is bold, but that\u2019s precisely what ST demonstrated in a series of patents that use inertial MEMS and sensor fusion to determine the position of a lid relative to its base. By using two LSM6DSV16Xs, one on each panel, accelerometers and gyroscopes can compute the hinge angle. The method is obviously very different from the traditional lid angle detection mechanism that relies on a Hall effect sensor, and for good reasons since a customer asked us to find an alternative because its teams couldn\u2019t use the traditional method.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why the industry needed an alternative to Hall effect sensors<\/h4>\n\n\n\n<p><strong>The idea that never went away<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img decoding=\"async\" width=\"400\" height=\"266\" src=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07615.jpg\" alt=\"\" class=\"wp-image-79088\" srcset=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07615.jpg 400w, https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07615-300x200.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><figcaption class=\"wp-element-caption\">ST\u2019s lid angle detection application with two LSM6DSV16Xs<\/figcaption><\/figure><\/div>\n\n\n<p>After decades of innovations and design revolutions in smartphones, laptops, wearables, and more, using a system that can fold onto itself is as popular as ever. For some categories of products, like laptops, not utilizing a hinge is inconceivable, as folding the screen onto the keyboard is mandatory to ensure portability. In other cases, like smartphones, foldability is making a comeback, with some market studies predicting strong growth. Consequently, computing the hinge\u2019s angle is critical as it makes the system smarter and more efficient. For instance, knowing that panels are closed can trigger a low-power mode. Similarly, the user interface can change depending on the angle by showing different feature sets or split views, accordingly.<\/p>\n\n\n\n<p><strong>How to get away with Hall effect sensors<\/strong><\/p>\n\n\n\n<p>However, the current solution can sometimes clash with new foldable form factors. Indeed, for years, makers have used a Hall effect sensor to compute the lid\u2019s angle, but it was to determine whether the product was opened or closed. In a nutshell, a Hall sensor works by using the properties of an electromagnetic field. Engineers place a magnet on the lid and the sensor on the base. As the lid closes, the magnet gets closer to the sensor, and the electromagnetic field causes a shift in the flow of current traversing the sensor. The magnetic flux affects the electrical potential within the sensor, resulting in a change in voltage that the system can measure to determine the lid\u2019s position.<\/p>\n\n\n\n<p><strong>The problems with Hall sensors that won\u2019t go away<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img decoding=\"async\" width=\"400\" height=\"266\" src=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07617.jpg\" alt=\"\" class=\"wp-image-79089\" srcset=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07617.jpg 400w, https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07617-300x200.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><figcaption class=\"wp-element-caption\"><em>Testing the lid angle detection by opening a case<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>Originally, Hall sensors and magnets worked well in laptops, but they could only tell whether the lid was opened or closed, which limited the feature\u2019s utility. That\u2019s why computer makers simply used the technology to trigger a sleep mode, turn the display off, or start a wake-up routine. As teams looked to compute a more precise angle and offer more features, they had to add two accelerometers. The inertial sensors could help determine the position of the lid with far greater precision, which opened the door to new features, like launching a tablet UI when the user flipped the screen.<\/p>\n\n\n\n<p>However, while there\u2019s more room in a laptop to add components, space is a lot more precious inside a foldable smartphone. Moreover, integrators can struggle to find the right spot for the magnet as it can easily interfere with other components. Whether it\u2019s a memory module that could see its bits flipped, a display that could suffer image distortion or a wireless signal that could be disrupted, it\u2019s critical to ensure that other components are shielded or kept away from the magnetic field. Unfortunately, it can be pretty challenging, especially because engineers need precise measurements, which means that sensor placement is critical.<\/p>\n\n\n\n<p>Besides the design issues, requiring the precise positioning of multiple sensors can make the manufacturing process more complex and expensive. This issue is further compounded by the need for extensive calibration. Finally, the accelerometers are inherently limited because they cannot distinguish between the dynamic acceleration caused by the user\u2019s movement and the static acceleration resulting from gravity. Moroever, it\u2019s impossible to determine the angle when the device is upright, and the hinges are parallel to the gravitational force.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why ST\u2019s lid angle detection approach is gaining traction<\/h4>\n\n\n\n<p><strong>Looking at it from a different angle<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"266\" src=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07618.jpg\" alt=\"\" class=\"wp-image-79090\" srcset=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07618.jpg 400w, https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07618-300x200.jpg 300w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><figcaption class=\"wp-element-caption\"><em>Testing the lid angle detection system by closing the case<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>For all those reasons, one of our customers asked us to find an alternative to the Hall effect sensor. That\u2019s why we decided to approach the problem from a different angle (pun intended). Instead of relying on a magnetic field, we chose to use two LSM6DSV16Xs that incorporate an accelerometer and a gyroscope. Consequently, this method bypasses the challenges caused by a magnetic field, and the gyroscope compensates for the shortcomings of using an accelerometer only. Put simply, the system works regardless of its orientation. Additionally, using two IMUs offers greater accuracy, thus enabling the computation of more precise angles in more use cases.<\/p>\n\n\n\n<p>Additionally, using two inertial sensors means developers no longer have to carve an exception in their program when the hinges are parallel to gravity. To make developments even more straightforward, we offer libraries that handle the inputs from the two MEMS and perform sensor fusion to improve results. Concretely, our solution reduces noise by 30% compared to a system that doesn\u2019t use our sensor fusion algorithm. In practical terms, our demo application takes 7.1 KiB of flash and 1.5 KiB of RAM and has a runtime of less than 100 \u00b5s. Consequently, it is possible to use this system in low latency situations like gaming, optical image stabilization, or AR and VR.<\/p>\n\n\n\n<p><strong>Angling the future of lid angle detection<\/strong><\/p>\n\n\n\n<p>There are also costs and power consumption considerations. Increasingly, integrators naturally add IMUs to their system because they need them for orientation detection, free fall monitoring, and more. The ability to use two IMUs to compute the lid angle thus means using devices already on the PCB or, at least, reducing the number of single-purpose components on the system, making the overall bill of materials far more profitable. Manufacturing is also simpler since there\u2019s no longer a need for precise alignment and complex calibration procedures.<\/p>\n\n\n\n<p>There\u2019s also something to be said about the power consumption. In and of itself, a Hall sensor needs less current than an IMU. However, since many designs already use inertial sensors and can serve multiple purposes, reducing the number of components on the PCB lowers the overall power consumption. Additionally, a device like the LSM6DSV16X provides a lot more granularity thanks to its many operating modes. Consequently, engineers have a lot more room to tweak their system to find the best trade-off between the quality of the data they obtain and the sensor\u2019s current consumption.<\/p>\n\n\n\n<p>Additionally, it is possible to use our ISPUs, such as ISM330IS and LSM6DSO16IS. The sensor has a processing unit to alleviate the need for a host MCU for certain computations. It is, therefore, one of the best ways to lower overall power consumption. As engineers evaluate whether to process some of the data directly on the sensor, using the ISPU to compute the lid angle is a very straightforward way to reap massive benefits by offering a much lower power consumption while keeping the accuracy and performance.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"450\" src=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07678-800x600-1.jpg\" alt=\"\" class=\"wp-image-79091\" srcset=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07678-800x600-1.jpg 600w, https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/DSC07678-800x600-1-300x225.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>What if the industry has been doing lid angle detection all wrong, and the solution wasn\u2019t to use magnets? The claim is bold, but that\u2019s precisely what ST demonstrated in a series of patents that use inertial MEMS and sensor fusion to determine the position of a lid relative to its base. By using two [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":79087,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[8,209,225],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Lid angle detection with 2 ST sensors or the better way to track hinges on foldable products - Electronics Maker<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.st.com\/lid-angle-detection\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lid angle detection with 2 ST sensors or the better way to track hinges on foldable products - Electronics Maker\" \/>\n<meta property=\"og:description\" content=\"What if the industry has been doing lid angle detection all wrong, and the solution wasn\u2019t to use magnets? The claim is bold, but that\u2019s precisely what ST demonstrated in a series of patents that use inertial MEMS and sensor fusion to determine the position of a lid relative to its base. By using two [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.st.com\/lid-angle-detection\/\" \/>\n<meta property=\"og:site_name\" content=\"Electronics Maker\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-04T10:05:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-07T04:23:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/Featured-image-1140x489-6.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"257\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\">\n\t<meta name=\"twitter:data1\" content=\"Electronics Maker\">\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data2\" content=\"5 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/electronicsmaker.com\/#website\",\"url\":\"https:\/\/electronicsmaker.com\/\",\"name\":\"Electronics Maker\",\"description\":\"Electronics Magazine\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/electronicsmaker.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.st.com\/lid-angle-detection\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/electronicsmaker.com\/wp-content\/uploads\/2024\/10\/Featured-image-1140x489-6.jpg\",\"width\":600,\"height\":257},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.st.com\/lid-angle-detection\/#webpage\",\"url\":\"https:\/\/blog.st.com\/lid-angle-detection\/\",\"name\":\"Lid angle detection with 2 ST sensors or the better way to track hinges on foldable products - Electronics Maker\",\"isPartOf\":{\"@id\":\"https:\/\/electronicsmaker.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.st.com\/lid-angle-detection\/#primaryimage\"},\"datePublished\":\"2024-10-04T10:05:37+00:00\",\"dateModified\":\"2024-10-07T04:23:40+00:00\",\"author\":{\"@id\":\"https:\/\/electronicsmaker.com\/#\/schema\/person\/df9e9cfbf590f29e49716824dd7d81f9\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.st.com\/lid-angle-detection\/\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/electronicsmaker.com\/#\/schema\/person\/df9e9cfbf590f29e49716824dd7d81f9\",\"name\":\"Electronics Maker\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/electronicsmaker.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a4af77a4fcb00c5dfc7c1ca124a492b4?s=96&d=mm&r=g\",\"caption\":\"Electronics Maker\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/posts\/79086"}],"collection":[{"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/comments?post=79086"}],"version-history":[{"count":2,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/posts\/79086\/revisions"}],"predecessor-version":[{"id":79094,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/posts\/79086\/revisions\/79094"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/media\/79087"}],"wp:attachment":[{"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/media?parent=79086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/categories?post=79086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/electronicsmaker.com\/wp-json\/wp\/v2\/tags?post=79086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}