Software indication of the operation of the hard drive instead of LEDs. Buy a hard drive: HDD, SSD in the Crimea in the online store Indicator

For loading indication IDE drives one LED is used, which is hardly very informative. I got tired of evaluating the download "by brightness" and I made a scale:

advertising

The circuit can also be implemented in an integrated design, but I wanted to achieve a smooth and soft indication, which is difficult to obtain with ready-made microcircuits. However, I invented the voltage-to-position converter itself a long time ago and it showed very good results in level indicators.

Schema comment

Relatively speaking, the circuit consists of two nodes - a circuit for averaging disk access pulses on R27, R26, D1, R28, R29, C1, C2, Q13 and a voltage-to-position converter on the remaining elements.

The circuit does not need any adjustment, only the resistor R26 must be set to 100% with constant access to the disk. The circuit R24, R25, R11, Q11 sets the background current in the absence of a signal. If it is necessary that in the absence of a signal there is a backlight of the last segment or vice versa, you need to slightly change the value of the resistor R24 ​​or R25.

The printed circuit board was not divorced - I used a "one-hole" breadboard and SMD components, everything took up very little space, a little more than the indicator itself. The circuit is powered by +5V, pin P1 must be connected instead of or together with "HDD LED". If you confuse and stick the wrong output "HDD LED" nothing will happen, there will simply be no indication.

Introduction

The loading indicators we are talking about are not only an improvement appearance, but also of purely practical use.

This article consists of two independent parts: CPU and hard drive loading indicator.

Hard drive loading indicator

Before starting to create the indicator, I decided to look for the most optimal scheme. Scrolling through a number of sites, I found a relatively small variety of schemes. One of the most important criteria is to get a high-quality mod for relatively little money. Most circuits use LM3914 chips, which are not that cheap. Therefore, I began to look for a level indicator chip with an output for 5-8 LEDs. The choice fell on the AN6884 because of its low price and wide availability. This microcircuit has five LEDs at the output, and passes through each current 7mA.

To read the signal, two wires coming from motherboard, to which the hard drive indication LED located on the front panel is connected. Instead of an LED, an optocoupler input is connected to them (see diagram). Even if you reverse the polarity, nothing will burn. The optocoupler in the diagram is necessary for the electrical decoupling of the circuits of the motherboard and the indicator (this is primarily necessary to protect the motherboard).

At zero load - the phototransistor inside the optocoupler is locked - while C6 is discharged through R11. With an increase in the loading of the hard drive, the phototransistor is open, and C6 begins to charge through it. The voltage at C6 varies in proportion to the load level. Depending on the capacity of C6, the rate of change in the load level changes.

The voltage from C6 is removed through the divider R12, R14. Trimmer resistor R14 is used to change the sensitivity of the indicator.

LEDs can be installed any and at your discretion. At home, I set for the three smaller levels - green, and for the two large ones - red.

Hard drive indicator circuit

Setting the indicator is reduced to setting its sensitivity using R14.

CPU load indicator

When the hard drive indicator was already made, I began to think about an indicator of something else. The choice fell on the processor load indicator.

During the search, two options were found - through LPT and through COM.

I chose the COM port only because it was not used, unlike LPT. In the process of searching, I found an article by Clear66, in which he talked about connecting car tachometer to COM port. I liked this idea most of all because you don’t need to make special schemes for converting digital values ​​​​to analog signal. For control, the PCTach program is used (download link is at the end of the article).

But since at that moment there was not at least some kind of tachometer at hand, I had to make a home-made version of the factory one. After assembly and configuration, the processor load indicator began to show more or less accurately.

But I did not like the increased speed of displaying the load level, which was expressed by excessive jerking of the indicator arrow during uneven processor load. But this was corrected by adding an additional capacitor in parallel with the microammeter.

The type of dial indicator did not suit me much, and I decided to look for an alternative to it. In the end, the indicator became LED, and not a scale of LEDs, but two LEDs directed towards each other different color glow. The display of the load level is made by smooth change LED brightness.

