├── README.md ├── buttons ├── cancel.png ├── delete.png ├── disc.png ├── grow.png ├── icbut.png ├── netlist.png ├── new.png ├── normal.png ├── ok.png ├── open.png ├── openmenu.png ├── process-stop.png ├── redo.png ├── rotate.png ├── run.png ├── save.png ├── select.png ├── text.png ├── undo.png ├── wire.png └── zoom.png ├── canvas ├── buttons │ ├── grow.png │ └── normal.png └── canvas.html ├── favicon.ico ├── gnucapjs ├── Makeem++ ├── gnucap-io.js ├── gnucap-ugly.js ├── gnucap.html ├── grid.png ├── testplot.html └── webtronics_gnucap.appcache ├── icons ├── .logo.png-autosave.kra ├── logo.png ├── logo128.jpg ├── logo128.png ├── logo16.png └── logo48.png ├── schematic.html ├── script ├── canvg.js ├── chipmaker.js ├── connections.js ├── gui.js ├── netlist.js ├── primatives.js ├── prototype.js ├── rgbcolor.js ├── schematic.js ├── utils.js └── wtx2kicad.js ├── spice.php ├── style ├── canvas.css ├── schematic.css └── web.png └── webtronix_server ├── amplifier ├── inst-amp.svg └── op-amp.svg ├── audio └── speaker.svg ├── capacitors ├── capacitor.svg ├── polar-cap.svg └── variablecap.svg ├── digital ├── adc_bridge.svg ├── and.svg ├── dac_bridge.svg ├── nand.svg ├── nor.svg ├── not.svg ├── or.svg ├── source.svg ├── xnor.svg └── xor.svg ├── diodes ├── diode.svg ├── led.svg ├── photodiode.svg ├── scr.svg ├── triac.svg ├── trigger.svg ├── varicap.svg └── zener.svg ├── frequency └── crystal.svg ├── ic ├── 3_pins.svg ├── 4_pins.svg └── 5_pins.svg ├── inductors ├── coil.svg ├── tapcoil.svg └── transformer.svg ├── parts.json ├── power ├── ac.svg ├── battery.svg ├── current.svg ├── ground.svg ├── namewire.svg └── positive.svg ├── predefined └── 555.svg ├── resistors ├── photo-resistor.svg ├── potentiometer.svg ├── resistor.svg ├── testresistor.svg └── vari-resistor.svg ├── spice ├── 2n7000.mod ├── 555.mod ├── ad620a.mod ├── ad8221.mod ├── bat54.mod ├── bjt.lib ├── digital.lib ├── diode.lib ├── dsource.mod ├── ina128.mod ├── irf150.mod ├── irf530.mod ├── irfz44n.mod ├── jfet.lib ├── lm324.mod ├── lm339.mod ├── lm358.mod ├── lm741.mod ├── mosfet.lib ├── mymodels.lib ├── mysubckt.mod ├── ne555.mod ├── tl06x.mod ├── tl07x.mod ├── tl08x.mod ├── ua741.mod └── varicap.lib ├── switches ├── ncpb.svg ├── nopb.svg ├── spst-relay.svg └── spst-switch.svg ├── test ├── analysis.svg └── scope.svg ├── transistors ├── njfet.svg ├── nmosfet.svg ├── npn.svg ├── phototrans.svg ├── pjfet.svg ├── pmosfet.svg └── pnp.svg └── webtronix_server.html /README.md: -------------------------------------------------------------------------------- 1 | Webtronix is broken due to browser compatibility issues 2 | --- 3 | GOAL 4 | ------ 5 | 6 | The schematic is the language of electronics. Webtronix exists to simplify posting of schematics and improve discussion of electronic circuits.The output is SVG so it will open in most browsers. It uses Emscripten compiled Gnucap to do simulation. 7 | 8 | Webtronix is not meant to replace professional tools, it is meant to complement them. I feel that free tools are a necessity and open source and standardization have a great advantage. 9 | 10 | 1.To create schematics that can easily be shared for discussion and improvements. 11 | 12 | 2.To create Schematics that can simulate and verify circuits. 13 | 14 | 3.To use the web in ways that benefit the users. 15 | 16 | I have big ideas for web based engineering tools and I would love to be part of a related project. 17 | 18 | DEMO 19 | ------ 20 | 21 | 22 | [Try the Demo.](http://logical.github.io/webtronix/schematic.html) 23 | 24 | 25 | If you have problems running the demo or if you have suggestions, please send me an email or create an issue. 26 | 27 | This demo stores gnucap-ugly.js in browser cache to keep from re-downloading it.It is 3.8mb. 28 | 29 | 30 | LATEST 31 | ------ 32 | Mostly I am using webtronix myself because I only run linux and there are not a lot of choicese for simulating circuits. 33 | 34 | -------------------------------------------------------------------------------- /buttons/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/cancel.png -------------------------------------------------------------------------------- /buttons/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/delete.png -------------------------------------------------------------------------------- /buttons/disc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/disc.png -------------------------------------------------------------------------------- /buttons/grow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/grow.png -------------------------------------------------------------------------------- /buttons/icbut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/icbut.png -------------------------------------------------------------------------------- /buttons/netlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/netlist.png -------------------------------------------------------------------------------- /buttons/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/new.png -------------------------------------------------------------------------------- /buttons/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/normal.png -------------------------------------------------------------------------------- /buttons/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/ok.png -------------------------------------------------------------------------------- /buttons/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/open.png -------------------------------------------------------------------------------- /buttons/openmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/openmenu.png -------------------------------------------------------------------------------- /buttons/process-stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/process-stop.png -------------------------------------------------------------------------------- /buttons/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/redo.png -------------------------------------------------------------------------------- /buttons/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/rotate.png -------------------------------------------------------------------------------- /buttons/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/run.png -------------------------------------------------------------------------------- /buttons/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/save.png -------------------------------------------------------------------------------- /buttons/select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/select.png -------------------------------------------------------------------------------- /buttons/text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/text.png -------------------------------------------------------------------------------- /buttons/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/undo.png -------------------------------------------------------------------------------- /buttons/wire.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/wire.png -------------------------------------------------------------------------------- /buttons/zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/buttons/zoom.png -------------------------------------------------------------------------------- /canvas/buttons/grow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/canvas/buttons/grow.png -------------------------------------------------------------------------------- /canvas/buttons/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/canvas/buttons/normal.png -------------------------------------------------------------------------------- /canvas/canvas.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/logical/webtronix/cb2967c47290dfbc300f3973080c1b80a5718999/favicon.ico -------------------------------------------------------------------------------- /gnucapjs/Makeem++: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | set -e 4 | 5 | EMSCRIPTEN_PATH="PUT YOUR EMSCRIPTEN PATH HERE " 6 | OPTIMIZE="-O2 -s USE_TYPED_ARRAYS=2 -s DISABLE_EXCEPTION_CATCHING=0 " 7 | CCP="$EMSCRIPTEN_PATH/em++" 8 | CC="$EMSCRIPTEN_PATH/emcc" 9 | CFLAGS="$OPTIMIZE -DEMSCRIPTEN -DUNIX -DNDEBUG -Dlinux -DSPICE_3f -DPREDICTOR -DAN_pz -DAN_disto -DAN_noise -DHAS_STDLIB -fPIC -I./ -I../include -I../../include -I../Include " 10 | CCFLAGS="$CFLAGS -std=c++98" 11 | 12 | JFET(){ 13 | cd models-spice3f5/jfet 14 | 15 | $CCP $CCFLAGS -I../Include ../Gnucap/spice-wrapper.cc -c -o ../Gnucap/spice-wrapper.bc 16 | $CC $CFLAGS -I../Include ../Include/devsup.c -c -o ../Include/devsup.bc 17 | 18 | declare -a BCFILES=$(find -name *.bc) 19 | for BCFILE in ${BCFILES[@]};do 20 | rm $BCFILE 21 | done 22 | 23 | #models first 24 | declare -a SOURCES=(jfet jfetacld jfetask jfetdel jfetdest jfetdist jfetdset 25 | jfetic jfetload jfetmask jfetmdel jfetmpar 26 | jfetnoi jfetpar jfetpzld jfetset jfettemp jfettrun 27 | ) 28 | 29 | for CCFILE in ${SOURCES[@]}; do 30 | $CC $CFLAGS -Wno-implicit-function-declaration -I../Include -I../Gnucap -c $CCFILE.c -o O/$CCFILE.bc 31 | done 32 | cd O 33 | $CC $OPTIMIZE $(ls *.bc) ../../Gnucap/spice-wrapper.bc ../../Include/devsup.bc -o d_jfet.bc 34 | cd ../../.. 35 | } 36 | 37 | 38 | LIB(){ 39 | 40 | cd lib 41 | declare -a BCFILES=$(find -name *.bc) 42 | for BCFILE in ${BCFILES[@]};do 43 | rm $BCFILE 44 | done 45 | declare -a SOURCES=(m_expression_dump m_expression_in 46 | m_expression_reduce 47 | m_base_in m_base_math m_fft m_spline 48 | ap_construct ap_convert ap_error ap_get ap_match ap_skip 49 | l_ftos l_pmatch l_timer l_trim l_wmatch 50 | io io_contr io_error io_findf io_out io_xopen 51 | u_function u_lang u_nodemap u_opt1 u_opt2 52 | u_parameter u_prblst u_probe u_sim_data u_xprobe 53 | d_subckt d_logic d_logicmod 54 | e_base e_card e_node e_model e_compon 55 | e_elemnt e_ccsrc e_storag e_cardlist 56 | bm_cond bm_value bm 57 | c__cmd c_attach c_file 58 | findbr plot globals) 59 | for CCFILE in ${SOURCES[@]}; do 60 | $CCP $CCFLAGS $CCFILE.cc -c -o O/$CCFILE.bc 61 | done 62 | # link 63 | cd O 64 | 65 | $CCP $OPTIMIZE $(ls *.bc) -o libgnucap.bc 66 | cd ../.. 67 | } 68 | 69 | 70 | APPS(){ 71 | cd apps 72 | declare -a BCFILES=$(find -name *.bc) 73 | for BCFILE in ${BCFILES[@]};do 74 | rm $BCFILE 75 | done 76 | #models first 77 | declare -a SOURCES=(d_mos1 d_mos2 d_mos3 78 | d_mos4 d_mos5 d_mos6 d_mos7 d_mos8 79 | d_mos123 d_mos_base d_mos 80 | d_bjt d_diode ) 81 | 82 | for CCFILE in ${SOURCES[@]}; do 83 | $CCP -c $CCFLAGS O/$CCFILE.cc -o O/$CCFILE.bc 84 | done 85 | 86 | SOURCES=( 87 | d_admit d_cap d_cccs d_ccvs d_coil 88 | d_cs d_poly_g d_poly_cap d_res d_switch 89 | d_trln d_vcg d_vcr d_vcvs d_vs 90 | d_meter 91 | 92 | bm_complex bm_exp bm_fit bm_generator 93 | bm_model bm_poly bm_posy bm_pulse bm_pwl bm_sffm 94 | bm_sin bm_tanh bmm_table bmm_semi 95 | 96 | c_clear c_comand c_delete c_exp c_genrat 97 | c_list c_measure c_modify c_param c_prbcmd 98 | c_status c_sweep c_sim c_system 99 | 100 | s__init s__out s__solve 101 | s_ac s_dc s_fo 102 | s_tr s_tr_set s_tr_swp 103 | 104 | lang_spice lang_spectre lang_verilog 105 | 106 | func_core measure_eval 107 | measure_max measure_min measure_slewrate measure_cross 108 | measure_integral measure_average measure_rms measure_at signon 109 | ) 110 | for CCFILE in ${SOURCES[@]}; do 111 | $CCP $CCFLAGS $CCFILE.cc -c -o O/$CCFILE.bc 112 | done 113 | # link 114 | cd O 115 | 116 | $CCP $OPTIMIZE $(ls *.bc) -o libgnucap-default-plugins.bc 117 | 118 | cd ../.. 119 | } 120 | 121 | MAIN(){ 122 | #get the functions to export from the so file 123 | cd main 124 | 125 | declare -a BCFILES=$(find -name *.bc) 126 | for BCFILE in ${BCFILES[@]};do 127 | rm $BCFILE 128 | done 129 | declare -a SOURCES=(main) 130 | for CCFILE in ${SOURCES[@]}; do 131 | $CCP $CCFLAGS $CCFILE.cc -c -o O/$CCFILE.bc 132 | done 133 | # link 134 | cd O 135 | 136 | 137 | EMCC_DEBUG=1 $CC $OPTIMIZE ../../lib/O/libgnucap.bc ../../models-spice3f5/jfet/O/d_jfet.bc ../../apps/O/libgnucap-default-plugins.bc main.bc -o gnucap.html --embed-file temp 138 | 139 | cd ../.. 140 | 141 | } 142 | 143 | case "$1" in 144 | jfet) 145 | JFET 146 | ;; 147 | apps) 148 | APPS 149 | ;; 150 | lib) 151 | LIB 152 | ;; 153 | main) 154 | MAIN 155 | ;; 156 | *) 157 | JFET 158 | LIB 159 | APPS 160 | MAIN 161 | esac 162 | 163 | #command to minify 164 | #uglifyjs -v main/O/gnucap.js > main/O/gnucap-ugly.js 165 | 166 | -------------------------------------------------------------------------------- /gnucapjs/gnucap-io.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | // var statusElement = document.getElementById('gnucap_scope_display_div'); 4 | // var progressElement = document.getElementById('progress'); 5 | // var spinnerElement = document.getElementById('spinner'); 6 | var spice={}; 7 | 8 | Module = { 9 | 10 | preRun: [function(){ 11 | FS.writeFile("/spice.cir",spice.netlist); 12 | for(file in spice.includes){ 13 | FS.writeFile(file,spice.includes[file]); 14 | } 15 | }], 16 | postRun:[function(){ 17 | }], 18 | arguments:["-b","/spice.cir"], 19 | print:function(text) { 20 | text = Array.prototype.slice.call(arguments).join(' '); 21 | postMessage(text+'\n'); 22 | }, 23 | printErr: function(text) { 24 | text = Array.prototype.slice.call(arguments).join(' '); 25 | if (0) { // XXX disabled for safety typeof dump == 'function') { 26 | dump(text + '\n'); // fast, straight to the real console 27 | } else { 28 | console.log(text); 29 | } 30 | 31 | }, 32 | setStatus: function(text) { 33 | if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' }; 34 | if (text === Module.setStatus.text) return; 35 | var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/); 36 | var now = Date.now(); 37 | if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon 38 | if (m) { 39 | text = m[1]; 40 | } else { 41 | //code is finished 42 | if (!text){ 43 | postMessage("SIMULATION COMPLETED"); 44 | } 45 | } 46 | }, 47 | }; 48 | self.addEventListener("message", function(e) { 49 | spice=e.data; 50 | 51 | // the passed-in data is available via e.data.netlist 52 | importScripts("gnucap-ugly.js"); 53 | }, false); 54 | Module.TOTAL_MEMORY=67108864; 55 | Module.setStatus('Downloading...'); 56 | -------------------------------------------------------------------------------- /gnucapjs/gnucap.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |161 |
162 |185 | sources can be local or remote 186 | 187 | webtronix_server is the default server parts 188 | 189 | remote sources must start with http:// 190 | 191 | local source are absolute 192 | 193 | /local/source/webtronix_server 194 | 195 |196 |
221 | convergence: 222 | 223 | increase or decrease step size 224 | or try adding 225 | 226 | .options dampstrategy=2 227 | 228 |229 |
DOWNLOADING GNUCAP
251 |