Mosa
Posts: 3
Joined: Thu May 23, 2013 5:38 pm

TSL235 and Raspberry Pi

Thu May 23, 2013 11:31 pm

Hello,

i want to add a light sensor (http://www.produktinfo.conrad.com/daten ... SL_235.pdf) to the Raspberry Pi Modell B rev2 but the sensor need more Volt and i know that the Raspberry Pi can only get 3.3 V. I draw some circuit and i want to check if this is correct.
Can someone help me pls?

http://s1.directupload.net/images/130523/zg7zf25m.jpg
Last edited by Mosa on Thu May 23, 2013 11:52 pm, edited 1 time in total.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13142
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: TSL235 and Raspberry Pi

Thu May 23, 2013 11:49 pm

yes, this should work fine!

rares
Posts: 2
Joined: Mon Nov 04, 2013 7:03 am

Re: TSL235 and Raspberry Pi

Mon Nov 04, 2013 7:21 am

Hi, I just used the TSL235 directly connected to GPIO and powered by 3.3V with no voltage divider attached.
It's also in the sensor specs that supply voltage can be from 2.7V up to 5.5V so Raspberry Pi should't have a problem
"reading" it while 3.3 V powered.
It works very nice, the light values graph during a day are almost identical to the ones generated with a "classic"
LDR photoresistor.

The C code for the Raspberry reading an TSL235 is here :

https://github.com/RaresPlescan/daisypi ... 235r/t13.c

and some more documented explanations in Wiki :

https://github.com/RaresPlescan/daisypi/wiki/TSL235R

The code is using WiringPi for reading the pin, so all the credits for that goes to Gordon.

cquarinto
Posts: 1
Joined: Tue Aug 04, 2015 9:05 pm

Re: TSL235 and Raspberry Pi

Tue Aug 04, 2015 9:10 pm

Hi,
I just used your code with my RPI and it works great. Thank you for that! -
Just one small, insignificant change, it's "iteration" not "itteration". :)

CQ

ferdywallinx
Posts: 4
Joined: Mon Sep 28, 2015 6:53 am

Re: TSL235 and Raspberry Pi

Mon Sep 28, 2015 6:57 am

Hi,

I've run your script and it worked like a charm, momentarily. When I strongly increase or decrease the light intensity or when I attach another device to my Pi on a different 3.3V pin then I get the output of "No TSL-235 found on wiringpi_pin(1)". And it keeps outputting this, even when I detach the Pi, other device or TSL-235 and then plug them in again. At some seemingly random point it starts working again. Would you know a reason why it does this?

Thanks!

Return to “General discussion”