Arduino-based image recognition fish tank filter cotton automatic replacement device
By using Arduino-based image recognition technology in the automatic replacement device of the fish tank filter cotton, the degree of contamination of the filter cotton and automatic replacement is accurately evaluated, which solves the problem of inaccurate replacement timing of existing devices. It is suitable for fish tanks of different specifications and breeding density. The environment improves water quality maintenance efficiency.
Patent Information
- Application Number
- CN202411901187.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing automatic filter cotton replacement device of the fish tank is easily disturbed by factors such as the activities of fish in the fish tank, fluctuations in the water flow and temporary water addition, resulting in inaccurate replacement of the filter cotton, resulting in waste of resources and deterioration of water quality, and is unable to adapt to fish tanks of different specifications and breeding density. environment.
Using Arduino-based image recognition technology, images of filter cotton are obtained through high-definition cameras, and image recognition algorithms are used to analyze the color distribution, texture characteristics, particle size and distribution density of impurities, accurately evaluate the degree of contamination of filter cotton, and pass the detection and feedback mechanism. Connect to the replacement mechanism to achieve automatic replacement.
It realizes an accurate assessment of the degree of pollution of filter cotton, ensures the accuracy of replacement timing, avoids waste of resources and deterioration of water quality, and is suitable for fish tank environments of different specifications and breeding density, improving the efficiency of fish tank water quality maintenance.
Smart Images

