Shop OBEX P1 Docs P2 Docs Learn Events
BS2 + neon lamp oscillator = HELP!!!! — Parallax Forums

BS2 + neon lamp oscillator = HELP!!!!

GabezeusGabezeus Posts: 3
edited 2008-06-03 19:06 in BASIC Stamp
I'm trying to measure the frequency of a neon lamp oscillator circuit similar to the one below with the neon lamp in series with the capacitor connected at the X's and P10 is connected to the second X:

Vb
/\/\/\/
X
| |---X
|>|
Vss
R C D

Vb = 140V
C = 470pf
R = 10Mohm
D = 5.1V Zener
O = neon lamp (Vx = 65V, Vf = 90V)

This is the code I'm using is:


   ' {$STAMP BS2} 
   ' {$PBASIC 2.5}

   counter VAR   Word
   timer   VAR   Word
   hold    VAR   Word

   counter = 0
   timer   = 0
   hold    = 0

   DO
      PAUSE 1
      timer   =   timer + 1

      IF ( IN10 = 1)AND ( hold = 0) THEN
       PAUSE 1
       counter = counter + 1
       hold  =   1
      ENDIF

      IF ( IN10 = 0)THEN
        PAUSE 1
        timer  =  timer + 1
        hold = 0
      ENDIF

      DEBUG "Timer is: <", DEC timer,">", CR
      hold = 1
      DEBUG "Counted: <", DEC counter,">", CR, CR, CR
      DEBUG HOME

   LOOP UNTIL (counter = 10)





this reads a time since start and the number of counts onto the debug screen, I can get it to work with switch but once I put my oscillator circuit in i can only get one count. I'm trying to get it to read into Plx-Daq once I can get the basics. The only problem I can think is that the voltage across the zener is 2.45V when the lamp is on, and the current out is 2uA because the operational resistance of the neon is huge. Any ideas why the debug screen only counts one oscillation?
Sign In or Register to comment.