-->
Page 1 of 1

Esp8266 basic Gasoline Injector Tester

PostPosted: Mon Apr 16, 2018 5:34 pm
by Zim
After checking the timing capabilities of the Esp8266 on a scope, I feel it is well accurate enough for a great Fuel injector driver/cleaner. Simply drive a large FET or SS DC relay off of io 4.
Enjoy!
Code: Select allmemclear
cls
io(pwo,4,0)
hrts = 0
mms = 0
dur = 0
wprint "<body bgcolor='black'>"
butt = "background-color:lightblue;text-align:center;width:120px;height:65px;font-size:14;font-weight:bold"
dropd = "background-color:white;text-align:center;width:60px;height:40px;font-size:20;font-weight:bold"
startb = "background-color:lightblue;text-align:center;width:50px;height:40px;font-size:14;font-weight:bold"
abortb = "background-color:red;text-align:center;width:300px;height:50px;font-size:20;font-weight:bold"
barb = "background-color:lightblue;width:300px;height:20px"
wprint "<table align='center' width='300' height='100' bgcolor='lightgreen' border='1' cellpadding='8'>"
wprint "<center><th>"
button "Automatic<br>Clean Cycle<br>200 seconds", [Clean]
cssid htmlid(), butt
wprint "</center></th>"
wprint "<center><th>"
button "Automatic<br>Flow Test<br>10 seconds", [Flow]
cssid htmlid(), butt
wprint "</center></th>"
wprint "</center>"
wprint "</table>"
wprint "<br>"

wprint "<table align='center' width='300' height='100' bgcolor='lightgreen' border='1' cellpadding='4'>"
wprint "<tr><th>Manual<br>Mode</th><th>Frequency<br>Hertz</th><th>Pulse<br>mSec</th><th>Timer<br>Seconds</th></tr><td>"
button Start, [man]
cssid htmlid(), startb
wprint "</td><td>"
dropdown hrts, "10, ,15, ,20"
cssid htmlid(), dropd
wprint "</td><td>"
dropdown mms, "5, ,10, ,20, ,30"
cssid htmlid(), dropd
wprint "</td><td>"
dropdown durt, "5, ,10, ,60, ,On Continously"
cssid htmlid(), dropd
wprint "</center>"
wprint "</td> </table>"
wprint "<br>"
wprint "<center>"
meter bar, 0, 100
cssid htmlid(), barb
wprint "<br><br>"
button Abort, [abort]
cssid htmlid(), abortb
wprint "</center>"
[abort]
gosub [clear]
wait
[Flow]
gosub [clear]
Pwmfreq 10
For i = 1 to 10
Ct1 = i*10
bar = Ct1
io(pwo,4,100)
delay 1000
next i
gosub [clear]
wait
[man]
Pwmfreq hrts
if durt = "5" then dur = 5
if durt = "10" then dur = 10
if durt = "60" then dur = 60
if durt = "On Continously" then let dur = 10000
if durt = "On Continously" then let Ct1 = 0
if dur = 0 then goto [exit]
if mms = 0 then goto [exit]
if mms = 5 then let mmsi = 50
if mms = 10 then let mmsi = 100
if mms = 20 then let mmsi = 200   
if mms = 30 then let mmsi = 300   
if hrts = 15 and mms = 1 then let mmsi = 15
if hrts = 15 and mms = 5 then let mmsi = 75
if hrts = 15 and mms = 10 then let mmsi = 150
if hrts = 15 and mms = 20 then let mmsi = 300
if hrts = 15 and mms = 30 then let mmsi = 450
if hrts = 20 and mms = 1 then let mmsi = 20
if hrts = 20 and mms = 5 then let mmsi = 100
if hrts = 20 and mms = 10 then let mmsi = 200
if hrts = 20 and mms = 20 then let mmsi = 400
if hrts = 20 and mms = 30 then let mmsi = 600
For i = 1 to dur
if dur = 5 then let Ct1 = i*20
if dur = 10 then let Ct1 = i*10
if dur = 60 then let Ct1 = i*1.6
io(pwo,4,mmsi)
bar = Ct1
delay 1000
next i
io(pwo,4,0)
gosub [clear]
wait
[Clean]
gosub [clear]
max = 51
For i = 1 to 50
Ct1 = i*2
bar = Ct1
Pwmfreq 10
io(pwo,4,50)
delay 500
io(pwo,4,100)
delay 500
io(pwo,4,150)
delay 500
io(pwo,4,200)
delay 500
io(pwo,4,250)
delay 500
io(pwo,4,300)
delay 500
io(pwo,4,350)
delay 500
io(pwo,4,400)
delay 500
next i
gosub [clear]
wait
[clear]
bar = 0
io(pwo,4,0)
return
[exit]
gosub [clear]
wait