📜 ⬆️ ⬇️

Connecting the lighting sensor from Mac Book Pro to Arduino

Today I would like to tell you how I connected the light sensor from poppy beech pro to arduino. In fact, everything is simple. The main thing - a little perseverance.

I had a spare part by chance, I begged for the killed MAC book pro 15` laptop, which lacked most of the spare parts, from my colleagues (they had views on it as a target for a shooting gallery), I don’t remember what it took me It seems the buttons for replacing the keyboard on my spouse's laptop, but among other things useful, I found a light sensor. It was built on a photo diode - sensor for visible light from the SHARP BS520 and also on an amplifier from the MAXIM MAX4231. Very small and compact design, it was difficult to understand what was happening because of the abundance of small parts and almost unreadable tracks.

Reverse engineering


First of all, I googled and found a bunch of mentions of this module from the poppy, but which wire goes where - the story is silent. Also, according to the specification for the microcircuit, it is powered by 6 legs, and it didn’t leave any effort, by means of elimination and using a multimeter, to understand which wire to which goes.
First of all, I cut off the old connector and soldered the assembly line to it.

Sensor
')
I connected to the circuit board + 5V from Arduino, in the same place I took the ground. I spread the power on the board and connected our sensor to it. The analog signal is taken from the output port number A0.

Appearance

Also, for clarity, I used a LED from a dead portable hard drive controller. If the value falls below 500, it lights up. It turned out a simple assembly: sensor - performer. When the night light is dark in the room, the counter value is lower than 500. If more than that, the LED goes out. The resistor to the LED is not needed if it is connected through port 13, but I purposely used port 12 and placed the resistor at 220 ohms.

LED board

As a result, I wrote such an elementary script:
void setup()
{
// 0
pinMode (A0, INPUT);
//
Serial.begin(9600);
}
void loop()
{
//
int val = analogRead(A0);
// Led
digitalWrite(12, (val<500)?HIGH:LOW);
//
Serial.println(val);
//
delay(500);
}

And this is how it all looks like schematically:

image

findings


As a result of my research, I learned:
1. Disassemble the poppy and collect it back, the truth is a dubious skill - it is already outdated.
2. I understood that the MAC technique turns out to be just a well-assembled solution and not a subject of worship. (Forgive me makovody for such experiments on poppy)
3. I started doing electronics a few weeks ago, so I think the project will also be useful for a beginner.

Links to docks and sensor


Sensor itself
Chip MAXIM MAX4233ABC-T
Sharp Photodiode
Off site Arduino

Future plans


Interested in a camera built into the monitor. It is built on a chip, which has a bunch of useful interfaces, including I2C and USB, a hardware JPEG codec and an audio codec. But this is a completely different story.
So for today, see you.

PS Thank you for invite, UFO!

UPD: Regarding Ocelot . Apparently, I compared the same signal with a filter, I apologize for inaccurate information. The third wire from the power supply simply does not seem to be used; for testing, I energized the sensor, connected two wires to the two channels of the oscilloscope, and compared the signal. Here's what I got:
image
1: pressed the sensor with your fingers in the half-darkness (we assume that there is no signal)
2: interference from the touch of the skin of the finger to the contacts of the sensor, the light turns on and off
3: the transition from twilight to bright light
4: bright light mode

As can be seen from the oscillogram - the yellow signal from the wire (the one near the ground) does not carry any information. Well, or as it is used to receive a control signal. You can try to call - see with what output the chip is connected. But the fact remains that the sensor can be used as a light sensor for any DIY project.

Source: https://habr.com/ru/post/144685/


All Articles