| 1 | Patches: |
| 2 | |
| 3 | 1) Swap U1 Vin/Vout -- 3 cuts + 3 wires |
| 4 | |
| 5 | Notes: |
| 6 | |
| 7 | 1) U1 Vin/Vout pins are swapped |
| 8 | 2) Add a reset circuit |
| 9 | |
| 10 | Use a SNLVC2G06 (dual open collector inverter): |
| 11 | |
| 12 | At VCC = 5V: |
| 13 | |
| 14 | VIH = .7 * VCC = 3.5V |
| 15 | VIL = .3 * VCC = 1.5V |
| 16 | VOL = .55V |
| 17 | IOL = 32mA |
| 18 | |
| 19 | Assuming that the capacitor is clamped to VOL most |
| 20 | of the time, the R*C that corresponds to charging |
| 21 | from VOL to VIH in T seconds: |
| 22 | |
| 23 | The basic capacitor charging equation: |
| 24 | |
| 25 | V(t) = VOL + (VCC - VOL) * (1 - e(-t/R*C)) (1) |
| 26 | |
| 27 | Replacing V(t) with VIH and T: |
| 28 | |
| 29 | VIH = VOL + (VCC - VOL) * (1 - e(-T/R*C)) (2) |
| 30 | |
| 31 | Solving for RC: |
| 32 | |
| 33 | (VIH - VOL)/(VCC - VOL) = 1 - e(-T/R*C)) (3) |
| 34 | |
| 35 | e(-T/R*C) = 1 - (VIH - VOL)/(VCC - VOL) (4) |
| 36 | |
| 37 | -T/R*C = ln(1 - (VIH - VOL)/(VCC - VOL)) (5) |
| 38 | |
| 39 | R*C = -T/ln(1 - (VIH - VOL)/(VCC - VOL)) (6) |
| 40 | |
| 41 | Substituting in for T=1ms, VIH, VOL, and VCC: |
| 42 | |
| 43 | R*C = -.001/ln(1 - (3.5 - .55)/(5 - .55)) (7) |
| 44 | |
| 45 | R*C = -.001/-1.08744 |
| 46 | |
| 47 | R*C = .009196 (8) |
| 48 | |
| 49 | Setting C = .1uF |
| 50 | |
| 51 | R = .009196 / .0000001 = 9196 |
| 52 | |
| 53 | Using an R near 10K should do the trick: |
| 54 | |
| 55 | The maximum discharge current is IOL. Use Ohm's law |
| 56 | to determine determine discharge resistor: |
| 57 | |
| 58 | V = I * R |
| 59 | R = V / I |
| 60 | = 5 / .032 |
| 61 | = 156.25 |
| 62 | |
| 63 | Setting Rdischarge = 180 should be good enough. |
| 64 | |
| 65 | The charge/discharge ratio is: |
| 66 | |
| 67 | Rcharge/Rdischarge = 10K/180 = 55.5 |
| 68 | |