adjusts brightness by detecting ambient light - Page 1
Forum section: electronics / beginners

author: ytuehm
author_rank: Newbie
timestamp: January 09, 2025, 09:16:59 am
content: How can I design an LED circuit that adjusts brightness by detecting ambient light?I need to use an op-amp(LM741), and using pre-made integrated circuits is prohibited. How can I generate a PWM signal? I am only allowed to use a DC power source.

author: SteveThackery
author_rank: Super Contributor
timestamp: January 09, 2025, 10:01:31 am
content: Quote from: ytuehm on January 09, 2025, 09:16:59 amThis is obviously a homework assignment, and most people here are reluctant to do your homework for you. The whole idea is that you do the hard work and learn from it. Also, I expect you must have already covered the basics in class - it would be unusual to assign a homework without some preparation in the classroom.What usually happens is this: you do some research and come up with one or more solutions that might work. Try them out, and then when you run into problems, come back here with specific questions and most people will be glad to help.In other words, no-one is going to do your homework for you. But plenty willhelpwith your homework when you have demonstrated some real effort on your own part.PS: Does the assignment say you must use PWM?

author: Smokey
author_rank: Super Contributor
timestamp: January 09, 2025, 10:10:44 am
content: ask chatgpt?

author: PGPG
author_rank: Frequent Contributor
timestamp: January 09, 2025, 11:34:20 am
content: In one of our products:https://micromade.pl/produkty/bibinet-m/moduly-rozszerzen-m/bibi-d50/we adopt display brightness to ambient light.I don't like PWM as it generates disturbances that you than have to filter out so I just change DC current in each segment.So my solution to your task would be to make current source dependent on ambient light.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 09, 2025, 11:53:25 am
content: with some efforts to search on the web, many answers come up ....

author: CaptDon
author_rank: Super Contributor
timestamp: January 09, 2025, 01:31:11 pm
content: Is this why our engineering potential new hire candidates can't even understand the simple circuits we use in our products? If this is a homework / university / Vo-Tech School project then I would be far more impressed and far more likely to hire you if you presented a circuit of your own design to us on the forum and asked if it was of good sound design and what mods we would probably do. Sorry if this sound harsh but I like to work with people who when given a task will say "Hey, I have an idea that may work, here, I'll draw it for you"!

author: Analog Kid
author_rank: Super Contributor
timestamp: January 09, 2025, 09:55:09 pm
content: The takeaway here:You've got to give ussomethingmore than "Here's my homework assignment, how do I complete it?".Anything.

author: ytuehm
author_rank: Newbie
timestamp: January 11, 2025, 01:50:56 pm
content: I had already completed most of the circuit; I only had a few minor issues. I simply asked a general question about what I could do, but I think it was misunderstood. I will attach the completed state of the circuit. Simulations indicate that it is working.

author: Zero999
author_rank: Super Contributor
timestamp: January 11, 2025, 02:13:55 pm
content: Quote from: ytuehm on January 11, 2025, 01:50:56 pmWhere's the photodetector?

author: ytuehm
author_rank: Newbie
timestamp: January 11, 2025, 03:35:14 pm
content: The resistor named LDR, connected to the negative input of the U3 op-amp, was practically used as a photodetector.

author: PGPG
author_rank: Frequent Contributor
timestamp: January 11, 2025, 04:18:28 pm
content: You generate rectangle to then generate sawtooth to then generate rectangle with constant frequency and variable pulse width.May be in first circuit generating rectangle you can use photodetector to modify its working. Result will be not so linear (and frequency not constant) but may be enough good.Good IC to be used in such constructions is always alive NE555.

author: Ian.M
author_rank: Super Contributor
timestamp: January 11, 2025, 05:23:13 pm
content: Another approach is to generate the PWM directly with a two transistor astable multivibrator, with the LDR as the timing resistor for one side and the other side with a preset set to match the LDR resistance at the light level you want to give 50% duty cycle.

author: Zero999
author_rank: Super Contributor
timestamp: January 11, 2025, 06:15:50 pm
content: Quote from: ytuehm on January 11, 2025, 03:35:14 pmWhat does U1 and U2 in your circuit do?I didn't notice it, because it's drawn as an ordinary resistor. Below are the correct symbols for an LDR.

author: ytuehm
author_rank: Newbie
timestamp: January 12, 2025, 10:03:45 am
content: I used U1 to generate a square wave and U2 to ensure linearity.I couldn't find these symbols in the orcad pspice program so I changed the resistor manually.

author: Zero999
author_rank: Super Contributor
timestamp: January 12, 2025, 07:00:53 pm
content: I would just use the voltage on the capacitor of the LM741 Schmitt trigger oscillator.