Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add support for TCS3725 ahd VEML6040 RGB Color Sensors #6446

Open
Jibun-no-Kage opened this issue Oct 29, 2024 · 8 comments
Labels
Close within 30 days Issue will be closed within 30 days unless requested to stay open

Comments

@Jibun-no-Kage
Copy link

Jibun-no-Kage commented Oct 29, 2024

Feature Request: Add support for TCS34725 ahd VEML6040 RGB Color Sensors as device tree overlays.

Example of TCS34725 RGB Color Sensor...
https://www.adafruit.com/product/1334

VEML6040 RGB Color Sensor...
https://www.taydaelectronics.com/veml6040-color-sensor-rgbw-i2c-module.html

@pelwell
Copy link
Contributor

pelwell commented Oct 29, 2024

TCS34725 will need it's driver enabling - CONFIG_TCS3472=m. It makes no use of Device Tree configuration, so it should just be a matter of adding the name to the i2c-sensor overlay.

The VEML6040 (not VMEML6040) driver doesn't exist in 6.6, but it is there in 6.12. It also doesn't seem to require any configuration.

If I have a moment I might throw together the necessary config and overlay updates against 6.12. What's your application?

@pelwell
Copy link
Contributor

pelwell commented Oct 29, 2024

And which I2C addresses can the devices appear on - don't make me read the datasheets.

@pelwell pelwell transferred this issue from raspberrypi/firmware Oct 29, 2024
@Jibun-no-Kage
Copy link
Author

Jibun-no-Kage commented Oct 29, 2024

Oh, right, TCS34725 is 0x29... VEML6040 is 0x10...

The use case is that I am using these sensors to read a 'tally' light on a remote floating head camera, at the end of 25 or so foot jib or boom crane... which is beyond visibility to anyone at ground level. A micro controlller, i.e. in this case Pi Zero 2W forwards this color state to a production broadcast monitor at ground level, that has a custom GPIO interface, I have not decided if I will use solid-state relays, opto-couplers, or NPN transistors, or even mosfet to do the actual GPIO pin state changes between the Pi and monitor GPIO interface yet. but since i have the solid state relays, likely use those for the initial testing., And of course, the relays provide isolation between Pi GPIO and Production Monitor GPIO.

Sensor->i2c->Pi->Evaluate RGB levels->Pi GPIO->Trigger applicable relay. On production broadcast monitor GPIO interface, Pin to GND, i.e. Low 'On', Pin High 'Off', for the respective color of tally status on-screen of monitor. So I just via relay, short pin to GND for the given pin, i.e. color, red or green.

Typical broadcast switchers and cameras... Red is on-air, Green is stand-by or preview. Or none... if camera is not pending preview or on-air.

TCS34725 is the first sensor I am testing, likely using initially, so VEML6040 in 6.12. is cool. As always, thanks for doing this, greatly appreciated!

@Jibun-no-Kage Jibun-no-Kage changed the title Feature Request: Add support for TCS3725 ahd VMEML6040 RGB Color Sensors Feature Request: Add support for TCS3725 ahd VEML6040 RGB Color Sensors Oct 29, 2024
@Jibun-no-Kage
Copy link
Author

You know... I could have sworn I posted this request to the 'firmware' section... Sorry about that. I guess with all the page jumping I was doing... I did not realize I was in the wrong section when I made the request. Thanks for transferring it to the right section/queue.

pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Add config settings for the HTS221, VEML6075 and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Extend the i2c-sensor overlay with support for the HTS221, VEML6075
and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Enable support for the TCS3472 family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Extend the i2c-sensor overlay with support for the VEML6040 and TCS3472
family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Oct 29, 2024

See #6448. Wait about 40 minutes for the autobuilds to complete, then run sudo rpi-update pulls/6448 to install a trial kernel, being careful to back up any important data first.

pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Extend the i2c-sensor overlay with support for the HTS221, VEML6075
and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Enable support for the TCS3472 family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 29, 2024
Extend the i2c-sensor overlay with support for the VEML6040 and TCS3472
family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
@Jibun-no-Kage
Copy link
Author

Yup... understood and well do. Just a side question... ball park when this will go main stream? Just curious.

@pelwell
Copy link
Contributor

pelwell commented Oct 29, 2024

I missed a few back-port commits - it should be good now, so the build will be available to try by the morning.

Stable kernels (and hence apt packages) are usually updated roughly every three months. There is likely to be at least one more 6.6 release before we move to the next LTS kernel - probably 6.12.

pelwell added a commit to pelwell/linux that referenced this issue Oct 30, 2024
Add config settings for the HTS221, VEML6075 and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 30, 2024
Extend the i2c-sensor overlay with support for the HTS221, VEML6075
and AS73211 sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 30, 2024
Enable support for the TCS3472 family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
pelwell added a commit to pelwell/linux that referenced this issue Oct 30, 2024
Extend the i2c-sensor overlay with support for the VEML6040 and TCS3472
family of light sensors.

Link: raspberrypi#6446

Signed-off-by: Phil Elwell <[email protected]>
@pelwell
Copy link
Contributor

pelwell commented Oct 30, 2024

Let me know when you've tested #6448 and I'll merge it (if it works...)

@pelwell pelwell added the Close within 30 days Issue will be closed within 30 days unless requested to stay open label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close within 30 days Issue will be closed within 30 days unless requested to stay open
Projects
None yet
Development

No branches or pull requests

2 participants