Skip to content

Instantly share code, notes, and snippets.

@ericfont
ericfont / circuit-20240704-0103.circuitjs.txt
Last active July 4, 2024 06:46
harvest from piezo and limit output voltage using zeners
$ 65 0.0000049999999999999996 23.47059216675035 68 5 50 5e-11
v 416 416 416 336 0 1 100 10 0 0 0.5
r 416 336 416 288 0 10000
w 416 288 512 288 0
w 416 416 512 416 0
c 512 416 512 288 0 1e-8 0.9406580458566396 0
w 560 288 608 288 0
d 608 288 608 240 2 1N5711
d 640 288 640 240 2 1N5711
d 608 336 608 288 2 1N5711
@ericfont
ericfont / circuit-20240701-1811.circuitjs.txt
Created July 1, 2024 22:12
zener limiting protection for solar panel output, ensure capacitor doesn't exceed ~5.5V
$ 65 0.000005 382.76258214399064 81 5 50 5e-11
c 352 432 352 320 0 0.00009999999999999999 -5.468785364956499 0
v 64 432 64 320 0 0 40 7 0 0 0.5
w 272 320 352 320 1
O 352 320 416 320 1 0
w 176 432 272 432 0
g 176 432 176 448 0 0
w 112 432 176 432 0
d 144 320 176 320 2 1N5712
w 176 320 208 320 2
red: 1.61 V
yellow: 1.65 V
green: 2.08 V
blue: 2.42 V
white: 2.43 V
@ericfont
ericfont / gist:d2ff149e58faba4035a15c6bdc1998e1
Last active June 26, 2024 02:23
discharge of 1.5F supercapacitor back through protection Schottky diode into solar panel
at 5pm the cell had 3.52 volts. Left connected to charging 5V solar panel though Schottky protection diode, but it seems alter at 11:40pm the super capacitor had discharged down to only 2.99 volts though that diode. So maybe ideal diode is needed instead.
$ 65 0.000009999999999999999 7.010541234668786 62 5 50 5e-11
c 800 400 800 528 0 1.5 4.663116310236138 0
v 688 528 688 400 0 2 10 2.5 2.5 0 0.9
g 688 528 688 544 0 0
g 800 528 800 544 0 0
d 704 400 752 400 2 1N5712
w 752 400 800 400 0
g 896 528 896 544 0 0
w 800 400 880 400 2
c 1056 400 1056 528 0 0.00001 2.8807489910716226 0.001
@ericfont
ericfont / simple-am-demodulation.circuitjs
Created June 3, 2024 03:26
simple am demodulation circuitjs
$ 1 1.0000000000000002e-10 382.76258214399064 50 5 50 5e-11
200 128 176 96 176 0 10000000 10000 5
g 176 256 96 256 0 0
d 176 176 224 176 3 default
w 224 256 176 256 0
w 288 256 224 256 0
w 288 256 352 256 0
p 512 176 512 256 0 0 0
r 288 176 288 256 0 1000
c 224 176 224 256 0 1e-9 0.866742339891616 0.001
@ericfont
ericfont / circuit-20240524-2213.circuitjs.txt
Created May 25, 2024 02:14
oscillator-triggered-by-low-resistance-velostat
$ 1 1e-7 10.20027730826997 67 5 42 5e-11
v 32 256 32 80 0 0 40 5 0 0 0.5
l 176 80 336 80 0 0.001 0.00004999500050001438 0
r 336 80 336 256 0 10
g 32 256 32 288 0 0
r 32 80 176 80 0 100000
w 336 80 400 80 2
403 416 192 912 352 0 5_8_0_12290_0.0004999500051363706_0.0001_-1_2_5_3
g 336 256 336 320 0 0
c 176 256 336 256 0 1e-8 0.0004999500048235615 0
@ericfont
ericfont / InterruptButton.ino
Created March 31, 2024 01:59
InterruptButton.ino
// Teensy 4.1 code to get input from 3 pins and output square wave frequency based on each.
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform_note; //xy=433,701
Version 4
SHEET 1 2148 680
WIRE 752 16 736 16
WIRE 864 16 832 16
WIRE -528 32 -528 0
WIRE -448 32 -448 0
WIRE -352 32 -352 0
WIRE 512 48 64 48
WIRE 64 64 64 48
WIRE 144 112 128 112
Version 4
SHEET 1 2148 680
WIRE 800 -96 64 -96
WIRE 64 -64 64 -96
WIRE 1040 16 1024 16
WIRE 1152 16 1120 16
WIRE -464 32 -464 0
WIRE -384 32 -384 0
WIRE 1024 112 1024 16
WIRE 1040 112 1024 112