Color sensor
By designing a color sensor including tricolor light emitting diodes, photoelectric sensors and control circuits, the problem of slow speed and low accuracy of color sensors in the prior art is solved, and a fast and high-precision color detection effect is achieved.
Patent Information
- Application Number
- CN202422288215.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2034-09-19
AI Technical Summary
Due to the limited performance of color chips, existing color sensors are not fast and have limited accuracy, making it difficult to meet the needs of industrial production for fast and high-precision color detection.
A color sensor including a shell, a tricolor light emitting diode, a photoelectric sensor, a control circuit and a microcontroller was designed. The tricolor light emitting diode is controlled through the control circuit, so that only one color emits light at the same time, achieving rapid detection of the target color.
This technical method improves the detection speed and accuracy of color sensors, can provide stable measurement results, and meets the industrial production needs for fast and high-precision color detection.
Smart Images

Figure CN223021376U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the field of sensors, in particular to a color sensor. Background Art
[0002] Photoelectric sensors are widely used in industrial production processes due to their non-contact nature, high response rate, and insensitivity to the physical properties of the detected objects. The mainstream design of existing color sensors on the market is to use a photosensor chip for three colors of red, green, and blue to convert color data into digital signals for output, which are then connected to a microcontroller. The microcontroller compares the color signals with those stored in the storage unit to output or not output. This solution is limited by the performance of the color chip, with low speed and limited accuracy. Summary of the Utility Model
[0003] The main purpose of the utility model is to provide a color sensor, aiming to solve the above technical problems.
[0004] To achieve the above purpose, a color sensor proposed by the utility model includes a housing, a three-color light-emitting diode, a photosensor, a control circuit, and a microcontroller disposed within the housing. The three-color light-emitting diode and the photosensor are electrically connected to the microcontroller through the control circuit. First through holes and second through holes are respectively opened on two sides of the housing along the width direction. The first through hole has independent emission and reception regions. The three-color light-emitting diode and the photosensor are disposed facing the first through hole and respectively emit light signals from the emission region and receive light signals from the reception region. A control module is disposed at the second through hole, and the control module is electrically connected to the control circuit.
[0005] In one embodiment, the color sensor further includes a fixing base disposed within the housing, and the three-color light-emitting diode and the photosensor are disposed on the fixing base.
[0006] In one embodiment, the housing includes a bottom plate and a cover plate covering the bottom plate to form a receiving cavity. The first through hole and the second through hole are opened on opposite sides of the cover plate, and the fixing base is disposed on the bottom plate.
[0007] In one embodiment, two mounting arms are provided outside the fixing base, and the fixing base can be detachably mounted on the bottom plate through the mounting arms.
[0008] In one embodiment, the color sensor includes a mounting substrate, and the three-color light-emitting diode and the photosensor are both fixed on the mounting substrate, and the mounting substrate is snap-connected to the fixing base.
[0009] In one embodiment, the fixed seat includes two accommodation cavities arranged at intervals, and the mounting substrate covers the end face of the accommodation cavity, so that the three-color light-emitting diode and the photoelectric sensor are respectively received in the two accommodation cavities and face the first through hole.
[0010] In one embodiment, the end faces on both sides of the fixed seat are provided with inwardly recessed clamping holes, and both ends of the mounting substrate are provided with clamping plates. One of the clamping holes has a communicating clamping cavity and a limiting cavity. The limiting cavity is located outside the clamping cavity and the caliber of the limiting cavity is smaller than the height of the clamping plate. The clamping plate is clamped and installed in the clamping hole.
[0011] In one embodiment, the accommodation cavity is provided with a retaining strip, and the mounting substrate is provided with a through hole for the retaining strip to pass through.
[0012] In the technical solution of the present utility model, the color sensor includes a housing, a three-color light-emitting diode, a photoelectric sensor, a control circuit, and a microcontroller arranged in the housing. The three-color light-emitting diode and the photoelectric sensor are electrically connected to the microcontroller through the control circuit. A first through hole and a second through hole are respectively opened on both sides along the width direction of the housing. The first through hole has independent emission and reception areas. The three-color light-emitting diode and the photoelectric sensor are arranged facing the first through hole and respectively emit light signals from the emission area and receive light signals from the reception area. A control module is arranged at the second through hole, and the control module is electrically connected to the control circuit. Therefore, in this technical solution, the microcontroller controls the three-color light-emitting diode through the control circuit so that only one color emits light at the same time. The three-color light-emitting diode emits a light signal to the target, and the target reflects the light signal back into the photoelectric sensor. The control circuit amplifies the signal of the photoelectric sensor to an amplitude that can be recognized by the microcontroller, and the microcontroller can calculate the color according to the order of the three-color signals. Moreover, in this application, since the first through hole has independent emission and reception areas, the anti-interference ability of the emission and reception of the light signal is strong, and a stable measurement result can be provided. Description of the Drawings
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present utility model or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present utility model. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0014] Figure 1 It is a schematic structural diagram of the color sensor according to the embodiment of the present utility model;
[0015] Figure 2 It is a schematic structural diagram of another perspective of the color sensor according to an embodiment of the present invention;
[0016] Figure 3 It is a schematic structural diagram of the fixing base according to an embodiment of the present invention;
[0017] Figure 4 It is the operation of the color sensor according to an embodiment of the present invention;
[0018] Figure 5 It is a schematic diagram of the interface of the microcontroller according to an embodiment of the present invention.
[0019] Explanation of the reference numerals in the drawings: 10, housing; 11, first through hole; 111, emission area; 112, reception area; 12, second through hole; 13, cover plate; 20, three-color light-emitting diode; 30, photoelectric sensor; 40, fixing base; 41, accommodation cavity; 42, clamping hole; 421, clamping cavity; 422, limiting cavity; 43, blocking bar; 44, mounting arm; 50, control module; 51, control button; 52, display screen; 60, mounting substrate; 61, clamping plate; 62, through hole.
[0020] The realization, functional features and advantages of the purpose of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0021] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0022] It should be noted that all the directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0023] In addition, the descriptions such as "first" and "second" in the present invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0024] Moreover, the technical solutions between various embodiments of the present utility model can be combined with each other, but it must be based on the realization by those of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present utility model.
[0025] The present utility model provides a color sensor.
[0026] As Figures 1-3 shown, the color sensor provided by the embodiment of the present utility model includes a housing, a three-color light-emitting diode, a photoelectric sensor, a control circuit, and a microcontroller disposed in the housing. The three-color light-emitting diode and the photoelectric sensor are electrically connected to the microcontroller through the control circuit. A first through hole and a second through hole are respectively opened on both sides of the housing in the width direction. The first through hole has mutually independent emission areas and reception areas. The three-color light-emitting diode and the photoelectric sensor are disposed facing the first through hole and respectively emit light signals from the emission areas and receive light signals from the reception areas. A control module is disposed at the second through hole, and the control module is electrically connected to the control circuit.
[0027] In this embodiment, the microcontroller controls the three-color light-emitting diode through the control circuit so that only one color emits light at the same time. The three-color light-emitting diode emits a light signal to the target, and the target reflects the light signal back into the photoelectric sensor. The control circuit amplifies the signal of the photoelectric sensor to an amplitude that can be recognized by the microcontroller, and the microcontroller can calculate the color according to the sequence of the three-color signals. Moreover, in this application, since the first through hole has mutually independent emission areas and reception areas, the anti-interference ability of the emission and reception of the light signal is strong, and a stable measurement result can be provided.
[0028] Wherein, the color sensor further includes a fixing seat disposed in the housing. The three-color light-emitting diode and the photoelectric sensor are disposed on the fixing seat. By fixing the three-color light-emitting diode and the photoelectric sensor through the fixing seat, the stability of the three-color light-emitting diode and the photoelectric sensor during operation can be effectively improved.
[0029] In this application, the housing includes a bottom plate and a cover plate covering the bottom plate to form a receiving cavity. The first through hole and the second through hole are opened on opposite sides of the cover plate. The fixing seat is disposed on the bottom plate. It can be understood that the bottom plate and the cover plate can be connected in a detachable connection manner such as snap connection or bolt connection to provide a convenient way for maintenance.
[0030] Meanwhile, two mounting arms are provided on the outside of the fixed base, and the fixed base can be detachably mounted on the bottom plate through the mounting arms, so that the fixed base can be disassembled for overall maintenance and replacement.
[0031] Please refer to Figure 3 , the color sensor includes a mounting substrate, the three-color light-emitting diode and the photoelectric sensor are both fixed on the mounting substrate, and the mounting substrate is snap-connected to the fixed base. Specifically, the fixed base includes two accommodating cavities arranged at intervals, the mounting substrate covers the end face of the accommodating cavity, so that the three-color light-emitting diode and the photoelectric sensor are respectively received in the two accommodating cavities and face the first through hole. In this embodiment, the three-color light-emitting diode and the photoelectric sensor are arranged in two accommodating cavities, and there is a partition bar between the two accommodating cavities to separate the two, which can effectively avoid the formation of errors. At the same time, a through hole for the partition bar to pass through is provided on the mounting substrate, and the cooperation between the through hole and the partition bar can not only achieve the purpose of separating the two accommodating cavities, but also achieve the purpose of limiting, preventing shaking.
[0032] Furthermore, clamping holes recessed inward are provided on the end faces on both sides of the fixed base, clamping plates are provided at both ends of the mounting substrate, one of the clamping holes has a connected clamping cavity and a limiting cavity, the limiting cavity is located outside the clamping cavity and the diameter of the limiting cavity is smaller than the height of the clamping plate, and the clamping plate is clamped and installed in the clamping hole. In this embodiment, when installing the mounting substrate, one side of the clamping plate is inserted into the clamping cavity, and at this time, the limiting cavity can prevent the clamping plate from disengaging outward, and then the other side clamping plate is inserted into the clamping hole to fix the mounting substrate. Of course, the mounting base can also be fixed by adding bolts for fastening.
[0033] In addition, please refer to Figure 1 , the control module includes a control button and a display screen electrically connected to the control circuit, and the parameters of the color sensor can be controlled through the control button, and the detected data can be displayed on the display screen.
[0034] In this color sensor, the microcontroller used is STM32G030C8T6 of STMicroelectronics (ST). The STM32G030 series of chips are 32-bit high-performance microcontrollers based on + core, with a working frequency of up to 64MHz. It has a built-in high-speed memory (up to 64K bytes of flash memory and 8K bytes of SRAM), and a large number of enhanced peripherals and I / Os are multiplexed on the chip pins. All chips provide standard communication interfaces: I2C interface, SPI interface, USART interface.
[0035] The color sensor of this embodiment has two signal output modes, namely NPN signal output and PNP signal output.
[0036] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structural transformation made under the concept of the present invention by using the content of the specification and drawings of the present invention, or directly / indirectly applied to other related technical fields, is included in the patent protection scope of the present invention.
Claims
1. A color sensor, characterized in that: The color sensor includes a shell, a three-color light emitting diode arranged in the shell, a photoelectric sensor, a control circuit and a microcontroller. The three-color light emitting diode and the photoelectric sensor are electrically connected to the microcontroller through the control circuit. A first through hole and a second through hole are respectively opened on both sides along the width direction of the shell. The first through hole has an independent emitting area and a receiving area. The three-color light emitting diode and the photoelectric sensor are arranged facing the first through hole and respectively emit light signals from the emitting area and receive light signals from the receiving area. A control module is arranged at the second through hole, and the control module is electrically connected to the control circuit.
2. The color sensor according to claim 1, characterized in that: The color sensor further comprises a fixing base arranged in the housing, and the three-color light emitting diode and the photoelectric sensor are arranged on the fixing base.
3. The color sensor according to claim 2, characterized in that: The housing comprises a bottom plate and a cover plate which is arranged on the bottom plate to form a receiving cavity. The first through hole and the second through hole are arranged on opposite sides of the cover plate. The fixing seat is arranged on the bottom plate.
4. The color sensor according to claim 3, characterized in that: Two mounting arms are disposed outside the fixing seat, and the fixing seat can be detachably mounted on the bottom plate through the mounting arms.
5. The color sensor according to claim 2, characterized in that: The color sensor comprises a mounting substrate, the three-color light emitting diode and the photoelectric sensor are both fixed on the mounting substrate, and the mounting substrate is snap-connected to the fixing seat.
6. The color sensor according to claim 5, characterized in that: The fixing seat comprises two accommodating cavities spaced apart from each other, and the mounting substrate is covered on the end surfaces of the accommodating cavities, so that the three-color light emitting diode and the photoelectric sensor are respectively accommodated in the two accommodating cavities and face the first through hole.
7. The color sensor according to claim 6, characterized in that: The end faces on both sides of the fixing seat are provided with inwardly recessed clamping holes, and clamping plates are provided at both ends of the mounting substrate. One of the clamping holes has a connected clamping cavity and a limiting cavity, and the limiting cavity is located outside the clamping cavity and the diameter of the limiting cavity is smaller than the height of the clamping plate. The clamping plate is clamped and installed in the clamping hole.
8. The color sensor according to claim 6, characterized in that: The accommodating cavity is provided with a stop bar, and the mounting base plate is provided with a through hole for the stop bar to pass through.
9. The color sensor according to claim 1, characterized in that: The control module includes a control button and a display screen electrically connected to the control circuit.
Citation Information
Cited By
Color sensor
CN121954229A