Guest User

triac_test.cir

a guest
Apr 29th, 2011
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.51 KB | None | 0 0
  1. * /opt/geda/bin/gnetlist -g spice-sdb -o triac_test.cir triac_test.sch
  2. *********************************************************
  3. * Spice file generated by gnetlist *
  4. * spice-sdb version 4.28.2007 by SDB -- *
  5. * provides advanced spice netlisting capability. *
  6. * Documentation at http://www.brorson.com/gEDA/SPICE/ *
  7. *********************************************************
  8. *vvvvvvvv Included SPICE model from controller.lib vvvvvvvv
  9. ***********************************************************************
  10. * DIAC PSpice Models *
  11. ***********************************************************************
  12. .SUBCKT DIAC DIAC_IN DIAC_OUT
  13. +Tr=0.342
  14. +Vbo=13.6V
  15. +Delta_V=19V
  16. +Ibo=15uA
  17. *
  18. *Tr: Rise time (in µs)
  19. *Vbo: Break over voltage
  20. *Delta_V: Dynamic breakover voltage
  21. *Ibo: Breakover current
  22.  
  23. ****************
  24. * Switch Model *
  25. ****************
  26. * Voff=0.1V Von=0.99V
  27. .MODEL S_S1 SW Roff=1e7 Ron=2.2 vt=0.545v vh=0.445v
  28.  
  29.  
  30. * D1,D2,S1 = Delta_V
  31. D_D1 N06161 N01041 DZ19V
  32. D_D2 N06161 N01060 DZ19V
  33.  
  34. * Delta_V control
  35. S_S1 N01041 N01060 N02098 DIAC_OUT S_S1
  36. V_IDIAC1 DIAC_IN N01041 DC 0Vdc AC 0Vac
  37. E_ABM1 TRG DIAC_OUT vol=' ABS(I(V_IDIAC1))>{Ibo} ? 1 : 0'
  38. R_R1 N02098 TRG r = {1.462 * Tr}
  39. C_C1 N02098 DIAC_OUT 1u IC=0
  40. RS_S1 N02098 DIAC_OUT 1G
  41.  
  42. * D3,D4 complete the Vbo
  43. D_D3 N10655 N01060 DZ14V
  44. D_D4 N10655 DIAC_OUT DZ14V
  45.  
  46. C_C2 DIAC_IN DIAC_OUT 10p
  47. ****************
  48. * Diodes Model *
  49. ****************
  50. .model DZ19V D(Is=6.994f Rs=5.612 Ikf=0 N=1 Eg=1.11 M=.2906
  51. + Vj=.75 Fc=.5 Isr=2.088n Nr=2 Bv={Delta_V} Ibv=.17098 Nbv=1.2072
  52. + Ibvl=2.002m Nbvl=1.1457 Tbv1=888.89u)
  53. * Vz = 18 @ 14mA, Zz = 37 @ 1mA, Zz = 11 @ 5mA, Zz = 7.9 @ 20mA
  54. .model DZ14V D(Is=3.142f Rs=0.1 Ikf=0 N=1 Xti=3 Eg=1.11 M=.3282
  55. + Vj=.75 Fc=.5 Isr=1.973n Nr=2 Bv={Vbo-Delta_V} Ibv=.14467 Nbv=1.093
  56. + Ibvl=.1m Nbvl=1.2722 Tbv1=001433.3u)
  57. *
  58. .ends
  59. *
  60. *********************************************************************
  61. * Standard DIACs *
  62. *********************************************************************
  63. *
  64.  
  65. .subckt DB3 DIAC_IN DIAC_OUT
  66. X1 DIAC_IN DIAC_OUT DIAC
  67. +Tr=0.342
  68. +Vbo=32V
  69. +Delta_V=5V
  70. +Ibo=50uA
  71. * 2008 / ST / Rev 0
  72. .ends
  73. *$
  74.  
  75.  
  76. ***********************************************************************
  77. * Triacs PSpice Models *
  78. ***********************************************************************
  79. * Note :
  80. *
  81. * This triac model simulates:
  82. * -Igt (the same for all quadrants) MAX of the specification
  83. * -Il (the same for all quadrants) Typ of the specification
  84. * -Ih (the same for both polarity) Typ of the specification
  85. * -VDRM
  86. * -VRRM
  87. * -(di/dt)c and (dV/dt)c parameters are simulated only if those
  88. * constraints exceed very higly the specified limits.
  89. * -Power dissipation is realistic and correspond to a typical
  90. * triac
  91. *
  92. * All these parameters are constant, and don't vary neither
  93. * with temperature nor other parameters.
  94. *
  95. * The "STANDARD" parameter switch between
  96. * 4 quadrants triacs (STANDARD = 1) and
  97. * 3 quadrants triacs (STANDARD = 0.
  98. * The "STANDARD" parameter maintains or suppress the triggering
  99. * possibility of the triac in the fourth quadrant, and has
  100. * absolutely NO EFFECT on other parameters.
  101. *
  102. * For a correct triac behavior, the "Maximum step size" must be below
  103. * or equal 20µs.
  104. *
  105. *
  106. *
  107. *$
  108. .subckt Triac_ST A K G
  109. + Vdrm=400v
  110. + Igt=20ma
  111. + Ih=6ma
  112. + Rt=0.01
  113. + Standard=1
  114. *
  115. * Vdrm : Repetitive forward off-state voltage
  116. * Ih : Holding current
  117. * Igt : Gate trigger current
  118. * Rt : Dynamic on-state resistance
  119. * Standard : Differenciation between Snubberless and Standard Triacs
  120. * (Standard=0 => Snubberless Triacs, Standard=1 => Standard Triacs)
  121. *
  122. *****************
  123. * Power circuit *
  124. *****************
  125. *
  126. ****************
  127. *Switch circuit*
  128. ****************
  129. * Q1 & Q2 Conduction
  130. S_S3 A Plip1 positive GND Smain
  131. *RS_S3 positive 0 1G
  132. D_DAK1 Plip1 Plip2 Dak
  133. R_Rlip Plip1 Plip2 1k
  134. V_Viak Plip2 K DC 0 AC 0
  135. *
  136. * Q3 & Q4 Conduction
  137. S_S4 A Plin1 negative GND Smain
  138. *RS_S4 negative 0 1G
  139. D_DKA1 Plin2 Plin1 Dak
  140. R_Rlin Plin1 Plin2 1k
  141. V_Vika K Plin2 DC 0 AC 0
  142. **************
  143. *Gate circuit*
  144. **************
  145. R_Rgk G K 10G
  146. D_DGKi Pg2 G Dgk
  147. D_DGKd G Pg2 Dgk
  148. V_Vig Pg2 K DC 0 AC 0
  149. R_Rlig G Pg2 1k
  150. *******************
  151. *Interface circuit*
  152. *******************
  153. * positive pilot
  154. R_Rp Controlp positive 2.2
  155. C_Cp GND positive 1u
  156. E_IF15OR3 Controlp GND vol = ' V(CMDIG)>0.5 || V(CMDILIH)>0.5 || V(CMDVdrm)>0.5 ? 400 : 0 '
  157. *
  158. * negative pilot
  159. R_Rn Controln negative 2.2
  160. C_Cn GND negative 1u
  161. E_IF14OR3 Controln GND vol = ' V(CMDIG)>0.5 || V(CMDILIHN)>0.5 || V(CMDVdrm)>0.5 ? 400 : 0 '
  162. *
  163. *
  164. ******************
  165. * Pilots circuit *
  166. ******************
  167. ******************
  168. * Pilot Gate *
  169. ******************
  170. E_IF1IG inIG GND vol='( ABS(I(V_Vig)) ) > Igt ? 1 : 0 '
  171. E_MULT2MULT CMDIG GND vol='V(Q4)*V(inIG)'
  172. E_IF2Quadrant4 Q4 GND vol =
  173. + 'I(V_Vig)>Igt && V(A)-V(K)<0 && Standard==0 ? 0 : 1'
  174. *
  175. ******************
  176. * Pilot IHIL *
  177. ******************
  178. *
  179. E_IF10IL inIL GND vol=' ((I(V_Viak))>2.5*Igt) ? 1 : 0 '
  180. E_IF5IH inIH GND vol=' ((I(V_Viak))>(Ih/3)) ? 1 : 0 '
  181. *
  182. * Flip_flop IHIL
  183. E_IF6DIHIL SDIHIL GND vol = '(V(inIL)*V(inIH)+V(inIH)*(1-V(inIL))*(V(CMDILIH)) )>0.5 ? 1 : 0'
  184. C_CIHIL CMDILIH GND 1n
  185. R_RIHIL SDIHIL CMDILIH 1K
  186. R_RIHIL2 CMDILIH GND 100Meg
  187. ******************
  188. * Pilot IHILN *
  189. ******************
  190. *
  191. E_IF11ILn inILn GND vol='I(V_Vika)>2.5*Igt ? 1 : 0 '
  192. E_IF3IHn inIHn GND vol='I(V_Vika)>Ih/3 ? 1 : 0 '
  193. * Flip_flop IHILn
  194. E_IF4DIHILN SDIHILN GND vol = 'V(inILn)*V(inIHn)+V(inIHn)*(1-V(inILn))*V(CMDILIHN) >0.5 ? 1 : 0'
  195. C_CIHILn CMDILIHN GND 1n
  196. R_RIHILn SDIHILN CMDILIHN 1K
  197. R_RIHILn2 CMDILIHN GND 100Meg
  198. ******************
  199. * Pilot VDRM *
  200. ******************
  201. E_IF8Vdrm inVdrm GND vol='ABS(V(A)-V(K))>(Vdrm*1.3) ? 1 : 0 '
  202. E_IF9IHVDRM inIhVdrm GND vol = ' I(V_Viak)>(Vdrm*1.3)/1.2meg || I(V_Vika)>(Vdrm*1.3)/1.2meg ? 1 : 0 '
  203. * Flip_flop VDRM
  204. E_IF7DVDRM SDVDRM GND vol = 'V(inVdrm)+(1-V(inVdrm))*V(inIhVdrm)*V(CMDVdrm) >0.5 ? 1 : 0 '
  205. C_CVdrm CMDVdrm GND 1n
  206. R_RVdrm SDVDRM CMDVdrm 100
  207. R_RVdrm2 CMDVdrm GND 100Meg
  208. ****************
  209. * Switch Model *
  210. ****************
  211. * .MODEL Smain SW Roff=1.2meg Ron={Rt} Voff=0 Von=100
  212. .MODEL Smain SW Roff=1.2meg Ron={Rt} Vt=50v Vh=50v
  213. ****************
  214. * Diodes Model *
  215. ****************
  216. .MODEL Dak D( Is=3E-12 Cjo=5pf)
  217. .MODEL Dgk D( Is=1E-16 Cjo=50pf Rs=5)
  218. .ends
  219. *
  220. .subckt BTB16-600BW A K G
  221. X1 A K G Triac_ST
  222. + Vdrm=600v
  223. + Igt=50ma
  224. + Ih=50ma
  225. + Rt=0.025
  226. + Standard=0
  227. * 2008 / ST / Rev 1
  228. .ends
  229. *$
  230.  
  231.  
  232. .MODEL 1N4004 D(tnom=27. is=76.9p rs=0.042 n=1.45 tt=4.32u cjo=39.8p pb=1. mj=0.333 egap=1.11 xti=3. fc=0.5 bv=400. ibv=5.u)
  233.  
  234. *^^^^^^^^ End of included SPICE model from controller.lib ^^^^^^^^
  235. *
  236. *============== Begin SPICE netlist of main design ============
  237. .INCLUDE triac_test.cmd
  238. Rload Vline1 TRIAC_A 10
  239. C2 0 timing 100nF
  240. C3 0 1 100nF
  241. R1 Vline1 1 20K
  242. R2 timing 1 56K
  243. XD5 timing TRIAC_G DB3
  244. Vline Vline1 0 SIN(0v 310v 60Hz)
  245. XTR1 TRIAC_A 0 TRIAC_G BTB16-600BW
  246. .end
Advertisement
Add Comment
Please, Sign In to add comment