For the manufacture of the indicator, I used 4-5mm plexiglass and two LEDs: red and blue glow. A strip of 150mm by 15mm is cut out of plexiglass. After that, places for LEDs are cut out along the edges of the strip. The ends and one side of the strip must be sanded with zero sandpaper to a uniform matte state. This is necessary for uniform dispersion of light. A strip of foil is glued to the reverse side (which is not processed with sandpaper) and on the sides of the strip to reflect the rays of the LEDs. When the strip is ready, the LEDs are glued.

Arrangement of LEDs in a Plexiglas strip

When the LEDs are already glued, tape or self-adhesive film is glued to the ends of the strip. This is necessary so that the LEDs shine only in the desired part of the strip.

Blue on top symbolizes cold, i.e. low load processor. Red at the bottom symbolizes heating, i.e. big load. The processor load is proportional to the transition of colors between themselves. The wires going to the board and the 68-100 Ohm resistor are fixed from one edge of the strip with hot glue.

To smoothly change the brightness of the LEDs, a PWM signal generation circuit is used. With this control method, the brightness of the LEDs varies from the ratio of the glow time and the time when it is off. This method is better than voltage control in that the brightness of the LEDs changes in proportion to the voltage.

The scheme consists of the following blocks:

    voltage driver on DA1.1

    sawtooth signal generator on DA2

    voltage comparison unit on DA1.2 DA1.3

The resistor divider R4, R3 sets the voltage to 1.2 volts, which is approximately equal to the minimum sawtooth pulse voltage DA2. Pulses are taken from the third output COM port computer. When the input level is high, capacitor C1 charges through resistor R1 and diode D1. When the input level is low, capacitor C1 discharges through R2. On C1, a voltage is formed proportional to the processor load level. Since the amplitude of this voltage is less than the amplitude of the sawtooth pulses DA2, there is an amplifier on DA1.1 in the circuit. The maximum level of the indicator is adjusted by changing the gain using R6. The R7, C3 chain finally smooths out the voltage ripple from the amplifier output. PWM is formed by comparing the measured voltage and sawtooth pulses.

DA1.2 generates a direct, and DA1.3 an inverted PWM signal. These two signals are then fed to the LEDs, previously amplified by switches on transistors T3, T4.

Processor indicator circuit

Execution

Since both indicators are located on the front panel, I made a common board for them. From one edge of the board there are two tracks in the form of strips. Two M3 nuts are soldered to these strips. At the front, two 3mm holes are drilled in the case frame so that they correspond to the distance between the centers of the nuts on the board. Further, two M3 screws are screwed into these nuts on the board, which pass through the holes in the frame.

CPU load indicator with different load levels:

Hard drive loading indicator with different loading levels:

With whom it has not happened: you leave the computer, after a few minutes you return - and the activity indicator hard drive blinking. What is he doing there? Looks, of course, very suspicious.

But really, there's probably nothing to worry about. Computers with default settings Windows does this all the time. Although, of course, the possibility of infection cannot be ruled out, so it will not hurt to check the system with an antivirus for your own peace of mind.

The computer politely waits for its turn

In fact, the computer does not try to do nasty things secretly from the owner. On the contrary, he tries to be smart and polite. Windows needs to run a variety of service tasks in the background, and the system patiently waits for idle time (that is, the user leaves) to run them. This ensures that computer resources are not wasted on extraneous matters when the user needs them to work. If the system is being actively used, background housekeeping processes are suspended so as not to degrade performance.

So it's not a figment of the imagination: Windows is really waiting for idle time to start maintenance. And when the user comes back, service tasks usually stop, so it's usually impossible to find out why the hard disk activity indicator blinked when idle. Windows Scheduler allows you to configure the task to run exclusively during idle time, and many tasks are performed this way.

What is the computer doing when idle?

But what exactly is the computer doing in the background? The specific set of tasks depends on the system settings and installed programs, but you can list the most common options.

File indexing. All modern operating systems are equipped with a file indexing function. They check each file (including its contents) and create a database that then instantly returns results when searched. For search to work, the indexing service must regularly check for file changes, and this may explain hard disk activity when idle.

