User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Control a dimmable ballast for T8 lamps from the RPi

Wed Aug 13, 2014 4:30 pm

Hello guys,
In your opinion, is it possible to control a dimmable ballast for fluorescent T8 lamps from the RPi? [as this one or this one]

And secondly, can I use the same lamps that I have at the moment, connected to a NON-dimmable ballast?

Thanks!
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

User avatar
iinnovations
Posts: 621
Joined: Thu Jun 06, 2013 5:17 pm

Re: Control a dimmable ballast for T8 lamps from the RPi

Thu Aug 14, 2014 3:38 pm

Sure.

Get a digital pot:
SPI : https://www.sparkfun.com/products/10613
1Wire : http://datasheets.maximintegrated.com/en/ds/DS2890.pdf

Make sure the pot range and resolution match your device.

Colin
CuPID Controls :: Open Source browser-based sensor and device control
interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Thu Aug 14, 2014 3:57 pm

Wow! Thanks @iinnovations.
This is mind-blowing! ...a digital potentiometer...

There's so much to learn. But I will not give up.

What do you say about the second Q.? May I use the same T8 lamps? Or they have to be dimmable too?
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Control a dimmable ballast for T8 lamps from the RPi

Fri Aug 15, 2014 11:46 am

dentex wrote:Wow! Thanks @iinnovations.
This is mind-blowing! ...a digital potentiometer...

There's so much to learn. But I will not give up.

What do you say about the second Q.? May I use the same T8 lamps? Or they have to be dimmable too?
you want to re-use the lamps from the non-dimmable ballast with the dimmable ballast? that's no problem, as long as the lamps still work, its the ballast that does the work, the lamps are the same.
Doug.
Building Management Systems Engineer.

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Fri Aug 15, 2014 12:23 pm

Great! Thanks. Lamps and aquarium are all brand new.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Sun Aug 17, 2014 10:44 am

Hello, me again.
I was searching for info about how to wire the whole thing and I found a couple of interesting Qs over stackExchange:
http://electronics.stackexchange.com/qu ... spberry-pi
http://electronics.stackexchange.com/qu ... spberry-pi
They should cover also the software part.
Anyway, looking at the first link, there's a picture about wiring. It seems that all can be connected without other components, directly.
What I'm missing here (among a bunch of other things, I suppose :) ), it's how to connect the chip's P0B, P0W and P0A ends to the ballast itself, having the connections pins as in picture below.
(*) I Just realized that P0A goes to 5V and P0B to GND.
Image

Any suggestion? Thanks!

Edit: anyway, there's a problem with the voltage supply: the ballast (and many others I found) needs 0 to 10V, while I'm unable to find any digital pot providing such voltage.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

ChrisBlow
Posts: 8
Joined: Fri Oct 26, 2012 10:32 pm
Location: Odense, Denmark
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Sat Oct 25, 2014 11:20 pm

Im playing around with 0-10v atm.

