Menu English Ukrainian russian Home

Free technical library for hobbyists and professionals Free technical library


ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING
Free library / Schemes of radio-electronic and electrical devices

Low battery indicator for a computer mouse. Encyclopedia of radio electronics and electrical engineering

Free technical library

Encyclopedia of radio electronics and electrical engineering / Computers

Comments on the article Comments on the article

Microsoft's wireless computer mouse is powered by two galvanic cells or batteries. Here are the measured values ​​of the current consumed from the batteries: 36,6 mA - with the active work of the "mouse"; 3,9 mA - at the end of active work; less than 1,1 mA - a few minutes after that; 80 ... 92 µA - in the "sleep" state (to restore activity, you must click on any button of the "mouse").

This manipulator is built on the NT82M72 microcontroller, equipped with a built-in 27 MHz transmitter. According to the description, the microcontroller is operational at a voltage of 2 ... 3,3 V. I can confirm that as long as the voltage of each of the two batteries installed in the "mouse" exceeds 1 V, it really works without failures. But often, especially after prolonged use, the batteries are discharged unevenly. Although one of them still retains a sufficient charge, the voltage of the second has already dropped well below 1 V.

This also happens when using galvanic cells. Usually, when the "mouse" supply voltage is unacceptably low, its cursor on the computer screen starts to twitch, and then randomly jump from place to place. But to determine which of the batteries is too low, you can not do without a voltmeter.

Computer mouse battery low indicator
Fig. 1

Based on the need to control the degree of charge of both elements, I developed and built an indicator into the "mouse". It contains a minimum number of components and is built on an ATtiny25V-10SU microcontroller capable of operating from a voltage of 1,8 V. The indicator circuit is shown in fig. 1, and the configuration of the microcontroller, which must be set when programming it, is in Table. 1. At the time of programming, the microcontroller pins are connected to the programmer in the following order: 1 - RST, 4 - GND, 5 - MOSI, 6 - MISO, 7 - SCK, 8 - VCC. It is better to turn off the HA1 piezo sound emitter for this time, the rest of the programming elements will not interfere.

Computer mouse battery low indicator

When the signaling device is operating, the supply voltage to the microcontroller DD1 is supplied from the same elements G1 and G2 as to the mouse controller. LEDs HL1 and HL2 begin to flash periodically when the voltage of elements with the same serial numbers is less than 1 V. Resistors R2 and R3 set the LED current. Piezo sound emitter HA1 will signal the unacceptable discharge of any of the batteries. Applied LEDs KP-1608MGC - for surface mounting green glow. They can be replaced by any other, suitable in color and brightness of the glow and size.

To reduce the current consumed by the signaling device, the DD1 microcontroller is clocked from the built-in generator with a frequency of 128 kHz and most of the time is in the "sleep" mode. At the signal of the watchdog timer, the microcontroller “wakes up” every 2 s, starts the ADC built into it, which measures the voltage at pins 2 and 3, and compares the obtained values ​​with the valid ones stored in memory.

The average current consumed by the microcontroller during the operation of the ADC and the execution of calculations is 9 μA. When a signal is applied (one LED is on and the sound emitter HA1 is working), the current increases to 1 mA. At the end of the signal, the microcontroller "falls asleep" again and the current consumed decreases to 6,5 μA.

With the simultaneous discharge of the elements to 1 V, their total voltage at the power outputs of the DD1 microcontroller will become 2 V, which is 0,2 V more than the minimum allowable. However, in the case when one element was discharged before the second, and the signal about this was ignored, the total voltage may become less than 1,8 V, which will lead to failures, or even to a complete stop of the DD1 microcontroller. The signaling device in this situation will behave unpredictably. Therefore, timely replacement of galvanic cells or battery charging should not be neglected.

The ATtiny25 microcontroller has a built-in reference voltage source of 1,1 ± 0,1 V. This is the maximum threshold value that can be set, at the intersection of which a signal about the battery discharge is given. The smallest possible threshold is 0,9 V. This is half the minimum supply voltage. By writing the corresponding constants to the non-volatile memory of the microcontroller, you can set any threshold level in this interval.