Disk Defragmenter. In Windows times 98 to successfully defragment the hard drive, you had to close all other programs. Modern Windows versions perform defragmentation automatically in the background, but only when idle.

Scheduled antivirus scanning. Many antivirus programs and other security tools are set to automatically scan your system regularly by default. Perhaps the activity of the hard drive is due to the fact that the antivirus is just checking the files stored on it.

Backup. If automatic is enabled backup(and it should be turned on!), hard disk activity may be caused by the process of archiving files.

Automatic update. Windows itself and many programs such as Google Chrome or Mozilla Firefox, equipped with the function automatic update. If the computer is busy with something when idle, it is quite possible that it is just downloading and installing updates.

Of course, this is by no means full list. There can be an infinite number of options, depending on the specific set of installed programs. For example, if the background is open Steam client and for one of the games an update just came out, the activity of the hard disk may be due to the download and installation of this update. File download programs, such as BitTorrent clients, can also cause disk activity.

How to find out what programs are using the disk when idle

In theory, everything is clear, but how to find out what the computer does in practice? First of all, if there is a suspicion of infection, it is worth scanning the system with a reliable antivirus, not relying solely on built-in tools. But if you just want to track disk activity, you can do that too.

You can find out which processes are using the disk using the Task Manager and Resource Monitor built into Windows. This is especially true if the disk activity indicator is constantly blinking, and the computer's performance has dropped for some reason.

To open the Task Manager, right-click on the taskbar and select Task Manager or press the ++ keys. In Windows 8, disk usage is displayed right in the Task Manager - you can click on the "Disk" column to sort processes by this parameter and see which one uses the disk most actively.

Windows 7 does not have this option, so you need to open the Performance tab and click the Open Resource Monitor link. In the Resource Monitor window, go to the "Disk" tab - and you will see a list of processes that can be sorted by the degree of disk load. By the way, in Windows 8 / 8.1, the Resource Monitor also gives much more information than the Task Manager.

To track disk activity over time, you can use the Process Monitor program from SysInternals, the developer useful utilities, which are so loved by advanced Windows users. You can start Process Monitor and leave it running during downtime. Then, returning to the computer, you can see which processes were used HDD in your absence.

Process Monitor logs any activity, but you can use the buttons on the panel to filter the list so that only events related to file system. For example, in the screenshot below, you can see that disk activity is caused by file indexing.

Process Monitor is good because it can show past activity. Even if a process stops using the disk or terminates altogether, information about it remains in the log. But it is hardly worth using this utility all the time, because event logging also creates a load on the system and, as a result, reduces performance. It should also be understood that Process Monitor keeps an event log only while it is running: if you start it after a surge in hard drive activity, it will no longer be possible to find out what exactly caused it.

Yesterday, on the onboard panel of the PC, it was noticed that the hard disk access indicator became constantly and continuously lit in red, regardless of the presence or absence of active file operations. Problems with hard drive?

The HDD activity indicator is lit when data is being written to the hard disk or data is being read from the hard disk by the computer. In particular, the indicator can be constantly lit while a program is running, for example, a CD player, or compiling from source code. In the case when the hard drive activity indicator is always, constantly and continuously lit in red, regardless of the presence or absence of file operations, this indicates a problem with the hard drive or other PC equipment.

With all this, at the time of turning on/starting the computer may freeze giving 4 options:

As an OS workstation Debian GNU/Linux 8 is used. Shortly before the problems with the constant glow of the HDD activity indicator, there was some kind of glitch with the file system: when rebooting, the FS was constantly put into the read-only state (read-only) issuing "Failed to start Remount Root and Kernel File Systems.", but that's another story.

Solution

There are 2 HDDs (SATA and IDE) in the block, each of which has an OS and a corresponding MBR - i.e. Both HDDs are bootable. It was decided to search for a problematic HDD by excluding them one by one from the system.

Problem hardware

