A Task! [Add dimming to an LED bulb]

Go To Last Post
33 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Hello Fellas cheeky

 

I have a task though it sounds simple i am not getting enough insight on how to get it sorted!

So basically i am design a GUI Program that will "Dim" a 240 LED bulb. yeah simple as that hun?

while the program communicates with Atmega328p via bluetooth uart and can accept the dimming command

i am not clearly seeing what part / parts / IC/ etc... that i will use to control 240V 10A from MCU point of view!

I have used MCP Digital Potentiometer before and it was the nearest thing in my mind to vary the output voltage automatically

but also PWM approach is possible. the only hindrance i have is the dimming communication between the TTL lever of MCU and 240V of the Lamp.

and thought or techniques here are very much appreciated.

 

Thank you.

 

 

Regards

Last Edited: Tue. Jun 23, 2015 - 08:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are plenty of examples using AVRs to dim lights using phase control on the interwebs. Seek these out for some ideas.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First of all, it is not clear if you are controlling an "LED bulb" that normally will run on 240V or if you are controlling a large number of LEDs (you write "240_LED")

 

If it is not a LED bulb, a number of semiconductor houses make ICs to control multiple LEDs. Many many ICs in some cases. Check TI for starters but there are others.

 

On basic principles, you will probably have to change the 240V (which I assume is AC) into DC.

 

Do all of your LEDs get dimmed the same way (as a common group) or do you need to control each one, individually?

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

Last Edited: Sun. Jun 21, 2015 - 03:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kase57 wrote:
I have a task though it sounds simple i am not getting enough insight

So how do you come to have this task?

 

If you don't have enough "insight", shouldn't you be starting with something simpler while you gain those insights ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

He just wants to know the steps in the problem solving process.  Here's my take: He lives in NZ so he has 240V mains. He has an led bulb that is too bright. He has asked if it can be dimmed. This is the problem: some of the newer led bulbs claim they are dimmable, some dont. It helps to know whats in the bulb base.... there are one or two of every type of electronic component in there.... diodes, resistors, inductors, capacitors, integrated circuits. Whether the dude that designed that circuit left some 'headroom' between the volts from the rectified mains (340V DC?) and the volts of the string of N white leds at 2.5V ea has something to do with its dimmableness.  At this point, I realize I have no idea how to make a dimmable lineoperated led dimmer, so over to you other sparkies.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Many thanks to all of you for your inputs

what i wanted to do briefly is the exactly think i did last time i was playing up with a digital potentiometer from MCP.

i was able to dim the attached LED by restricting its final voltage output (varying it) but it was directly connected to 5V so it wasn't a big deal

while for a 240V (AC) 10 Amps power raises a lot of issue i think this could be approached in different manner

but again my lack of electronic / electrical component here got exposed wink the nearest IC i usually use to interface this sort of high voltage to the MCU is an Opro-isolator. i have myself few of the TLP521-4GB and they can directly be controlled by a TTL lever MCU to control even much more than 240V. from they output pins the problem is that of course they are just switches nothing more!

maybe my question in the first place was the hint as to which IC available there on the market that can be used by MCU at the same time controlling this much power output? maybe via SPI or so. or alternately i am going to check out Kartman hint of "Phase control on the interwebs"

 

 

Regards

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having pulled apart a Philips led lightbulb, there's a bit of electronics in there. This one was not dimmable. You pay extra for the dimmable ones.
If i wanted to make it dimmable, that would take a bit of work methinks. Getting it open without destroying it is half the battle. Modifying it would be a challenge as you're dealing with live mains voltage.
With the dimmable ones, they expect a phase controlled voltage from a 'normal' light dimmer.

Might be easier to buy a LIFX or the Phillips ones.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
a 'normal' light dimmer.

There's the thing; this is all just "normal" stuff - nothing new or novel. Google the basics of how dimmers work...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

10 amps at 240V is one hell of an LED!  Didn't they use those to sweep the night sky looking for aircraft reflections during the London blitz?

 

But, generally, to do pulse-width modulation on high-voltage AC waveforms, you use a TRIAC opto-coupler connected to a high-voltage/high-current TRIAC device.  These are big hunkers in TO3 packages that get hot and need to be on big strange-looking heat sinks.

 

