Help designing a sweep generator in Circuit Maker

Discussion in 'Electronics Resources' started by Dynaman, Jul 31, 2008.

  1. Dynaman

    Thread Starter Active Member

    Jan 17, 2008
    46
    0
    Dear Techies:

    I was wondering if anyone new how to configure the SIGNAL GENERATOR function in circuit maker software to act as a swept generator from say 20 - 20khz?

    Your help would be very much appreciated.

    :)
     
  2. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It doesn't really have that function built in.
    You could fiddle around with FM modulation to at least get some kind of frequency sweep.

    The other option is to generate a .PWL file. A .pwl file is just a text file with times and values.
    Here's one quick example that I generated from a short QBasic program. It's a simulation of a varying 12v PWM signal, seven seconds long. First the program:
    Code ( (Unknown Language)):
    1.  
    2. '───────────────── 12VPWMDN.BAS ────────────────────
    3. ' Creates PWL file for Circuitmaker Student for signal generator
    4. ' Alternate between 12V and 0V
    5. CLS
    6. OPEN "12VPWMdn.pwl" FOR OUTPUT AS #1
    7. T = 1
    8. ZON = .01  ' MS to stay on, doesn't change
    9. ZOFF = .001 ' Increases from 1/10 ZON to 50X ZON
    10. TRAN = .00005 'Transition time
    11. ZLAST = ZON * 50
    12. PRINT #1, USING "+#.######^^^^ +##.#####"; 0; 12
    13. DO
    14.    T = T + TRAN
    15.    PRINT #1, USING "+#.######^^^^ +##.#####"; T; 12
    16.    T = T + ZON
    17.    PRINT #1, USING "+#.######^^^^ +##.#####"; T; 12
    18.    T = T + TRAN
    19.    PRINT #1, USING "+#.######^^^^ +##.#####"; T; 0
    20.    T = T + ZOFF
    21.    ZOFF = ZOFF * 1.1
    22.    PRINT #1, USING "+#.######^^^^ +##.#####"; T; 0
    23. LOOP WHILE ZOFF < ZLAST
    24. CLOSE
    25.  
    The output from the program:
    Code ( (Unknown Language)):
    1. +0.000000E+00 +12.00000
    2. +1.000050E+00 +12.00000
    3. +1.010050E+00 +12.00000
    4. +1.010100E+00  +0.00000
    5. +1.011100E+00  +0.00000
    6. +1.011150E+00 +12.00000
    7. +1.021150E+00 +12.00000
    8. +1.021200E+00  +0.00000
    9. +1.022300E+00  +0.00000
    10. +1.022350E+00 +12.00000
    11. +1.032350E+00 +12.00000
    12. +1.032400E+00  +0.00000
    13. +1.033610E+00  +0.00000
    14. +1.033660E+00 +12.00000
    15. +1.043660E+00 +12.00000
    16. +1.043710E+00  +0.00000
    17. +1.045040E+00  +0.00000
    18. +1.045090E+00 +12.00000
    19. +1.055090E+00 +12.00000
    20. +1.055140E+00  +0.00000
    21. +1.056605E+00  +0.00000
    22. +1.056654E+00 +12.00000
    23. +1.066654E+00 +12.00000
    24. +1.066704E+00  +0.00000
    25. +1.068315E+00  +0.00000
    26. +1.068365E+00 +12.00000
    27. +1.078365E+00 +12.00000
    28. +1.078415E+00  +0.00000
    29. +1.080186E+00  +0.00000
    30. +1.080236E+00 +12.00000
    31. +1.090236E+00 +12.00000
    32. +1.090286E+00  +0.00000
    33. +1.092235E+00  +0.00000
    34. +1.092285E+00 +12.00000
    35. +1.102285E+00 +12.00000
    36. +1.102335E+00  +0.00000
    37. +1.104478E+00  +0.00000
    38. +1.104528E+00 +12.00000
    39. +1.114528E+00 +12.00000
    40. +1.114578E+00  +0.00000
    41. +1.116936E+00  +0.00000
    42. +1.116986E+00 +12.00000
    43. +1.126986E+00 +12.00000
    44. +1.127036E+00  +0.00000
    45. +1.129630E+00  +0.00000
    46. +1.129680E+00 +12.00000
    47. +1.139680E+00 +12.00000
    48. +1.139730E+00  +0.00000
    49. +1.142583E+00  +0.00000
    50. +1.142633E+00 +12.00000
    51. +1.152633E+00 +12.00000
    52. +1.152683E+00  +0.00000
    53. +1.155821E+00  +0.00000
    54. +1.155871E+00 +12.00000
    55. +1.165871E+00 +12.00000
    56. +1.165921E+00  +0.00000
    57. +1.169374E+00  +0.00000
    58. +1.169423E+00 +12.00000
    59. +1.179423E+00 +12.00000
    60. +1.179473E+00  +0.00000
    61. +1.183271E+00  +0.00000
    62. +1.183321E+00 +12.00000
    63. +1.193321E+00 +12.00000
    64. +1.193371E+00  +0.00000
    65. +1.197548E+00  +0.00000
    66. +1.197598E+00 +12.00000
    67. +1.207598E+00 +12.00000
    68. +1.207648E+00  +0.00000
    69. +1.212243E+00  +0.00000
    70. +1.212293E+00 +12.00000
    71. +1.222293E+00 +12.00000
    72. +1.222343E+00  +0.00000
    73. +1.227397E+00  +0.00000
    74. +1.227447E+00 +12.00000
    75. +1.237447E+00 +12.00000
    76. +1.237497E+00  +0.00000
    77. +1.243057E+00  +0.00000
    78. +1.243107E+00 +12.00000
    79. +1.253107E+00 +12.00000
    80. +1.253157E+00  +0.00000
    81. +1.259273E+00  +0.00000
    82. +1.259323E+00 +12.00000
    83. +1.269323E+00 +12.00000
    84. +1.269373E+00  +0.00000
    85. +1.276100E+00  +0.00000
    86. +1.276150E+00 +12.00000
    87. +1.286150E+00 +12.00000
    88. +1.286200E+00  +0.00000
    89. +1.293600E+00  +0.00000
    90. +1.293650E+00 +12.00000
    91. +1.303650E+00 +12.00000
    92. +1.303700E+00  +0.00000
    93. +1.311841E+00  +0.00000
    94. +1.311890E+00 +12.00000
    95. +1.321890E+00 +12.00000
    96. +1.321940E+00  +0.00000
    97. +1.330895E+00  +0.00000
    98. +1.330945E+00 +12.00000
    99. +1.340945E+00 +12.00000
    100. +1.340995E+00  +0.00000
    101. +1.350844E+00  +0.00000
    102. +1.350894E+00 +12.00000
    103. +1.360894E+00 +12.00000
    104. +1.360944E+00  +0.00000
    105. +1.371779E+00  +0.00000
    106. +1.371829E+00 +12.00000
    107. +1.381829E+00 +12.00000
    108. +1.381879E+00  +0.00000
    109. +1.393797E+00  +0.00000
    110. +1.393847E+00 +12.00000
    111. +1.403847E+00 +12.00000
    112. +1.403897E+00  +0.00000
    113. +1.417007E+00  +0.00000
    114. +1.417057E+00 +12.00000
    115. +1.427057E+00 +12.00000
    116. +1.427107E+00  +0.00000
    117. +1.441528E+00  +0.00000
    118. +1.441578E+00 +12.00000
    119. +1.451578E+00 +12.00000
    120. +1.451628E+00  +0.00000
    121. +1.467491E+00  +0.00000
    122. +1.467541E+00 +12.00000
    123. +1.477541E+00 +12.00000
    124. +1.477591E+00  +0.00000
    125. +1.495040E+00  +0.00000
    126. +1.495090E+00 +12.00000
    127. +1.505090E+00 +12.00000
    128. +1.505140E+00  +0.00000
    129. +1.524334E+00  +0.00000
    130. +1.524384E+00 +12.00000
    131. +1.534384E+00 +12.00000
    132. +1.534434E+00  +0.00000
    133. +1.555548E+00  +0.00000
    134. +1.555598E+00 +12.00000
    135. +1.565598E+00 +12.00000
    136. +1.565648E+00  +0.00000
    137. +1.588873E+00  +0.00000
    138. +1.588923E+00 +12.00000
    139. +1.598923E+00 +12.00000
    140. +1.598973E+00  +0.00000
    141. +1.624521E+00  +0.00000
    142. +1.624571E+00 +12.00000
    143. +1.634571E+00 +12.00000
    144. +1.634621E+00  +0.00000
    145. +1.662723E+00  +0.00000
    146. +1.662773E+00 +12.00000
    147. +1.672773E+00 +12.00000
    148. +1.672823E+00  +0.00000
    149. +1.703736E+00  +0.00000
    150. +1.703786E+00 +12.00000
    151. +1.713786E+00 +12.00000
    152. +1.713836E+00  +0.00000
    153. +1.747840E+00  +0.00000
    154. +1.747890E+00 +12.00000
    155. +1.757890E+00 +12.00000
    156. +1.757939E+00  +0.00000
    157. +1.795344E+00  +0.00000
    158. +1.795394E+00 +12.00000
    159. +1.805394E+00 +12.00000
    160. +1.805444E+00  +0.00000
    161. +1.846589E+00  +0.00000
    162. +1.846639E+00 +12.00000
    163. +1.856639E+00 +12.00000
    164. +1.856688E+00  +0.00000
    165. +1.901948E+00  +0.00000
    166. +1.901998E+00 +12.00000
    167. +1.911998E+00 +12.00000
    168. +1.912048E+00  +0.00000
    169. +1.961833E+00  +0.00000
    170. +1.961883E+00 +12.00000
    171. +1.971883E+00 +12.00000
    172. +1.971933E+00  +0.00000
    173. +2.026696E+00  +0.00000
    174. +2.026747E+00 +12.00000
    175. +2.036747E+00 +12.00000
    176. +2.036797E+00  +0.00000
    177. +2.097037E+00  +0.00000
    178. +2.097087E+00 +12.00000
    179. +2.107087E+00 +12.00000
    180. +2.107137E+00  +0.00000
    181. +2.173401E+00  +0.00000
    182. +2.173451E+00 +12.00000
    183. +2.183451E+00 +12.00000
    184. +2.183501E+00  +0.00000
    185. +2.256392E+00  +0.00000
    186. +2.256442E+00 +12.00000
    187. +2.266442E+00 +12.00000
    188. +2.266492E+00  +0.00000
    189. +2.346671E+00  +0.00000
    190. +2.346721E+00 +12.00000
    191. +2.356721E+00 +12.00000
    192. +2.356771E+00  +0.00000
    193. +2.444969E+00  +0.00000
    194. +2.445019E+00 +12.00000
    195. +2.455019E+00 +12.00000
    196. +2.455069E+00  +0.00000
    197. +2.552086E+00  +0.00000
    198. +2.552136E+00 +12.00000
    199. +2.562136E+00 +12.00000
    200. +2.562186E+00  +0.00000
    201. +2.668905E+00  +0.00000
    202. +2.668956E+00 +12.00000
    203. +2.678956E+00 +12.00000
    204. +2.679006E+00  +0.00000
    205. +2.796396E+00  +0.00000
    206. +2.796447E+00 +12.00000
    207. +2.806447E+00 +12.00000
    208. +2.806497E+00  +0.00000
    209. +2.935627E+00  +0.00000
    210. +2.935677E+00 +12.00000
    211. +2.945677E+00 +12.00000
    212. +2.945727E+00  +0.00000
    213. +3.087770E+00  +0.00000
    214. +3.087820E+00 +12.00000
    215. +3.097820E+00 +12.00000
    216. +3.097870E+00  +0.00000
    217. +3.254117E+00  +0.00000
    218. +3.254168E+00 +12.00000
    219. +3.264168E+00 +12.00000
    220. +3.264218E+00  +0.00000
    221. +3.436090E+00  +0.00000
    222. +3.436140E+00 +12.00000
    223. +3.446140E+00 +12.00000
    224. +3.446190E+00  +0.00000
    225. +3.635249E+00  +0.00000
    226. +3.635299E+00 +12.00000
    227. +3.645299E+00 +12.00000
    228. +3.645349E+00  +0.00000
    229. +3.853315E+00  +0.00000
    230. +3.853365E+00 +12.00000
    231. +3.863365E+00 +12.00000
    232. +3.863415E+00  +0.00000
    233. +4.092176E+00  +0.00000
    234. +4.092227E+00 +12.00000
    235. +4.102227E+00 +12.00000
    236. +4.102277E+00  +0.00000
    237. +4.353915E+00  +0.00000
    238. +4.353965E+00 +12.00000
    239. +4.363965E+00 +12.00000
    240. +4.364015E+00  +0.00000
    241. +4.640817E+00  +0.00000
    242. +4.640867E+00 +12.00000
    243. +4.650867E+00 +12.00000
    244. +4.650918E+00  +0.00000
    245. +4.955400E+00  +0.00000
    246. +4.955450E+00 +12.00000
    247. +4.965450E+00 +12.00000
    248. +4.965500E+00  +0.00000
    249. +5.300430E+00  +0.00000
    250. +5.300480E+00 +12.00000
    251. +5.310481E+00 +12.00000
    252. +5.310531E+00  +0.00000
    253. +5.678954E+00  +0.00000
    254. +5.679004E+00 +12.00000
    255. +5.689004E+00 +12.00000
    256. +5.689054E+00  +0.00000
    257. +6.094320E+00  +0.00000
    258. +6.094370E+00 +12.00000
    259. +6.104371E+00 +12.00000
    260. +6.104421E+00  +0.00000
    261. +6.550213E+00  +0.00000
    262. +6.550263E+00 +12.00000
    263. +6.560263E+00 +12.00000
    264. +6.560313E+00  +0.00000
    265. +7.050684E+00  +0.00000
    266.  
     
  3. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    If you want to see frequency response, you should use AC Analysis (Bode Plotter).
     
  4. Dynaman

    Thread Starter Active Member

    Jan 17, 2008
    46
    0
    Thank you Gentleman. I'll absorb your thoughts.

    Aram
     
Loading...