SATA was disabled first ( western digital, WDC WD5000AAKX), the system booted from the IDE (Seagate), and the problem with the disk activity indicator has disappeared. By moving the cables (plugging/plugging) of the SATA interface and SATA power on the connectors of the motherboard and the HDD itself, the problem was completely eliminated, the system was successfully booted from the SATA disk and there were no "brakes" during POST (Power-On Self-Test ) testing at startup, as well as no problems with the hard disk activity indicator are now observed.

Years pass, the contacts oxidize and the connection between them weakens or disappears altogether. In this case, we can say with a greater degree of certainty that the problems raised in this topic were directly related to poor contact on the SATA interface cable, IMHO, the contacts on the SATA power supply do not have time to rust for the simple reason that every 3-4 months from the system unit the power supply, "coolers" with radiators, etc. are completely removed, disassembled and cleaned. hard drives remained untouched (about 3 years).

The moral is that at the next sanitary tech. maintenance of the system unit, along the way, at the same time, you will need to move the interface cables of hard drives - so that they do not rust.

What else can be done if moving the interface cables does not solve the problem with the hard drive (in order of priority):

If hard disk in any system block and on any cables (power supplies) causes problems with the HDD activity indicator, regardless of the presence or absence of active file operations (for example, in safe or single user mode), then you need to:

  1. Inspect the disk itself and the condition of the contacts / loops on its external board;
  2. From under a deaf DOS or by booting from a Live-CD, execute full check disk (MHDD, fsck etc) for bad sectors, orphaned inodes (orphan inodes) and fix them if possible;
  3. Perform a full format if the search and correction of errors did not work.

Problem software

If the problems are not with the hardware, and in another working system unit without problems, the disk does not cause any problems with the indicator, then it would be advisable to analyze the activity of the installed software.

If the disk causes problems with the HDD activity indicator only if it is connected as bootable, then most likely these problems are related to the presence of some kind of malicious process in the system that starts along with operating system and in this case you need:

  1. Find a process doing a lot of file read/write operations and try to disable/kill it;
  2. Check the system with an antivirus.

Well, if none of the above helps at all, then use the disk until it completely grunts or start cracking nuts with it today - IMHO walking along service centers It won't be cheaper than buying a new HDD ;)

This stylish pointer display is used to present data on the operation of the servers. It displays the percentage of CPU usage, random access memory and computer hard drives. The data is displayed using three analogue pointer-type instruments - voltmeters direct current at 10 V (or any suitable ones, it’s not a problem to choose a resistance for the full deflection of the arrow). The Raspberry Pi Zero module is responsible for controlling the operation of the system, along with a system consisting of two LM358 operational amplifiers powered by a 5> 12 V boost converter (ready-made module from Ali).

Wiring diagram


DAC circuit for op-amp 358

In order to connect voltmeters to the outputs, you need simple program, written in Python, which generates three PWM signals proportional to the load of this element of the controlled server. The op-amp circuit is an analog PWM voltage signal converter.


Parts board - 2 LM358

The DAC converts the 3.3V PWM signal from the Raspberry Pi into a voltage ranging from 0V to 10V. Analog Outputs 1, 2 and 3 are connected directly to the sensors on the panel, while PWM Inputs are 1, 2 and 3, connected to the controller.

Indicator design

The most difficult thing here is not to assemble a diagram - but to print beautiful 3 scales. Here is a picture that you can use for your device.


Drawings of the new scale of indicators

Then cut it out and stick it on top of the native dial gauges.


Voltmeter scale

View of the finished device

The indicators are mounted on a plate painted with gray paint. You can build it into the computer case, or you can arrange it as a separate prefix-box. The whole system is mounted in compact body, so nothing can be seen from the outside, except for the arrow indicators.


Ready indicator — 3 pcs.

Everything is powered by one common voltage of 5 volts from the PC power supply. On the one hand, it feeds the Raspberry Pi Zero, and on the other hand, through a 12-volt converter, a circuit for analog generation of a control voltage from 0 to 10 V for switchmen. The circuit and firmware of the MK is not given - since this is another story ...

Internet