The voltage measurement on the batteries G1 and G2 is performed in different ADC operating modes. The voltage on the G2 element is measured in a non-differential mode relative to the common wire (pin 4 of the microcontroller). The total voltage on the two elements, since it exceeds the reference voltage (1,1 V), cannot be measured in this mode. Therefore, the program switches the ADC to differential mode, and the voltage on the G1 element is measured as the difference between the voltage values ​​​​at pins 2 and 3.

Computer mouse battery low indicator

In the instance of the microcontroller used by the author, by writing to the EEPROM the codes from Table. 2, discharge thresholds of 1 V were set for both batteries. When writing the same codes to other instances, the threshold levels will most likely turn out to be different. First of all, due to the spread in the values ​​of the internal reference voltage.

Computer mouse battery low indicator
Fig. 2

In order to enter the values ​​of constants that correctly set the thresholds into the EEPROM of the microcontroller of the manufactured signaling device, it is necessary, first of all, to set voltage values ​​​​between pins 3 and 2 (for G1), 2 and 4 (for G2) equal to the desired thresholds. This can be done in two ways. The first is to apply to the microcontroller according to the circuit shown in Fig. 2 from a separate supply voltage equal to twice the desired threshold level. For example, 2 V for a threshold of 1 V. The batteries G1 and G2 must be disconnected.

Computer mouse battery low indicator
Fig. 3

Resistive divider R4R5 divides the supply voltage in half. Its resistors must be selected the same with the greatest possible accuracy. The second method (the circuit in Fig. 3) does not require an accurate setting of the voltage of an external power source. It can reach 5 V, but still it should not be made much larger than the sum of the set thresholds. This may reduce the accuracy of their installation. The desired voltage values ​​​​between pins 2 and 4, 3 and 2 of the microcontroller are achieved by trimming resistors R6 and R7.

To write constants in EEPROM, it is enough to supply the signaling device with a programmed microcontroller with a supply voltage and thresholds according to one of the considered schemes, it requires an accurate setting of the voltage of an external power source. It can reach 5 V, but still it should not be made much larger than the sum of the set thresholds. This may reduce the accuracy of their installation. The desired voltage values ​​​​between pins 2 and 4, 3 and 2 of the microcontroller are achieved by trimming resistors R6 and R7.

To write constants in EEPROM, it is enough to supply the signaling device with a programmed microcontroller with a supply voltage and thresholds according to one of the considered schemes, connect its pin 1 (RST) to pin 4 (GND), and then connect it to pin 4 and pin 5 (PBO). After a short period of time, pins 1 and 4, followed by pins 5 and 4, can be opened.

Using a programmed microcontroller, the supply voltage and thresholds according to one of the considered schemes, connect its pin 1 (RST) to pin 4 (GND), and then connect it to pin 4 and pin 5 (PBO). After a short period of time, pins 1 and 4, followed by pins 5 and 4, can be opened.

A flash of both LEDs will confirm that the threshold values ​​have been written to the non-volatile memory.

It remains to fix the assembled signaling device inside the "mouse" housing by placing the LEDs in the existing technological or specially drilled holes in the housing. The piezo emitter HA1 for better audibility of its signals is glued to one of the walls of the case. After connecting to the "mouse" batteries, the signaling device is ready for operation.

The microcontroller program can be downloaded hence.

Author: A. Balakhtar, Pervouralsk, Sverdlovsk Region; Publication: radioradar.net

See other articles Section Computers.

Read and write useful comments on this article.

<< Back

Latest news of science and technology, new electronics:

Artificial leather for touch emulation 15.04.2024

In a modern technology world where distance is becoming increasingly commonplace, maintaining connection and a sense of closeness is important. Recent developments in artificial skin by German scientists from Saarland University represent a new era in virtual interactions. German researchers from Saarland University have developed ultra-thin films that can transmit the sensation of touch over a distance. This cutting-edge technology provides new opportunities for virtual communication, especially for those who find themselves far from their loved ones. The ultra-thin films developed by the researchers, just 50 micrometers thick, can be integrated into textiles and worn like a second skin. These films act as sensors that recognize tactile signals from mom or dad, and as actuators that transmit these movements to the baby. Parents' touch to the fabric activates sensors that react to pressure and deform the ultra-thin film. This ... >>

