Author Topic: Magnetic Ballasts for T5 Lamps finally here!!!  (Read 14418 times)
Kappa7
Member
***
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #45 on: February 02, 2013, 09:33:04 AM » Author: Kappa7
Or the voltage waveform - If the lamp is off there is sine ie continuous regions where the voltage is low (between some thresholds). If the lamp is on the voltage will be the arc voltage of the lamp for continuous peroids except quickly at when zero crossing

That would require quite extensive signal processing. And in the starter is co power budget to do that (the maximum the electronic could draw is 1mA via >100kOhm resistor, while such processing would require fast running u-controller consuming about 15mA)...

I don't think that the so much computation power is needed. It's sufficient to convert with an A/D converter at few khz and calculate the derivate of the signal, if the waveform is ~square we can detect very easily were the derivate value is high on the rising and falling edge. A simple PIC10F or PIC12F microcontroller (example:PIC10F222) with 6 or 8pin clocked @ 4Mhz should be capable of such calculation at about 5khz of sampling frequency(which mean that one period of the 50Hz will have 100samples) and it require about 0.2-0.6mA (depending on the supply voltage and the temperature of the microcontroller).
Logged
Medved
Member
*****
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #46 on: February 02, 2013, 10:13:14 AM » Author: Medved
I don't think that the so much computation power is needed. It's sufficient to convert with an A/D converter at few khz and calculate the derivate of the signal, if the waveform is ~square we can detect very easily were the derivate value is high on the rising and falling edge.
The derivation would amplify all the noise on the mains, so you have to filter that out. More robust method would be the correlation with the expected rectangular's higher harmonics (waveform in a table). But that require a bit more computing (one mixer and 2'nd order low pass filter for the main detection, sample rate DDS and PLL to lock the sdetection system in phase with the 50Hz mains). But with 128 samples for mains period it should be within the reach of the small controllers.


A simple PIC10F or PIC12F microcontroller (example:PIC10F222) with 6 or 8pin clocked @ 4Mhz should be capable of such calculation at about 5khz of sampling frequency(which mean that one period of the 50Hz will have 100samples) and it require about 0.2-0.6mA (depending on the supply voltage and the temperature of the microcontroller).
When run at the full 4MHz, their consumption is few mA (and that mean about 0.5..1W power dissipation in the starter), while the PIC arithmetic is rather limited...

I guess using the current detection would be way easier...
Logged

No more selfballasted c***

Ash
Member
*****
Offline

View Posts
View Gallery


Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #47 on: February 02, 2013, 10:38:19 AM » Author: Ash
I did not have time to draw the circuit (i'll do it shortly) but i am thinking along this lines :

option 1
Make the ignitor run "in simulation" all the time (quickly shorting the ballast output at the peak of each half cycle), but through a high value resistor. and measure ignition volage presence

If the lamp is not running, this will cause some pulses of higher voltage (despite the resistor), and those can be detected by the ignitor. If the ignitor detected response from th ballast, it will immediately follow by preheating for 2 secs and a series of pulses

If the lamp is running, the additional small current through the resistor is negligible compared to it, and won;t cause response from the ballast

option 2 (what i described earlier)
Measure if the voltage is between 180v and 200v with a diac and SCR or GTO. if the voltage is then output logic "1", else output logic "0". Now measure the duty cycle of this signal :

If the lamp is not running, it will be present briefly 2 times in each half cycle (on the way of the sine up and on the way down)

If the lamp is running, it will be quite high (effectively 1/the crest facor of the ballast)

Measure the duty cycle with a basic capacitor circuit, and decide if its time to try ignition or not
Logged
Medved
Member
*****
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #48 on: February 02, 2013, 11:13:35 AM » Author: Medved
@Ash: Now I got your point. There are at least two problems:
First the 180..200V range is only 10% wide, while you have to account for +/-5% tolerance of the starter components (so youur gap would already close) and about +/-10% for the lamp variations. So the band would have to be at least 30% wide, so 140..200V nominal. Anf there the sinewave spend already some time, so the minimum duty threshold would have to be about 10..20%
Second, the arc voltage is by far not a perfect rectangle, but it is somehow bended up and down, as the voltage depend on the actual cathode temperature and that follow (with lag) the lamp current. So after the reignition spike, the voltage could decay down, again by about 10%, so the duty ratio threshold can not be more than 50%. Moreover you have to use some filter, in order to remove the high frequency noises, what will round the signal up, so again make it more difficult to detect.
Logged

No more selfballasted c***

Ash
Member
*****
Offline

View Posts
View Gallery


Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #49 on: February 02, 2013, 01:19:38 PM » Author: Ash
What happens around zero crossing whemn the lamp is on ?
Logged
Kappa7
Member
***
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #50 on: February 02, 2013, 02:04:52 PM » Author: Kappa7
The derivation would amplify all the noise on the mains, so you have to filter that out. More robust method would be the correlation with the expected rectangular's higher harmonics (waveform in a table). But that require a bit more computing (one mixer and 2'nd order low pass filter for the main detection, sample rate DDS and PLL to lock the sdetection system in phase with the 50Hz mains). But with 128 samples for mains period it should be within the reach of the small controllers.
Yes but you can filter the noise out quite easily without a correlation. By the 0 crossing you know were you are in the 50hz main cycle, you know also in which direction the waveform will move by the past samples. With these information and validating some 50hz main period I think that it would not so tricky to do the job.

