Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Switching Led

Status
Not open for further replies.
10 seconds is far to slow 100mS to 500mS is more like the control needed some things are ok with slow control but for my purposes faster control is needed most of the time, that's the good thing about PLL, fast & stable, once you get it right that is.

I will think of something faster to control, maybe a small high speed dc motor?

I'll have a think

Cheers
 
Kiss,
You'll have to excuse my ignorance with things but I don't really get where this is headed, not sure how measuring the temperature of a lamp is relevant, the glass is going to have an air cooling constant that will be far to slow?
What is proposed?
Wouldn't an LED & LDR be much faster & save burning up electricity & having to wear a welding helmet so you don't get flashed from the light?

Will have to make a start on something soon as this thread is starting to belong in general **** chat.

Cheers
 
I used the lamp thing for testing of temperature controllers, so I KNOW it works. I used all sorts of thermocouples although mostly K and R for these tests. I just cannot remember the maximum temperature of the lamp. At 500 W, your not controlling light intensity, but rather the temperature of the lamp. The lamp is effectively a non-linear, very fast responding source as long as your not controlling a few degrees above room temperature.

All I did was mounted the lamp base up (projection lamps are weirder). light comes out the side and the top is usually covered. As I said earlier, it does give instant feedback.

So, I'm just giving you a "test setup" that I know works from experience.

If you can control a lamp, you can control a motor.

OK, so you propose using a current boosted analog out to control a LED and a voltage divider for an LDR. I don't see why not. If you use PWM on the LED, you would have to smooth the output of the LDR and it might even be a better test. I'm game.

I'm just pretty confident that you id not take reset windup into effect when you played with your software. You need graphing capability to see the effects of changing the PID constants.
 
I just did a quick test of the temperature of the 500W Projector Lamp it's around 575 deg C, I have a 300W Projector Lamp as well & it measured a surprising 508 deg C.
I have a Thermocouple amplifier that the output ranges from 0-5v for the full range of the K type thermocouples around 1370 deg C. I have some self adhesive thermo couples that might do the job, not sure about 500 deg C though, they usually measure engine block temp etc..

Need to get on the same page with a Schematic of the circuit to be used?

I was thinking that if the Lamp Temperature was the process variable or Feedback signal to the Arduino, then use PWM to control the LED which then controls the LDR resistance to the triac circuit for power control to the Lamp?

How should it be done, need a schematic or something to get on the same page.

The trouble with Arduino is that it is very convenient & has a suitable PID Library to use so there is not the learning process taken to get some results, it's the easy way out but if it works well why not I guess.

Looking forward to it.

Cheers
 
Well, you might have to waste an adhesive or find something to weigh down the thermocouple. e.g. use a piece of an exhaust gasket. I know I used a K type probe and layed it on the lamp.

The MEGA accepts 0-5 V, so your good there. So, try to read and linearize 0-5V to temperature.

I was thinking that if the Lamp Temperature was the process variable or Feedback signal to the Arduino,

You definitely have agreement with me here.

PWM to control the LED which then controls the LDR resistance to the triac circuit for power control to the Lamp?

Analogwrite might be good enough? http://arduino.cc/en/Reference/AnalogWrite and the frequency is much higher than the line frequency. Now, we have to figure out if the output is source or sink and how much.

Better news: There is an autotune library too: http://playground.arduino.cc/Code/PIDAutotuneLibrary

This http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/ looks like a good read.

And finally, a reset windup discussion: http://brettbeauregard.com/blog/2011/04/improving-the-beginner’s-pid-reset-windup/
 
Well, you might have to waste an adhesive or find something to weigh down the thermocouple. e.g. use a piece of an exhaust gasket

Yes I was thinking along similar lines.


Now, we have to figure out if the output is source or sink and how much.

Sorry I have lost you there, not sure where or what you are referring to ?

Thanks for the links, i'll have a read & get some things sorted out.

Cheers
 
Last edited:
Without doing ANY research, in the BEST sense, ports are usually inputs until configured otherwise.

The architecture then defines the port. There MAY be ability to set an internal pull-up or pull-down and the port may have asymetrical source and sink currents. Source means from a positive voltage and sink usually means to ground.

A 2n3904 transistor can sink about 200 mA and it sources very little if the collector is pulled up to +5. i.e. a typical open collector output.

so, at 100% PWM, do we have 5 V and at 0 PWM do we have zero volts and at how much current?
 
Ok, I am with you know, Thanks.

I setup this 300W lamp on an appropriate base vertically, set the Thermocouple on the lamp in a position to get around 395C at 240V, I had trouble with Temperature stability so I made a steel shroud for the lamp thinking that this drafty cold old cabin could be causing the fluctuation.
Basically it is a hollow steel shroud open at the top & bottom, this will cause an updraft as such, so, how stable does the lamp temperature have to be before attempting to control it?.


I have a 2.5V constant mains variation & about 6 deg C constant variation of the lamp temperature?

I will have to check out what you ask properly.

Just setting some things up properly now.

Cheers
 
I just had a look at the spec sheet for the Mega board, it has

From memory I think the PWM will go from 0V to 5V but will have to test it to make sure.

Digital I/O Pins54 (of which 15 provide PWM output)
Analog Input Pins16
DC Current per I/O Pin40 mA
 
Sorry for the three posts in a row, have some info you asked me to look at.

I did an AC Voltage to Lamp Temp test just to see if it was linear, see attachment. It's difficult to get exact readings on this as the mains variation seems to play havoc with the temp readings, frustrating.
My Thermocouple Amplifiers output is 10mV/ deg C

Cheers
 

Attachments

  • Linearity Test.PNG
    Linearity Test.PNG
    13.1 KB · Views: 168
I don't think I have ever seen mains variations like that. Any possibility your having issues at home and didn't know it until now? Could this be affecting your current vacuum setup?

PID would probably give the same sort of oscillating behavior unless there is supply correction within the triac controller.

If you up to it, check the mains before the main breaker for the property and determine if it's a utility issue. I'll assume the your electrical has the 240 secondary with one end grounded which is different than the US. Check N to ground voltage as well.
 
Yes it's a real bugger.

It does affect the Flow Test Bench & everything I try to do, the Engine Dyno as well.
Today the Mains voltage is around 246V with a 1V constant variation before it goes into the Meter from the lines & from the Power Points as well
The voltage varies from day to day, like I mention I am about an hour from civilisation & everybody in this area has the same issue..
It is some distance to the nearest sub station.
The Neutral to Ground voltage is less than 1mV.

The variation yesterday was around 2.5V & the RMS voltage was around 240V.

I don't mind if I have to build a mains correction circuit, is there any reading online that I could look at for this?

Cheers
 
Hi,

Dont feel bad. Here the mains varies from 90v to 120vac, with the norm in the summer only 105vac whcn it should be 120vac.
It goes down according to outside temperature so sometimes we get 95vac when we have a heat wave. It could also dip down to 80vac or 70vac for one or two seconds, which shuts down the air conditioners for a couple minutes until they can start back up. Talk about silly electric.
 
Hi MrAl.

Yes, The summer time really affects things here as well, I know what your saying with big variations from the heat of the day & the cool of the night.

Cheers
 
Sorry for the delay but I have been reading up on many things trying to get a better understanding of what's involved to do the job correctly.
I like to do things correctly if I am able so could someone have a look at my new circuit & let me know if there are any issues with it before I build it.

I want to control this lamp properly although I think the time constant for cooling of the glass may be a little slow, I may be wrong & still want to try though, it will be an excellent start.

If the circuit is ok I will use it for the PID testing.

For the Anode pin of the MOC3021 & the LED I have had to adjust the resistors to suit the Simulation to get the required current input.

The Formula I used for the 4N25 & the MOC3021 was:

R = (V-VF)/IF, is this correct. If so I will use the right values on the circuit.

Cheers
 

Attachments

  • New Circuit.PNG
    New Circuit.PNG
    41.7 KB · Views: 165
Sorry for the delay but I have been reading up on many things trying to get a better understanding of what's involved to do the job correctly.
I like to do things correctly if I am able so could someone have a look at my new circuit & let me know if there are any issues with it before I build it.

I want to control this lamp properly although I think the time constant for cooling of the glass may be a little slow, I may be wrong & still want to try though, it will be an excellent start.

If the circuit is ok I will use it for the PID testing.

For the Anode pin of the MOC3021 & the LED I have had to adjust the resistors to suit the Simulation to get the required current input.

The Formula I used for the 4N25 & the MOC3021 was:

R = (V-VF)/IF, is this correct. If so I will use the right values on the circuit.

Cheers


Yes, the formula you used is correct.

I want to control this lamp properly although I think the time constant for cooling of the glass may be a little slow, I may be wrong & still want to try though, it will be an excellent start.

When doing an experiment like this I believe you also need to consider the time constant of the thermocouple. How fast the thermocouple responds to change.

Ron
 
Thanks Reloadron,

Yes there are a few things to consider, it's a steep learning curve for me but it is very interesting.

Any idea why I had to use around 75 Ohm series resistance to V10 in the simulation to get it to work correctly??

Cheers
 
the OP said:
Any idea why I had to use around 75 Ohm series resistance to V10 in the simulation to get it to work correctly??

So, something like 1 or zero ohms didn't work?

==

Still thinking about compensation. The only thought at this point is that you have two concerns. Mains variation. For now, let's assume +-10%.

If the mains were constant, you would have a table of 0-100%, and phase angle or more likely time which could be measured in "ticks".

The index in could be V or V^2 in percentage units.

A
1. Can you live with 240-24 as you "highest" RMS voltage? or
2. Does one have to add 24 VAC to the 240, so you can control +-10% of 240V?

B
The other problem is measuring the RMS value of the mains?

C
What is 1% more or 3% less?
 
Kiss, wouldn't it be easier to regulate to a lesser voltage, say 235V Ac or there abouts ?

I think the best solution may be to try the control first & then get a handle on what or what not needs to be done from there.

Just a thought, maybe it's what you have already mentioned but what about if the table went from 0 to say 95 & then compensate in the PID loop somehow for variation of the Process output or swing in the output.

Or would the Derivative part dampen this effect?

I sort of see it as a remote helicopter or something similar, say we are flying it with a PID controller & our set point maybe say 50ft altitude, only on very calm days does the PID not have to adjust as much. In normal flying conditions you have up draft, down draft, side draft & god knows what else etc so the PID adjusts to these conditions very quickly.

It's seems the same scenario with this controller where the mains may dip up or down, I think it just needs good fast dampened control to handle it.

Maybe I have no idea either but lets see if we can control this first & see how we go.

If I have no idea, just say so, I would haha!

I am just making up a proper circuit board now so things are safe.

Yes I tried very small resistances in the simulation but the output was erratic????

Cheers
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top