Petgugu Global cat litter 15.04.2024

Taking care of pets can often be a challenge, especially when it comes to keeping your home clean. A new interesting solution from the Petgugu Global startup has been presented, which will make life easier for cat owners and help them keep their home perfectly clean and tidy. Startup Petgugu Global has unveiled a unique cat toilet that can automatically flush feces, keeping your home clean and fresh. This innovative device is equipped with various smart sensors that monitor your pet's toilet activity and activate to automatically clean after use. The device connects to the sewer system and ensures efficient waste removal without the need for intervention from the owner. Additionally, the toilet has a large flushable storage capacity, making it ideal for multi-cat households. The Petgugu cat litter bowl is designed for use with water-soluble litters and offers a range of additional ... >>

The attractiveness of caring men 14.04.2024

The stereotype that women prefer "bad boys" has long been widespread. However, recent research conducted by British scientists from Monash University offers a new perspective on this issue. They looked at how women responded to men's emotional responsibility and willingness to help others. The study's findings could change our understanding of what makes men attractive to women. A study conducted by scientists from Monash University leads to new findings about men's attractiveness to women. In the experiment, women were shown photographs of men with brief stories about their behavior in various situations, including their reaction to an encounter with a homeless person. Some of the men ignored the homeless man, while others helped him, such as buying him food. A study found that men who showed empathy and kindness were more attractive to women compared to men who showed empathy and kindness. ... >>

Random news from the Archive

Mass production of truffles 19.02.2023

It is possible that in the future another potential exporter of truffles will appear in the world, which will positively affect the prices of imported mushrooms in certain countries.

The Ibaraki Prefectural Forestry and Forest Products Research Institute announced the successful cultivation of artificial truffles for the first time in the country. This raises hope that consumers will one day be able to enjoy homemade truffles as a meal of the day.

Truffle is a type of fungus that grows in clumps in the soil. It is known as a premium product used in Western cuisine. The mushroom is highly valued for its smell, as are matsutake mushrooms. According to the institute, about 200 species of truffles are known in the world. They are artificially grown in European countries.

Japan imports truffles from foreign countries, but they are expensive - European truffles cost about 80 yen ($000) per kilo. Over 604 species of wild truffles have been found in Japan, but they are rare. Until now, artificial truffles have not been successfully grown in Japan.

In 2015, the institute began research on the artificial cultivation of tuber japonicum, a variety of white truffle unique to Japan. The Institute chose tuber japonicum because its smell is similar to white truffles grown in the US and Europe; it is grown in large areas of Japan, stretching from Iwate Prefecture to Okayama Prefecture; and it can grow to a size exceeding 10 centimeters.

Institute experts applied tuber japonicum spores to jolcham oak roots to allow them to coexist. They then planted oak trees in test sites in four areas of Japan. In November, a few years after the trees were planted, experts found that only 22 truffles had grown in test plots in Ibaraki and Kyoto prefectures. They were nine centimeters at the waist and weighed no more than 60 grams each, large enough to be used as food ingredients.

When the experts ate them, they found that they had a garlic-like smell, just like Western white truffles, and they tasted just as good.

Other interesting news:

▪ Football with electronics

▪ The laser will take the missile away from the target

▪ magnetic painting

▪ Biodegradable patch

▪ Robot with hooves

News feed of science and technology, new electronics

 

Interesting materials of the Free Technical Library:

▪ section of the site For a beginner radio amateur. Article selection

▪ article Every creature in pairs. Popular expression

▪ Which countries did Alexander the Great conquer? Detailed answer

▪ article Repairman. Standard instruction on labor protection

▪ article USB interface converters based on FT8U232AM, FT8U245AM chips. Encyclopedia of radio electronics and electrical engineering

▪ article Converter for electric shaver. Encyclopedia of radio electronics and electrical engineering

Leave your comment on this article:

Name:


Email (optional):


A comment:





All languages ​​of this page

Home page | Library | Articles | Website map | Site Reviews

www.diagram.com.ua

www.diagram.com.ua
2000-2024