My largest problem is, that I cant get 0V output, Im at 0.3V so my lights is not off.. :(
Im trying to get some WS2821 ICs LED drivers to control 0-10V analog.

Quick component path:
DMX512 -> WS2821 -> pull up resistor -> BC557a PNP transistor -> ULN2003 Darligton array

Now I can use 10V psu to feed the output side of my Darlington array, and in to my ballast.

Maybe the ULN2003 is what you are looking for, or maybe a Up-Amp.
Best regards

ChrisB
Bjørn Christiansen

User avatar
aTao
Posts: 1091
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg

Re: Control a dimmable ballast for T8 lamps from the RPi

Sat Oct 25, 2014 11:55 pm

it looks very much like the 4 wire dimmable ballasts need a control voltage rather than a variable resistance (as you would infer from the case diagram)

see here https://www.etcconnect.com/Support/Arti ... -Work.aspx for details of 2,3 and 4 wire dimmable ballasts.

That said there are (as usual) several options to create 0..10V from the RPi

My first approach would be a voltage multiplier, a string of diodes and capacitors can take an ac or chopped dc input and generate a high (can be extremely high) dc with a bit of ripple output. it all depends on the input impedance of the ballast control input as to wether the RPi can drive this directly from a GPIO pin. If it needs too much oomph then a similar approach switching the 5V (already available) would do the trick.

A simpler method would be to pulse width modulate a 10V psu but that needs an extra psu.
>)))'><'(((<

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Sun Oct 26, 2014 10:49 am

Hello, I still haven't had the chance to put my hands on one of those ballasts... So this part of my project is stalled.
From what I understand, I have to provide a variable voltage between 0 and 10V to the ballast for it to dim its lamps. I already have a simple method for this, I'm just unsure if it would work since I never tried. I know this method works in the other two cases I'm using it: to set a cooler fan speed and to dim a led strip, both at 12V.
I'm using an external power supply, some gpio pins, servoblaster and a ULN2003A

More info are available HERE for the project's details (there's a DropBox link with pictures and a schematics, but actually I didn't have much feedback...) and HERE for the thread about the "0-10V" I've also opened.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

User avatar
aTao
Posts: 1091
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg

Re: Control a dimmable ballast for T8 lamps from the RPi

Sun Oct 26, 2014 11:28 am

Just a thought.. You are already dimming LEDs, can they be used instead of the fluorescents, or are they particular daylight ones, LEDs do have a great choice of white colours.
>)))'><'(((<

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Sun Oct 26, 2014 1:15 pm

The reason is that I want to retain the fluorescent lamps. They are good for the aquarium and are already properly mounted. The optimum would be to have them dimmable. I'm using a blue led strips in addition (to simulate night light and moon light) and I'm planning to add another one for proper sunrise/sunset effect, leaving to the fluorescent fixtures the main powerful lighting.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Control a dimmable ballast for T8 lamps from the RPi

Mon Oct 27, 2014 4:19 pm

Hi Dentex,

when I first read this thread I thought that you already had the dimmable ballasts, so I was focussed on the 1-10V signal method. as you don't yet have the ballast I would suggest a re-think, go for a dimmable ballast with a DSI or DALI interface and your dimming issue becomes much easier.

Even a switchDIM interface could be made to work, but would need a FET of some kind
Doug.
Building Management Systems Engineer.

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Mon Oct 27, 2014 4:34 pm

Hello.
The reason why I was thinking to the 0-10V interface was I found it easy to understand/implement. In fact, although i read something about DSI and DALI, I don't have a clue on how to use them with the RPi. Do you know if it's possible?

Although it seems you already answered HERE. :)
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Oct 28, 2014 9:51 am

dentex wrote:Hello.
The reason why I was thinking to the 0-10V interface was I found it easy to understand/implement. In fact, although i read something about DSI and DALI, I don't have a clue on how to use them with the RPi. Do you know if it's possible?

Although it seems you already answered HERE. :)
You are correct, I didn't remember that post when I made this one. The DALI protocols require the units be specifically programmed and I'm not sure how this has to be done.
I'm pretty sure that a Raspberry pi could be programmed to interface with them but I don't think that anyone has done so yet. (and that scale of programming is well beyond my skills).
unfortunately all DALI ballasts currently on the market only have their addresses settable and viewable with special equipment
.
DALI is open protocol, so the details are available for anyone to make DALI devices.

DSI similarly has a level of programming required to communicate with the controllers but is a proprietary system of Tridonic, although I know that many lighting control systems manufacturers make Lighting Control Modules that will interface with DSI (so they aren't keeping it exclusively for themselves. They may require a licence fee to allow use of the protocol.

Possibly switchDIMM would be the easiest, just get a mains AC FET and time the on and off signals to control the light level.
Image

this is a fairly good overview of the various lighting control protocols.
Last edited by BMS Doug on Tue Oct 28, 2014 10:35 am, edited 1 time in total.
Doug.
Building Management Systems Engineer.

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Oct 28, 2014 10:06 am

Thanks again for the informative link.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Oct 28, 2014 1:52 pm

Well, now that I was reading something on this 0-10V standard, I think that I had the right answer by
iinnovations back in the 2nd post of this thread.

From the pdf posted above:
[...]Ballasts are the source of the control current.
Controllers for this method are variable resistors or
an electronic equivalent capable of handling a range
from 0.01ma - 2ma[...]
More, from the arduino forum, on a thread about the "0-10V" usage:
[...]Quote:"Buffer should be a sink-type buffer. The current should be taken from the HFC-ballast. The
HFC-ballast is a current source.": That says it all, you don't need to supply a voltage to this controller at
all. You need to sink current from it. Sinking current is draining it to ground.[...]
So the PWM / ULN2003 / PSU / variable V output logic chain is not the way to go. This is confirmed also
by the above post by ChrisBlow.
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

User avatar
aTao
Posts: 1091
Joined: Wed Dec 12, 2012 10:41 am
Location: Howlin Eigg

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Oct 28, 2014 6:46 pm

[quote="BMS Doug"
DALI is open protocol, so the details are available for anyone to make DALI devices.[/quote]

but you do have to pay for it... http://www.dali-ag.org/discover-dali/dali-standard.html
>)))'><'(((<

500amps
Posts: 1
Joined: Tue Jan 27, 2015 7:30 am

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Jan 27, 2015 7:57 am

I realise this might be a very late post

generally wiring of 0-10v ballast would be connected to a 50k Pot or something like that to sink the source supplied from the HF ballast. (limitation of number of connected ballast could be up size of POT)
if on the other hand the controller was 1-10v you would generally supply the power ( I think from memory that is the way it is)
however as suggested most of my usual 0-10v controls in lighting have far been overrun by DALI control systems in almost the last 10 years.

I guess the PI could connect to a DALI universe via a serial interface. remember that on a DALI installation you need a DALI power supply to supply the DALI line voltage, then you could add a serial interface and connect that interface to the PI GPIO pins for control.
1 x DALI universe can control up to 64 addresses (typically 1 per ballast however some RGB and various DALI products may have multiple addresses per unit)
Of these 64 individual addresses they can be grouped (via configuration of Ballast) into
16 Native DALI groups
and or added into 16 scenes

The ballast could be part of no groups or multiple groups and the same with the scenes.
or you could control individual ballast via point commands.

I guess you could even scale this building wide and use an Ethernet backbone cabling to connect pi to pi via network and get each DALI universe being able to communicate with each other all identified from IP address and perhaps a head end PC for data gathering and supervisory control?

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Control a dimmable ballast for T8 lamps from the RPi

Tue Jan 27, 2015 2:49 pm

Thanks for your detailed reply.
Anyway, then I switched over LEDs and PWM to control them, being in the end very happy with the result. It was difficult to find those kind of ballasts and I found LEDs more versatile (think about color mixing) and more affordable. ;)

[You may take a look at the non-link for the PiAC project below, especially in images for v1.2]
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

Return to “Other projects”