When run at the full 4MHz, their consumption is few mA (and that mean about 0.5..1W power dissipation in the starter), while the PIC arithmetic is rather limited...
Sorry but you are wrong. Modern PIC like the 10F222have a power consumption of 170uA@4MHz with a power supply of 2V or 350uA at 5V. The AD converter add 80uA at 2V.


I guess using the current detection would be way easier...
This is for sure, but I think that with some work it would possible to do the detection with the PIC without increasing to much the cost (the PIC itself would cost 0.3-0.5$ for 5kpieces).
Logged
Medved
Member
*****
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #51 on: February 02, 2013, 03:26:41 PM » Author: Medved
Yes but you can filter the noise out quite easily without a correlation. By the 0 crossing you know were you are in the 50hz main cycle, you know also in which direction the waveform will move by the past samples. With these information and validating some 50hz main period I think that it would not so tricky to do the job.
Actually the correlation is very easy to implement into a real device, with good selection of sample rate it become even less demanding on the computing power than the filtering and diferenciation.
Only the mathematical theory behind is not as trivial, so it appear a bit more complex:
Into a look-up table you put the signal you want to find the correlation with, in our case a rectangle minus it's first harmonic content (you calculate it in an Excell or similar tool). There could be only one half of the period, as the other half would be generated as the copy and evaluated as being negative
As we know the phase of our signal we are looking for, we need to find the correlation only in some time spots, where the voltage is in phase with our "reference" signal in our LUT. If the lamp is not lit, so the measured signal is a sinewave, the result of such single point of correlation would be zero (remember, we subtract the 1'st harmonic from the reference signal - just to have this zero). If the lamp is lit and so the voltage is nearly rectangular, we get quite a strong correlation with our reference.
Now how to compute the correlation? First we have to make an internal generator of the reference signal: A phase wheel generating a pointer (actually incrementing it for each sample and let it overflow after 1 mains period; therefore it is beneficial to have the number of samples corresponding to one mains period as 2^n) into our predefined LUT.
As the measured and "generated" samples go, let's multiply the measured with the generated one and sum all the results from one period.
And viola, this sum is the desired correlation level to be evaluated. It would be good to perform some averaging across few periods (it is then processing of 50sa/s)

So each sample you do:
- Increment the phase wheel, use as the LUT pointer (7-bit operation for 128samples per period)
- Multiply the ADC result with the value from the LUT (8bit signed char arithmetic is sufficient)
- Add the result to the correlation accumulator (16 bit signed arithmetic).
You may store the LUT values in the format of the minus sign in the MSB and the absolute value in the rest, while during the multiplication use only the absolute value and with the negative sign use subtract instead of the addition in the next step. By that you eliminate the need of sign-aware multiplication, so the basic "mul" instruction could be used.

Every pisitive slope zero cross detect:
- Take the correlation result, do a low pass filtering with the values from last cycles
- Compare with a threshold, so determine, if the correlation is above or below the threshold
- Reset the correlation accumulator (so it could accumulate the correlation for the next cycle)
- Correct the phase of the Phase wheel, adjust (speed up/slow down) the exact sample rate so, the phase wheel "rotate" in sync with the voltage (so the PLL)



Sorry but you are wrong. Modern PIC like the 10F222have a power consumption of 170uA@4MHz with a power supply of 2V or 350uA at 5V. The AD converter add 80uA at 2V.

Well, you are partially right.
But if you want reasonable functionality of the ADC, the supply voltage should be high enough and quite clean, mainly from all components form the mains frequency and it's harmonics, as these would correlate with the measured signal, so cause error.
So the controller would consume about 500uA, plus you would need some active voltage regulator (large, high quality electrolytic won't fit into the starter socket), consuming another about 0.5mA, so 1mA in total, so we are at about 250mW, so indeed quite manageable...



This is for sure, but I think that with some work it would possible to do the detection with the PIC without increasing to much the cost (the PIC itself would cost 0.3-0.5$ for 5kpieces).

Well, that is quite a lot, but the current detection would need at least an optocoupler and 4 pins...
Logged

No more selfballasted c***

Kappa7
Member
***
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #52 on: February 02, 2013, 05:36:19 PM » Author: Kappa7
Thanks for the very clear explanation on how implement the correlation. Indeed it's not particularly computational hungry and I think that the pic could manage it without too much problems (at least if we don't take too many points for one period).

Yes we will have to take in account some more current(and cost too) for the power management, but it's still possible to remain under 1mA.
Logged
Liam
Member
**
Offline

Gender: Male
View Posts
View Gallery


Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #53 on: February 04, 2013, 11:16:36 AM » Author: Liam
its about time lol
Logged

My gallery http://www.lighting-gallery.net/gallery/index.php?cat=11495

Kappa7
Member
***
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #54 on: February 05, 2013, 04:40:02 PM » Author: Kappa7
@Medved:

I'm trying to make an example of correlation in excel(see the attached excel file) between the "(square-1st harmonic),sin" and "(square-1st harmonic),square", but I don't understand how in the case of the sinus signal I would get 0 as result of the correlation. I'm doing something wrong?
Thank you
 
Logged
Medved
Member
*****
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #55 on: February 05, 2013, 05:27:24 PM » Author: Medved
The 1'st harmonics have somewhat higher amplitude than the square itself. So the "sin" in the "sq-sin" must have some extra coefficient, so something like "sq-k*sin"., where the "k" is about 1.3135 (I get it by experimenting a bit with the coefficient, I don't remember it exactly)
Logged

