Commande de Ballast
Circuit de commande de ballast electronique pour tube fluo
1 - Présentation
L’allumage des lampes à décharge nécessite une accumulation d’énergie dans une inductance ( ballast ).
Le tube fluo peut être assimilé à un élément résistif.
L’association ballast-tube fluo est donc assimilable à un circuit RL, avec comme effet une dégradation
du facteur de la puissance nécessaire pour l’éclairage ( Puissance active P=U.I.cos(ϕ) lié à un circuit inductif.
Pour compenser cet effet inductif et améliorer le facteur de puissance, un condensateur est ajouté, nous avons alors
un circuit RLC avec la caractéristique à résonance puissance-fréquence suivante :
La phase d’allumage nécessite un fonctionnement à puissance max, la puissance peut ensuite être réduite.
Un circuit d’allumage électromagnétique met en jeu un contacteur ( starter ) pour modifier la caractéristique du circuit RLC en fonction
de la fréquence imposée par le circuit.
L’alternative consiste à utiliser un redresseur puis un onduleur à résonance afin de moduler directement la fréquence du signal appliqué au circuit.
Le pilotage de cet onduleur est réalisé par le composant suivant :
2 - Description des Composants
Comparateur
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity comparateur is
port(
t : in std_logic_vector(7 downto 0);
t_125, t_199 : out std_logic);
end comparateur;
architecture arch_comparateur of comparateur is
begin
t_125 <= '1' when t="01111101" else '0'; --125
t_199 <= '1' when t="11000111" else '0'; --199
end arch_comparateur;
|
Multiplexeur N Bits
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity Multiplexeur is
port (
t: in std_logic_vector(7 downto 0);
mux : in std_logic;
n : out std_logic_vector(7 downto 0)
);
end Multiplexeur;
architecture descri_Multiplexeur of Multiplexeur is
begin
n<= "01111101" when mux='1' else t ; --125
end descri_Multiplexeur;
|
Compteur
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity Compteur is
port (
raz, clk, ce : in std_logic;
out_compt : out std_logic_vector(7 downto 0)
);
end Compteur;
architecture descri_Compteur of Compteur is
signal n : unsigned (7 downto 0);
begin
process (clk)
begin
if (rising_edge(clk)) then
if raz='1' then n <= (others =>'0') ;
elsif ce='1' then if n="11000111" then n <= (others =>'0'); -- 199
else n <= n+1;
end if;
end if;
end if;
end process;
out_compt <= std_logic_vector(n);
end descri_Compteur;
|
Diviseur par 80
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity div_80 is
port(
clk_e, raz : in std_logic ;
clk_s : out std_logic
);
end div_80;
architecture descri_div_80 of div_80 is
signal n : unsigned (6 downto 0);
begin
process (clk_e)
begin
if rising_edge(clk_e) then
if raz='1' then n<=(others =>'0');
elsif (n="1001111") then n<=(others =>'0') ; -- 79
else n<= n+1;
end if;
end if;
end process;
clk_s <= '1' when n="0000000" else '0';
end descri_div_80;
|
Diviseur par N
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity div_N is
port(
clk_e, raz : in std_logic ;
n : in std_logic_vector(7 downto 0);
clk_s : out std_logic
);
end div_N;
architecture descri_div_N of div_N is
signal interne : unsigned(7 downto 0);
begin
process (clk_e)
begin
if rising_edge(clk_e) then
if raz='1' then interne <= (others =>'0');
elsif interne=unsigned(n) then interne<=(others =>'0') ;
else interne<= interne+1;
end if;
end if;
end process;
clk_s <= '1' when interne=unsigned(n) else '0';
end descri_div_N;
|
Machine d’Etat
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
entity Sequenceur is
port (
clk, ma, reset : in std_logic;
t_125, t_199 : in std_logic;
ce, mux_n, mux_out, raz_count: out std_logic);
end Sequenceur;
architecture descri_Sequenceur of Sequenceur is
type etats_me is (Arret, F_80, F_80_50, F_50);
signal etat_cr, etat_sv : etats_me;
begin
---------------------------------------------------------------
process(clk, reset) -- REGISTRE DE LA MACHINE D'ETAT
begin
if reset='1' then etat_cr <= Arret ;
elsif rising_edge(clk) then etat_cr <= etat_sv;
end if;
end process;
---------------------------------------------------------------------------------------
process(etat_cr, ma, t_125, t_199) -- PROCESS COMBINATOIRE
begin
ce <='0' ; mux_n<='0' ; mux_out<='0' ; raz_count <= '0' ; etat_sv <=etat_cr ;
-- VALEURS DES SORTIES PAR DEFAUT
case etat_cr is
when Arret => if ma='1' then etat_sv <= F_80; end if ;
mux_n <='1'; raz_count <= '1';
when F_80 =>if t_125='1' then etat_sv <= F_80_50 ;end if ;
mux_n <='1'; mux_out <='1'; ce <='1';
when F_80_50 => if t_199='1' then etat_sv <= F_50 ;end if;
mux_out <='1'; ce <='1';
when F_50 => if ma='0' then etat_sv <= Arret;end if;
mux_out <='1';
end case;
end process;
---------------------------------------------------------------------------------------
end descri_Sequenceur;
|
|
3 - Instanciation
|
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use work.all;
entity ballast is
port( f_10khz, ma, reset : in std_logic;
fout : out std_logic);
end ballast;
architecture arch_ballast of ballast is
signal ce, Mux_N, Mux_Out, bt, raz : std_logic;
signal t, n : std_logic_vector(7 downto 0);
signal f_out_int : std_logic;
signal t_125, t_199 : std_logic;
begin
divis_80 : entity div_80 port map ( clk_e => f_10khz,
raz => raz,
clk_s => bt);
divis_N : entity div_N port map ( clk_e => f_10khz,
raz => raz,
n => n,
clk_s => f_out_int) ;
Compt : entity Compteur port map ( raz => raz,
clk => bt,
ce => ce,
out_compt => t) ;
Multip : entity Multiplexeur port map ( t => t,
mux => Mux_N,
n => n) ;
Compar : entity comparateur port map ( t => t,
t_125 => t_125,
t_199 => t_199);
Sequ : entity Sequenceur port map ( clk => f_10khz,
ma => ma,
reset => reset,
t_125 => t_125,
t_199 => t_199,
ce => ce,
mux_n => Mux_N,
mux_out => Mux_Out,
raz_count => raz) ;
fout <= f_out_int when Mux_Out='1' else '0';
end arch_ballast ;
|