Pardon my asking, but since you're going to be working with 220VAC and 10 amp currents,  have you made out your Last Will and Testament yet?

What I am trying to say is that this type of circuitry is dangerous.   Read all the electrical safety books that you can find first.  Read the ones published in your native language.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I've not looked closely at this, but should be a start.

 

http://www.engbedded.com/semiton...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Simonetta lol "My last Will and Testament" laughlaughlaugh haha

Well... actually while the LED bulb plugs into the MAINS of 240VAC,10A the LED itself comes with its own 120Watts Power supply

which include its own transformer, and since it runs at 12V i assume it is capable of consuming at maximum of 10A which is really weird for a single LED Bulb but i guess it makes sense as it happens to be really bright. anyway,  not sure if it makes any more difference than mains tbh anything above 100 watts to me seem too dangerous enough and requires a careful handling.

I myself have Honors Degree in Mechatronics (graduated last year) and i would say at this stage have general electronics / electrical / ICs etc.. 

but these are the things that i haven't looked at for many months and now need to open books again i guess cheeky but despite that i have always found myself weak into the area of electrical components especially semi conductors. anyway

having done few look ups and few schematic online would the "Triac based circuit" such as these one here be my best bet?

 

http://avrprojects.info/avr-proj...

 

the whole point

again is that i am trying to completely achieve a fully "Digital Dimming" from within a GUI "Slidebar" Layout.

 

Thanks again

 

 

Regards

 

 

Last Edited: Mon. Jun 22, 2015 - 06:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the LED is fed from a 12vDC supply then put a controllable switch (MOSFET) in the 12v feed and use PWM to vary LED intensity.  Stay away from any leading edge/trailing edge AC dimming.

 

David

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And stay away from that transformer-less design unless you have a death wish for you or others.

 

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kase,

 

I fear you may not be getting the message that others are trying to convey to you.

 

Inside your 240LED bulb there is probably a power supply and a small control micro. If this is the case then using PWM and a TRIAC or whatever to limit the active part of the 240V phase into the bulb is going to have no other effect than to starve the input to the PSU that is used for the LEDs. This may/may not dim them. It might just cause the whole thing to shut down at some threshold. On the other hand maybe this bulb has been designed to dim when plugged into a "dimmable" light socket in which case you effectively making a main dimmer will have the desired effect but there's not a lot of clever technology to those - you can likely buy one at your local hardware store for about $10 anyway.

 

Of more interest maybe would be to open up the "bulb" and explore the control electronics it may have already (as I say perhaps a micro and a bank of LED drivers or just transistors/transistor arrays). It's possible you might even be able to "repurpose" the existing control micro - hack into it and change its code. However if it's not already designed to use PWM switching to the LED drivers then the likelihood of being able to introduce dimming may be remote. If that's the case you may need to replace that micro (and perhaps the drivers too?) with one where you can do multi-channel PWM.

 

To be honest I would just build something from scratch though you may be able to use parts from an existing bulb to get LEDs and the casing and so on.

 

Oh and as always - the usual 240V warning: If you mess with the "hot" side of things you may die. Be warned.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now we're starting to get some more information. Do you have a link or reference to the led light you're talking about? My initial impression is that you were talking about the led lights you have as house lighting. What you're talking about is totally different.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

BTW I was going to suggest contacting our local LED bulb expert. However, given his recent tweets and apparent acrimonious departure from LIFX perhaps contacting Dean about it is not the best idea ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

240V * 10Amp is 2400W

12V * 10Amp = 120W

 

so I guess you are making a mess out of your story help request.......

 

You seem to have a 12V Led system with a transformer that can do 120W (10Amp on secondary side) (use watt, but think it should be VA) , so if a single LED is doing 1Amp you would be able to connect 10LEDs to that transformer

If you want to dim those 10 LEDs at the same time, you can just make a system that can lower the voltage direct after the transformer. If you want each LEd to be seperately dimmed you will need to go and sit in between each individual LED.

 

It depends on what the output is of the transformer as to what you want to make.

IIRC I have seen both AC and DC systems here so that also is a factor to keep in mind as the controls are different for each version.

 

again a big warning: stay away from the mains side of the system, unless you really know what you are doing.

Death by electrocution is only one of the potential big problems that you can run into.

If you stay behind the transformer that should protect you from 'stupid mistakes' and keep things safe as it should be designed such that in case of secondary mayor failure it should stop working.

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What surprises / horrifies me is "engineering without knowing Ohms Law".

 

I am sure that most hobbyists of my generation would have learned Ohms Law from playing with model trains / Scalextric / dismantling old radios ... before they became teenagers.

I also bet that we received our first electric shocks at that age too.

 

Basic Electricity would have been taught in Physics lessons at school.

Are modern school teachers crap or are modern school curriculums crap?

 

No,  I would not expect every child in a school Science / Physics class to understand every lesson.    But I would expect the electronics hobbyists to be good at the Electricity.

And most University engineering students seem to be ignorant of these basics.

 

@kase57,

Sorry for my rant.    It is more against the education system than individuals.    We may have misunderstood your actual LED.    There are some seriously high powered devices available now.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

10W White LEDs are under USD1 each and the ones I have are actually 9 LEDs which I presume are 3 parallel strings of 3 LEDs and operate from 9-12v.  They are very bright but you can see the discrete devices at very low intensity.

 

David 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can't really blame anyone as it's true that i didn't provide much infos but here are some clarity:

I am not working with AC, surely have no time dealing with filtering and Rectifying designs etc...

The LED comes with its own power supply connected to a transformer providing a 120W max (This transformer is the one connected into the Mains)

probably shouldn't have brought this into the question as i most likely have nothing to do with it at all.it was for a reference (240VAC @ Mains and 50Hz btw). The LED is a wall type and itself consumes 12V with 1.2A and checked it's dimmable

but as i will most likely be connecting few of these in parallel thus (~6 of them to be safe) as i don't want to run the power supply to even

close its limit.

For clarification, here we are dealing with a 12V(DC) and 10A max that is coming from a clean and fully protected power Supply.

i realized i may have mixed infos here from another 10 meter LED strip i have worked on recently

 

@David

I really know it from myself electronic component especially active components such as solving those advanced MOS/MOSFET

circuits have always been my weakness.

I am going to have some look up on DAFlippers:suggestion on doing this using PWM with MOSFET.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The LED comes 

Can't you simply post a link to a web site that shows what you're talking about or is this going to be one of those guessing games? At the very least just post a photo - in particular highlighting any supplied electronics. Or is this really just a PSU, a resistor and worlds biggest, brightest, most power hungry LED?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kase, you're wasting our time and yet continue to be vague. Do you think we can see exactly what is in front of you? I could go to my box of trinkets and pull out a led, power supply and transformer but would they be the same as yours? Probably not.

So show us some pictures or links so we can see exactly what you're talking about.
The Problem you might come up against is the led drivers are probably constant current or voltage. So pwm'ing a mosfet on the output may not have the desired effect. Any self respecting hobbyist would open the led driver and start sketching the circuit or at least identify the major components and circuit configuration. Armed with a little information means a better decision can be made.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And add something besides "A Task!" to the thread title. I thought the thread was going to be about context switching. Man... I guess I was right!

 

Imagecraft compiler user

Last Edited: Tue. Jun 23, 2015 - 02:52 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kase57 wrote:
The LED comes with its own power supply connected to a transformer (sic?)

 

Are you sure it's a real transformer?

 

A lot of so-called "transformers" in lighting applications these days would be more accurately called "electronic ballasts" - they are actually switch-mode power supplies...

 

As the others have said, we can't see what you have in front of you; so don't keep us guessing - post links, pictures, etc ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:

What surprises / horrifies me is "engineering without knowing Ohms Law".

 

Basic Electricity would have been taught in Physics lessons at school.

Are modern school teachers crap or are modern school curriculums crap?

 

I believe it's a mix of both ( the teachers will teach whatever the Admins ( Gov't ) set as curriculum material...gotta get paid. Teachers might complain in private about this...but teach it they will/do  ).

 

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1

Last Edited: Mon. Jun 22, 2015 - 10:09 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The other option, of course, is to use the current lamp fixture, Mains to 12V power supply, and LED (and mounting and heat sink), and add your own PWM (i.e. dimmable), LED Driver.

Or install one of the many great LED driver chips that are available these days.

 

That might be much easier than hacking the current design to add dimability.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

are you sure the output of the transformer is DC???????

 

as said by others, it seems to be time you start posting pictures and or links as we might be missing some simple things.

 

I think the output of your transformer is AC not DC as that would make the transformer rather expensive....

 

after posting the pictures, also take a multimeter and measure the output of the transformer, both with the multimeter in AC and in DC mode that should tell you a lot, and post the results here. ow and put a LED on it to make sure there is some load on the transformer or you might be seeing interesting things, but not what we want to know.

Last Edited: Tue. Jun 23, 2015 - 06:06 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

meslomp wrote:
are you sure the output of the transformer (sic) is DC???????

 

That wouldn't be possible with a real transformer!!

 

But, as I noted earlier, the thing called a "transformer" (sic) in the context of lighting installations is often not a real transformer at all!

 

eg, see: http://www.screwfix.com/p/haloli... - In this case they do call it an "electronic" transformer, but don't rely on that!

 

it seems to be time you start posting pictures and or links as we might be missing some simple things.

Absolutely!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

Sorry for not replying just got home now and had a very long day, Ok here to provide more infos on what i was trying to do in the first place, my grand mother who otherwise (lives in Plymouth) was having troubles with her eyes finding the normal Ceiling LEDs already fitted in her kitchen too bright that she actually wanted to have rather some small Wall Lights in her Kitchen to ease on as she seems to spend a bit of time in kitchen, anyway We went in nearby "LightingPlus" and quickly bought 5 LED bulbs which i cannot see on their online database anymore (they prob sold out as they were on special) but anyway they looked exactly similar to these one here

http://www.lightingplus.co.nz/lighting/spotlights/led-integrated/universal-led-white-9w-dimmspotlight.html except that they were rather 15Watts than 9W and both are 12V based.

Having already had my own Dimmer (Prob Chinese anyway) i got few of these a while ago (when i was working on an RGB LED strip project) here

http://www.ebay.co.uk/itm/DC-12V-8A-LED-Light-Protect-Strip-Dimmer-Adjustable-Brightness-Controller-R2-/281585354116?pt=LH_DefaultDomain_3&hash=item418fcb8584 and here is the transformer used

http://www.lightingplus.co.nz/lighting/exterior-lights/low-voltage-landscape-lighting/7700200va-outdoor-transformer.html

I manage to get the LEDs fixed in my grand mother's kitchen and able to dim through the "Dimming Kit above"

unfortunately i live in Auckland and did not get a chance to take pictures prior to fitting but after fitting these i quickly

asked myself what it would be like to dim her newly fitted LEDs but rather through some form of GUI command from PC to MCU

using prob UART?

Now coming back to my initial question was mostly the components / circuit i would need to build if i wanted to replace a dimmer with UI approach,

obviously i was aware most of LEDs such as MR16, cree projectors etc... will most likely have their own embedded system inside so i wouldn't mess with them much as i don't really have much time to hack into their embed electronics,

Though Let's says if i was dealing with a typical Chinese RGB strip

for example these 5050 SMD ones here:

http://www.ebay.co.uk/itm/5M-RGB-133-Dream-Color-6803-IC-IP67-Waterproof-5050-LED-Strip-DC12V-/311384199653?pt=LH_DefaultDomain_3&hash=item487ff1d1e5

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kase, i'd be surprised if the setup you posted actually worked.
Your posts are bordering on incoherent. Now you want to use led strips. You can buy remote controlled strip controllers from china for a few dollars.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

+1

 

Kase, decide exactly what you want to do and then come back if you need help but be clear in your communication.

 

David

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

guess the led spot is a 230V connection and uses a 230V LED. to dim this you will need to do things on the primary side as all voltage controlling for the actual LEd is done inside the LED (led + housing) itself.

 

transformer definitely is a simple AC/AC transformer and will spit out 12Vac (note that this can go a lot higher when the transformer is not loaded.

It is for halogen lamps that really like AC more then DC.

 

The dimmer might be just a big Pot meter, or a FET that is controller through the pot meter. the IN + and - AND the out + and - would indicate a FET and it can only do DC and not AC.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

I bet that most grandmothers would just prefer 9W LEDs and a simple light switch.

Of course there may be some grandmothers that really want to switch on a PC or take out a mobile phone every time that they go into their kitchen.

 

David.