Figure CN119453137A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fish tank filter cotton replacement, and in particular to an Arduino-based image recognition fish tank filter cotton automatic replacement device. Background Art
[0002] When replacing the fish tank filter cotton, it is mostly done by manual regular inspection and manual replacement. However, this working method has the problems of being unable to timely and accurately judge the need for filter cotton replacement, high labor costs and cumbersome operations. In order to solve the problems of manual operation, the staff has developed an automatic replacement device for fish tank filter cotton based on a water level sensor. It is usually composed of a filter box, a water level sensor, a motor, a transmission mechanism and filter cotton. A filter cloth filter is installed in the filter box to intercept impurities in the water. When the filter cotton is blocked, the water level rises, triggering the water level sensor, and transmitting the signal to the motor control circuit through the water level sensor. The motor drives the filter cotton to be replaced through the transmission mechanism.
[0003] However, the device based on the water level sensor only judges the blockage of the filter cotton by the rising water level, which is easily disturbed by factors such as the activities of the fish in the fish tank, the fluctuation of the water flow, and the temporary addition of water, resulting in misjudgment, which may cause the filter cotton to be replaced too early or too late, and the accuracy of the filter cotton is limited. The judgment of the blockage of the filter cotton is not accurate enough, so that the filter cotton is replaced before the pollution level that really needs to be replaced is reached, resulting in a waste of resources; and the existing replacement device lacks adaptability. For fish tanks of different specifications, different breeding densities and different filtration system configurations, the corresponding relationship between the water level change and the pollution level of the filter cotton is not fixed, and the device is difficult to flexibly adapt to these differences. In some cases, the filter cotton may not be replaced in time and effectively, affecting the water quality maintenance effect, and whether to replace the filter cotton can only be decided based on the single indicator of water level change. The actual pollution status of the filter cotton cannot be fully evaluated. For example, the type of impurities on the filter cotton, distribution uniformity, color change and other important factors reflecting the degree of pollution cannot be analyzed and judged, which affects the precise control of the replacement time of the filter cotton. If the filter cotton is replaced too early, it will cause a waste of filter cotton. If the filter cotton is replaced too late, it will affect the filtration of water in the fish tank, which may easily cause blockage of the filtered water in the fish tank and even seriously affect the growth of fish in the fish tank. Summary of the invention
[0004] The purpose of the present invention is to provide an automatic replacement device for fish tank filter cotton based on image recognition of Arduino to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: an automatic replacement device for fish tank filter cotton based on image recognition of Arduino, comprising:
[0006] filter frame;
[0007] A fixing mechanism, which is installed at one end of the filter frame and is used for unwinding the filter cotton and for pressing the filter cotton when unwinding;
[0008] A replacement mechanism, which is installed on the filter frame and is opposite to the fixing mechanism, and is used for replacing and rolling up the flat surface of the filter cotton;
[0009] The detection and feedback mechanism is installed in the middle of the filter frame, and the detection and feedback mechanism includes a filter cotton replacement system. The detection and feedback mechanism is arranged directly above the filter cotton flat surface and is used for detecting and executing operations on the filter cotton flat surface.
[0010] Preferably, the filter frame comprises:
[0011] A water filter frame, the water filter frame is installed in the inner cavity of the fish tank;
[0012] A guide roller group, wherein the guide roller group is installed at the inner cavity end of the water filter frame;
[0013] A feed discharge port is provided on a side wall of the water filter frame close to the replacement mechanism.
[0014] Preferably, the fixing mechanism comprises:
[0015] A double-rod frame, wherein the double-rod frame is arranged at one end of the water filter frame;
[0016] A positioning assembly, the positioning assembly is arranged at the end of the double-rod frame, and the positioning assembly is used for movable insertion between the end of the double-rod frame and the water filter frame;
[0017] Pull rods, each of which is disposed at one end of the positioning assembly, and opposite ends of the two pull rods are both bent with internal tooth groove structures;
[0018] A clamping assembly is arranged at one end opposite to the two pull rods, and is used for clamping the filter cotton wound on the double-rod frame, and is used for the two pull rods to move away from each other.
[0019] Preferably, the positioning component comprises:
[0020] A clamping column, wherein the clamping column is slidably connected to the outer wall of the water filter frame, and the clamping column is slidably connected to the end of the double-rod frame;
[0021] A tension spring, wherein the tension spring is sleeved on the outer wall of the clamping column;
[0022] A pull block is fixed to one end of the clamping column, the tension spring is fixed between the pull block and the outer wall of the water filter frame, the pull block is fixedly connected to one end of the pull rod, and the pull rod is slidably and interlacedly connected to the outer wall of the water filter frame.
[0023] Preferably, the pressing assembly comprises:
[0024] A rotating column, the bottom of which is rotatably connected to one end of the water filter frame through a bearing;
[0025] A gear, wherein the gear is fixed to the top of the rotating column, and the pull rod is meshed and connected with the outer wall of the gear;
[0026] A rotating block, wherein the rotating block is fixed to the top of the gear;
[0027] A raised portion, the raised portion being arranged on the top of the rotating block;
[0028] A pressing block, the pressing block is slidably inserted and connected in the inner cavity of the protrusion;
[0029] A compression spring, one end of which is fixed to one end of the inner wall of the pressure block, and the other end of which is fixed to the bottom of the inner wall of the protrusion. The pressure block is supported by the elastic force of the compression spring to press the filter cotton on the double-rod frame.
[0030] Preferably, the replacement mechanism comprises:
[0031] A steering gear, the steering gear being fixed to the outer wall of the water filter frame;
[0032] The winding frame is rotated in the inner cavity of the water filter frame, and the winding frame is fixedly connected to the output rotating end of the steering gear.
[0033] Preferably, the detection and feedback mechanism further comprises:
[0034] The support frame is clamped to the middle part of the filter frame through a locking piece, and the filter cotton replacement system is installed on the support frame.
[0035] Preferably, the filter cotton replacement system comprises:
[0036] An Arduino microcontroller, wherein the Arduino microcontroller is installed in the middle of the support frame;
[0037] A camera, the camera is installed at the bottom of the Arduino microcontroller, and the Arduino microcontroller is used to receive the camera data and execute corresponding commands;
[0038] A communication module, the communication module is connected to the Arduino microcontroller, and the communication module is connected to remote monitoring and control software, and the communication module is used for remote monitoring and control functions;
[0039] An actuator, including but not limited to a steering gear, an automatic feeder, and a water quality monitor, wherein the actuator is connected to an Arduino microcontroller;
[0040] A power module is connected to the Arduino microcontroller, the camera, the communication module and the actuator through connecting wires, and the power module is used to provide power supply for the replacement system.
[0041] Preferably, the replacement method of the filter cotton replacement system includes:
[0042] Capturing images, using a camera to periodically collect image information of the filter cotton;
[0043] Image preprocessing: convert the collected RGB image into a grayscale image and set a threshold T. For grayscale images, if the image value is less than T, it is considered to be black impurities. The following formula is used for threshold segmentation:
[0044]
[0045] Where I(x,y) is the grayscale value of the image at coordinate (x,y);
[0046] Image feature extraction and impurity identification, using the color conversion and color detection functions in OpenCV to detect black impurities on the filter cotton, using the LBP algorithm and gray-level co-occurrence matrix algorithm to identify the texture changes on the filter cotton, where the calculation formula of the LBP algorithm is:
[0047]
[0048] The Canny edge detection algorithm and morphological operations are used to detect the edges of particles, and the distribution density of dirt is calculated by counting the number and area of particles. The calculation formula for the particle area is:
[0049]
[0050] Where dirt distribution density = total particle area / total image area;
[0051] Decision-making: Based on the recognition results, determine whether the filter cotton needs to be replaced;
[0052] To perform the replacement, the Arduino microcontroller performs identification and judgment through software, and then sends a control signal to the actuator through the communication module to perform the operation of replacing the filter cotton.
[0053] Preferably, the replacement method of the filter cotton replacement system further includes:
[0054] Remote monitoring, through the connection between the camera and the software application, real-time viewing of the image information of the filter cotton;
[0055] Manual control replacement, through the switch button of the installed actuator, manually control the actuator switch to achieve the operation of replacing the filter cotton.
[0056] Technical effects and advantages of the present invention:
[0057] (1) The present invention adopts a matching arrangement of the filter frame, the replacement mechanism, and the detection and feedback mechanism. The Arduino-based image recognition filter cotton replacement system obtains the image of the filter cotton through a high-definition camera, and uses image recognition technology to analyze the color distribution, texture characteristics, particle size and distribution density of impurities on the filter cotton. It can more accurately evaluate the pollution degree of the filter cotton, thereby more accurately determining the replacement time, avoiding resource waste and water quality deterioration. It is suitable for use in fish tanks of different specifications, effectively replacing the filter cotton, and maintaining the water quality of the fish tank;
[0058] (2) The present invention connects the detection and feedback mechanism with the replacement mechanism, and uploads the filter cotton status information to the remote monitoring mobile phone through the network, so that the user can remotely monitor the status of the fish tank filter cotton, realize the intelligent management of the fish tank, and provide users with a more convenient and efficient fish farming experience;
[0059] (3) The present invention facilitates the disassembly and assembly of the filter cotton on one end of the filter frame by means of the matching arrangement of the fixing mechanism and the filter frame, and can also compress the unwound filter cotton to prevent the filter cotton from being pulled into a loose state when the replacement mechanism is driven, so that the filter cotton can be stably laid flat in the inner cavity of the filter frame to filter impurities in the fish tank, thereby improving the practical performance of the device. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 The overall structure of the device of the present invention is shown in FIG. Figure 1 .
[0061] Figure 2 The overall structure of the device of the present invention is shown in FIG. Figure 2 .
[0062] Figure 3 It is a schematic diagram of the internal front cross-sectional structure of the water filter frame of the device of the present invention.
[0063] Figure 4 It is a schematic diagram of the side structure of the clamping column of the present invention.
[0064] Figure 5 It is a schematic diagram of the front structure of the gear of the present invention.
[0065] Figure 6 Schematic diagram of the replacement system of the present invention.
[0066] Figure 7 This is a flow chart of the filter cotton replacement steps of the present invention.
[0067] In the figure: 1. filter frame; 11. water filter frame; 12. guide roller group; 13. feed port; 2. fixing mechanism; 21. double rod frame; 22. positioning assembly; 221. clamping column; 222. tension spring; 223. pull block; 23. pull rod; 24. clamping assembly; 241. rotating column; 242. gear; 243. rotating block; 244. raised part; 245. pressure block; 246. pressure spring; 3. replacement mechanism; 31. servo; 32. winding frame; 4. detection and feedback mechanism; 41. support frame; 42. Arduino microcontroller; 43. camera. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] Embodiment 1
[0070] The present invention provides Figure 1-5 The Arduino-based image recognition fish tank filter cotton automatic replacement device shown comprises: a filter frame 1, a fixing mechanism 2, a replacement mechanism 3 and a detection and feedback mechanism 4, the filter frame 1 comprises: a water filter frame 11, a guide roller group 12 and a feed port 13, the water filter frame 11 is installed in the inner cavity of the fish tank, and the bottom of the water filter frame 11 is provided with a plurality of water holes in a matrix which are connected to the fish tank water, so that the filtered water can stably flow from the water filter frame 11 into the fish tank, the guide roller group 12 is installed at the inner cavity end of the water filter frame 11, and two guide roller groups 12 are respectively installed at the two ends of the water filter frame 11, the guide roller group 12 is composed of two guide rubber rollers, and the two ends of the guide rubber rollers are respectively rotatably connected with the inner wall of the water filter frame 11, the feed port 13 is opened on a side wall of the water filter frame 11 close to the replacement mechanism 3, and the setting of the feed port 13 facilitates the filter cotton wound on the replacement mechanism 3 to be pulled and removed from the replacement mechanism 3.
[0071] Among them, the fixing mechanism 2 is installed at one end of the filter frame 1, and the fixing mechanism 2 is used for unwinding the filter cotton and pressing the filter cotton when unwinding. The fixing mechanism 2 includes: a double-rod frame 21, a positioning assembly 22, a pull rod 23 and a clamping assembly 24. The double-rod frame 21 is arranged at one end of the water filter frame 11, and the positioning assembly 22 is arranged at the end of the double-rod frame 21. The positioning assembly 22 is used for the movable interlacing between the end of the double-rod frame 21 and the water filter frame 11. Through the positioning assembly 22, the disassembly and assembly of the double-rod frame 21 is convenient, and the double-rod frame 21 wound with filter cotton is conveniently installed at one end of the water filter frame 11. The pull rods 23 are respectively arranged at one end of the positioning assembly 22, and the opposite ends of the two pull rods 23 are both bent with internal tooth groove structures. The clamping assembly 24 is arranged at the opposite ends of the two pull rods 23. The clamping assembly 24 is used for compressing the filter cotton wound on the double-rod frame 21, and the clamping assembly 24 is used for the opposite movement of the two pull rods 23.
[0072] Specifically, the positioning assembly 22 includes: a clamping column 221, a tension spring 222 and a pull block 223. The clamping column 221 is slidably connected to the outer wall of the water filter frame 11, and the clamping column 221 is slidably connected to the end of the double-rod frame 21. At the same time, the double-rod frame 21 can rotate between the two clamping columns 221, so that the filter cotton on the double-rod frame 21 can be unwound. When the filter cotton is pulled by the replacement mechanism 3, the filter cotton can be flattened and moved between the two guide roller groups 12, so that the filter cotton with dirt can be filtered. The filter cotton is rolled up on the replacement mechanism 3, and the tension spring 222 is sleeved on the outer wall of the clamping column 221. The pull block 223 is fixed to one end of the clamping column 221. The tension spring 222 is fixed between the pull block 223 and the outer wall of the water filter frame 11. The pull block 223 is fixedly connected to one end of the pull rod 23. The pull rod 23 is slidably and interlacedly connected to the outer wall of the water filter frame 11. Through the elasticity of the tension spring 222, the clamping column 221 will not move arbitrarily, so that the position of the double rod frame 21 inserted between the two clamping columns 221 is stable.
[0073] The bottom of the rotating column 241 is rotatably connected with one end of the water filter frame 11 through a bearing, and the gear 242 is fixed to the top of the rotating column 241. The pull rod 23 is meshed with the outer wall of the gear 242. The bent parts of the two pull rods 23 at the opposite ends are respectively meshed with the outer wall of the gear 242 in a relative state, so that when one of the pull rods 23 or the pull block 223 is pulled, the other pull rod 23 and the pull block 223 at the other end of the double rod frame 21 move oppositely thereto, so that the two clamping columns 221 are simultaneously separated from the two ends of the double rod frame 21, which is convenient for the quick disassembly and assembly of the double rod frame 21. The rotating block 243 is fixed to the top of the gear 242, and the protrusion 244 is arranged on the top of the rotating block 243. When the pull rod 23 is pulled, the gear 242 rotates, so that its protrusion 24 4 is rotated to a side away from the double-rod frame 21 so that the pressing block 245 will not affect the installation of the double-rod frame 21, and the pulling of the pull rod 23 is released, and the end of the double-rod frame 21 is aligned with the position of the clamping column 221. Under the elastic pulling of the tension spring 222, the clamping column 221 and the end of the double-rod frame 21 are slidably inserted, so that the double-rod frame 21 is stabilized at one end of the water filter frame 11, and the pressing block 245 is slidably inserted and connected with the inner cavity of the protrusion 244, and the compression spring 24 One end of the pressure block 245 is fixed to one end of the inner wall of the pressure spring 246, and the other end of the pressure spring 246 is fixed to the bottom of the inner wall of the protrusion 244. The pressure block 245 is supported by the elastic force of the pressure spring 246 to press the filter cotton on the double-rod frame 21. Through the elasticity of the pressure spring 246, the pressure block 245 is tightly fitted to the filter cotton wound on the outer wall of the double-rod frame 21, reducing the loosening of the filter cotton due to pulling, and improving the stability of the filter cotton wound on the double-rod frame 21.
[0074] Furthermore, the replacement mechanism 3 is installed on the filter frame 1 and is opposite to the fixing mechanism 2. The replacement mechanism 3 is used for replacing and winding the flat surface of the filter cotton. The replacement mechanism 3 includes: a servo 31 and a winding rack 32. The servo 31 is fixed to the outer wall of the water filter frame 11, and the winding rack 32 rotates in the inner cavity of the water filter frame 11. The winding rack 32 is fixedly connected to the output rotating end of the servo 31. Through the drive of the servo 31, the winding rack 32 is convenient for winding up the dirty filter cotton. The winding rack 32 corresponds to the position of the discharge port 13, so that the filter cotton replaced on the winding rack 32 can be pulled out from the discharge port 13, so that the filter cotton on the winding rack 32 is convenient to disassemble.
[0075] Embodiment 2
[0076] The present invention provides Figure 1-7The Arduino-based image recognition fish tank filter cotton automatic replacement device shown includes: a filter frame 1, a fixing mechanism 2, a replacement mechanism 3 and a detection and feedback mechanism 4, filter frame 1; the fixing mechanism 2 is installed at one end of the filter frame 1, and the fixing mechanism 2 is used for unwinding the filter cotton and pressing the filter cotton when unwinding; the replacement mechanism 3 is installed on the filter frame 1 and is opposite to the fixing mechanism 2, the replacement mechanism 3 includes: a steering gear 31 and a winding rack 32, the replacement mechanism 3 is used for replacing and winding the flat surface of the filter cotton, the detection and feedback mechanism 4 is installed in the middle of the filter frame 1, and the detection and feedback mechanism 4 includes a filter cotton replacement system, the detection and feedback mechanism 4 is arranged directly above the flat surface of the filter cotton and is used for detecting and executing control of the flat surface of the filter cotton.
[0077] The detection and feedback mechanism 4 further includes: a support frame 41 , which is clamped to the middle of the filter frame 1 through a locking piece, and the filter cotton replacement system is installed on the support frame 41 .
[0078] Specifically, the filter cotton replacement system includes: an Arduino microcontroller 42, a camera 43, a communication module, an actuator and a power module. The Arduino microcontroller 42 is installed in the middle of the support frame 41. The Arduino microcontroller 42 can be an Arduino Uno model or an Arduino Mega model. The camera 43 is installed at the bottom of the Arduino microcontroller 42. The camera 43 is compatible with the Arduino microcontroller 42, and the camera 43 is connected to the Arduino microcontroller 42 through a serial port or an I2C interface for transmitting image data, and the Arduino microcontroller 42 is used to receive the camera data of the camera 43 and execute corresponding commands. The communication module is connected to the Arduino microcontroller 42 through a serial port, and the communication module is connected to the remote monitoring and control software. The communication module selects ESP8266 The WIFI module can perform WIFI connection and has sufficient processing power. The communication module is used for remote monitoring and control functions. The actuators include but are not limited to the servo 31, the automatic feeder, and the water quality monitor. The actuator is connected to the Arduino microcontroller 42. The power module is connected to the Arduino microcontroller 42, the camera 43, the communication module and the actuator through a connecting line. The power module is used to provide power supply for the replacement system. The power module uses a 5V DC power supply, which can enable the system to operate stably.
[0079] Among them, the replacement method of the filter cotton replacement system includes:
[0080] Capturing images, using the camera 43 to periodically collect image information of the filter cotton;
[0081] Image preprocessing, using Arduino IDE to write and upload code to the control board of Arduino microcontroller 42, converting the collected RGB image into a grayscale image through the OpenCV library, filtering and denoising, setting a threshold to identify the area of black impurities, setting a threshold T, for grayscale images, if the image value is less than T, it is considered to be black impurities, and the following formula is used for threshold segmentation:
[0082]
[0083] Where I(x,y) is the grayscale value of the image at coordinate (x,y);
[0084] Image feature extraction and impurity identification, such as the color, texture and shape of impurities, use the color conversion and color detection functions in OpenCV to detect black impurities on the filter cotton, and use the LBP algorithm and gray-level co-occurrence matrix algorithm to identify the texture changes on the filter cotton. The calculation formula of the LBP algorithm is:
[0085]
[0086] Among them, I(c) is the gray value of the central pixel, I(p) is the gray value of the pixel in the pth area, s(x) is the sign function, for each pixel, compare its gray value with the surrounding neighborhood pixels, generate a binary code, convert the binary code into a decimal number, as the LBP value of the pixel, and count the LBP value distribution of all pixels in the image to form a texture feature histogram. According to the analysis results of the texture features of the dirt, the position and range of fish feces and fermentation products on the filter cotton are output, which can be used to identify texture changes on the filter cotton, including impurities such as fish feces and fermentation products, to identify whether the filter cotton needs to be replaced;
[0087] The Canny edge detection algorithm and morphological operations are used to detect the edges of particles, and the distribution density of dirt is calculated by counting the number and area of particles. First, the dirt particles are separated from the background through image segmentation technology; then, morphological operations such as expansion, erosion, opening and closing operations are used to accurately extract the particle boundaries; finally, the area, perimeter and other parameters of the particles are calculated to estimate the particle size. The calculation formula for the particle area is:
[0088]
[0089] Where Particle represents the segmented particle area, (x, y) is the pixel coordinates in the area, and by counting the number of pixels in the area, we can get the area of the particle. The dirt distribution density = total particle area / total image area;
[0090] Decision-making: Based on the recognition results, determine whether the filter cotton needs to be replaced. If the recognition results show that there are too many impurities or the preset replacement conditions are met, the system enters the replacement process;
[0091] To execute the replacement, the Arduino microcontroller 42 identifies and determines through the software, and then sends a control signal to the actuator through the communication module to execute the operation of replacing the filter cotton. Through the communication module, the system sends a status feedback of successful replacement to the remote server or mobile device. For fish tanks of different specifications, breeding densities and filtration system configurations, the relationship between water level changes and the degree of pollution of the filter cotton is not fixed; the filter cotton replacement system based on the Arduino microcontroller 42 can judge the replacement time according to the actual pollution status, adapt to various fish tank environments more flexibly, and effectively maintain the water quality. The system records the time of this replacement, the use of the filter cotton and other information for subsequent analysis and maintenance, and performs autonomous learning and optimization according to the preset rules in the system, such as automatically adjusting the replacement cycle and judgment threshold according to the pollution law of the filter cotton in different seasons and different breeding conditions, so as to further improve the intelligence level of the device.
[0092] The replacement method of the filter cotton replacement system also includes: remote monitoring and manual control replacement, through the connection between the camera 43 and the software application, the software application is a monitoring software, and the image information of the filter cotton is viewed in real time, wherein the remote monitoring and control steps are: building a Web server based on Node.js, Python Flask or PHP; writing an API interface to receive the data sent by Arduino and store it in a database; providing a Web interface to display the real-time image, recognition results and status information of the filter cotton. On the client side: developing a Web front-end page based on HTML5, CSS and JavaScript to realize real-time data display, alarm prompts and remote control functions, and users can access the client page through a mobile browser or a PC browser. Use HTTP or WebSocket protocol to realize communication between the client and the server to ensure the security and stability of communication, and SSL / TLS encryption can be used. When the user triggers a remote control operation on the client page, a control instruction is sent to the server, and the server forwards the control instruction to the Arduino microcontroller 42. The Arduino microcontroller 42 performs the corresponding control operation to drive the servo 31 or the automatic feeder to replace the filter cotton or perform feeding operations. The Arduino feeds back the operation results to the server, and the server updates the status information of the client page. When in a non-remote state, the switch button of the installed actuator is used to manually control the actuator switch to realize the operation of replacing the filter cotton, realize the intelligent management of the fish tank, and provide users with a more convenient and efficient fish farming experience.
[0093] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An automatic fish tank filter replacement device based on Arduino image recognition, characterized in that: include: Filter frame (1); A fixing mechanism (2), the fixing mechanism (2) being mounted on one end of the filter frame (1), and the fixing mechanism (2) being used for unwinding the filter cotton and for pressing the filter cotton when unwinding; A replacement mechanism (3), the replacement mechanism (3) being mounted on the filter frame (1) and being in a state opposite to the fixing mechanism (2), the replacement mechanism (3) being used for replacing and rolling up the flat surface of the filter cotton; A detection and feedback mechanism (4), the detection and feedback mechanism (4) is installed in the middle of the filter frame (1), and the detection and feedback mechanism (4) includes a filter cotton replacement system, the detection and feedback mechanism (4) is arranged directly above the filter cotton flat surface and is used for detecting and executing control of the filter cotton flat surface.
2. The image recognition fish tank filter cotton automatic replacement device based on Arduino according to claim 1, characterized in that: The filter frame (1) comprises: A water filter frame (11), wherein the water filter frame (11) is installed in the inner cavity of the fish tank; A guide roller group (12), wherein the guide roller group (12) is installed at the inner cavity end of the water filter frame (11); A material discharge port (13), wherein the material discharge port (13) is provided on a side wall of the water filter frame (11) close to the replacement mechanism (3).
3. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 2, characterized in that: The fixing mechanism (2) comprises: A double-rod frame (21), wherein the double-rod frame (21) is arranged at one end of the water filter frame (11); A positioning assembly (22), wherein the positioning assembly (22) is arranged at the end of the double-rod frame (21), and the positioning assembly (22) is used for movable insertion between the end of the double-rod frame (21) and the water filter frame (11); Pull rods (23), each of which is disposed at one end of the positioning assembly (22), and opposite ends of the two pull rods (23) are both bent with internal tooth groove structures; A clamping assembly (24) is arranged at an opposite end of the two pull rods (23), and the clamping assembly (24) is used to clamp the filter cotton wound on the double-rod frame (21), and the clamping assembly (24) is used for the two pull rods (23) to move away from each other.
4. The image recognition fish tank filter cotton automatic replacement device based on Arduino according to claim 3 is characterized in that: The positioning component (22) comprises: A clamping column (221), wherein the clamping column (221) is slidably connected to the outer wall of the water filter frame (11), and the clamping column (221) is slidably connected to the end of the double rod frame (21); A tension spring (222), wherein the tension spring (222) is sleeved on the outer wall of the clamping column (221); A pull block (223), wherein the pull block (223) is fixed to one end of the clamping column (221), the tension spring (222) is fixed between the pull block (223) and the outer wall of the water filter frame (11), the pull block (223) is fixedly connected to one end of the pull rod (23), and the pull rod (23) is slidably and interlacedly connected to the outer wall of the water filter frame (11).
5. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 3, characterized in that: The pressing assembly (24) comprises: A rotating column (241), the bottom of which is rotatably interlaced and connected to one end of the water filter frame (11) via a bearing; A gear (242), wherein the gear (242) is fixed to the top of the rotating column (241), and the pull rod (23) is meshedly connected with the outer wall of the gear (242); A rotating block (243), wherein the rotating block (243) is fixed to the top of the gear (242); A raised portion (244), wherein the raised portion (244) is disposed on the top of the rotating block (243); A pressing block (245), wherein the pressing block (245) is slidably interpenetratingly connected with the inner cavity of the protruding portion (244); A compression spring (246), one end of which is fixed to one end of the inner wall of the compression block (245), and the other end of which is fixed to the bottom of the inner wall of the protrusion (244). The compression block (245) is supported by the elastic force of the compression spring (246) to press the filter cotton on the double rod frame (21).
6. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 2, characterized in that: The replacement mechanism (3) comprises: A steering gear (31), wherein the steering gear (31) is fixed to the outer wall of the water filter frame (11); A winding frame (32), the winding frame (32) rotates in the inner cavity of the water filter frame (11), and the winding frame (32) is fixedly connected to the output rotating end of the steering gear (31).
7. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 1, characterized in that: The detection and feedback mechanism (4) further comprises: A support frame (41), wherein the support frame (41) is clamped to the middle part of the filter frame (1) through a locking piece, and the filter cotton replacement system is installed on the support frame (41).
8. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 7, characterized in that: The filter cotton replacement system comprises: An Arduino microcontroller (42), wherein the Arduino microcontroller (42) is installed in the middle of the support frame (41); A camera (43), wherein the camera (43) is installed at the bottom of the Arduino microcontroller (42), and the Arduino microcontroller (42) is used to receive the image data of the camera (43) and execute corresponding commands; A communication module, the communication module is connected to the Arduino microcontroller (42), and the communication module is connected to remote monitoring and control software, and the communication module is used for remote monitoring and control functions; An actuator, the actuator including but not limited to a steering gear (31), an automatic feeder, and a water quality monitor, the actuator being connected to an Arduino microcontroller (42); A power module is connected to the Arduino microcontroller (42), the camera (43), the communication module and the actuator via connecting wires, and the power module is used to provide power supply for the replacement system.
9. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 8, characterized in that: The replacement method of the filter cotton replacement system comprises: Capturing images, using a camera (43) to periodically collect image information of the filter cotton; Image preprocessing: convert the collected RGB image into a grayscale image and set a threshold T. For grayscale images, if the image value is less than T, it is considered to be black impurities. The following formula is used for threshold segmentation: Where I(x,y) is the grayscale value of the image at coordinate (x,y); Image feature extraction and impurity identification, using the color conversion and color detection functions in OpenCV to detect black impurities on the filter cotton, using the LBP algorithm and gray-level co-occurrence matrix algorithm to identify the texture changes on the filter cotton, where the calculation formula of the LBP algorithm is: The Canny edge detection algorithm and morphological operations are used to detect the edges of particles, and the distribution density of dirt is calculated by counting the number and area of particles. The calculation formula for the particle area is: Where dirt distribution density = total particle area / total image area; Decision-making: Based on the recognition results, determine whether the filter cotton needs to be replaced; To perform the replacement, the Arduino microcontroller (42) performs identification and judgment through software, and then sends a control signal to the actuator through the communication module to perform the operation of replacing the filter cotton.
10. The Arduino-based image recognition fish tank filter cotton automatic replacement device according to claim 8, characterized in that: The replacement method of the filter cotton replacement system also includes: Remote monitoring, through the connection of the camera (43) and the software application, real-time viewing of the image information of the filter cotton; Manual control replacement, through the installed actuator switch button, manually control the actuator switch to achieve the operation of replacing the filter cotton.
Citation Information
Patent Citations
Water level data acquisition system based on vision
CN106969808A
Linear guide wheel movement device
CN108035973A
Domestic intelligent constant-temperature fish tank
CN110742001A
Cotton impurity detection method and system based on machine vision
CN114648524A
Textile raw material winding device
CN118495260A