No more selfballasted c***

Kappa7
Member
***
Offline

Gender: Male
View Posts
View Gallery

Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #56 on: February 06, 2013, 05:55:49 AM » Author: Kappa7
Oh right I've forgot the coefficient, it's 4/Pi.
Now I get 0 as result of the correlation of the sinus with the square-1st harmonic.
Thank you.
Logged
WorldwideHIDCollectorUSA
Member
*****
Offline

Gender: Male
View Posts
View Gallery

HID, LPS, and preheat fluorescents forever!!!!!!


Worldwide HIDCollectorUSA
Re: Magnetic Ballasts for T5 Lamps finally here!!! « Reply #57 on: December 09, 2021, 12:19:56 AM » Author: WorldwideHIDCollectorUSA
I have never known that magnetic ballasts for T5 HE and T5 HO tubes ever existed. If I get some of those, I will probably need some power inverters to run them at the proper frequency.
Logged

Desire to collect various light bulbs (especially HID), control gear, and fixtures from around the world.

DISCLAIMER: THE EXPERIMENTS THAT I CONDUCT INVOLVING UNUSUAL LAMP/BALLAST COMBINATIONS SHOULD NOT BE ATTEMPTED UNLESS YOU HAVE THE PROPER KNOWLEDGE. I AM NOT RESPONSIBLE FOR ANY INJURIES.

Print 
© 2005-2024 Lighting-Gallery.net | SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies