ESP8266 - wifi->serial bridge $5

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

Post Reply
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

ok ok you need to buy a case for it, but still...

so, as Ive been rebuilding my engine I have been messing around with my MS3x and jimstim... I came across firmware for this little wifi soc that takes a TTL serial connection and turns it into an IP addressable device

meaning

for $2.07 for the ESP8266-ESP01
http://www.ebay.com/itm/1PCS-ESP8266-ES ... Swk5FUt8Sq

and $3 for a max232 serial -> ttl converter
http://www.ebay.com/itm/MAX3232-RS232-S ... SwPe1UF~aE

you have a working serial -> wifi bridge that creates its own ad-hoc network *and* will join your existing one, giving you IP access to your megasquirt.

this will probably be the first post in a series where I work through making a cheap dongle or something for everyone

info on the firmware for the ESP8266 - esplink

https://github.com/jeelabs/esp-link

and a bunch of pics

ESP8266 module; PWR - 3.3V, CH_PD - 3.3V, GRND - GRND, TX -RX, RX- TX
Image

DB9 RS232 - TTL converter; VCC - 3.3V, TX-RX, RX-TX, GRND - GRND
Image

power consumption - it may be possible to run it off the MS RS232 port itself, if not all it needs is a 3.3v coin cell
Image

TunerStudio showing success
Image

displaying the ESP8266's built in console page
Image

pictures of TunerStudio before and after changing RPM and O2 over wifi (and on a MS surface)

Image
Image

the eventual goal will be to make a board thats cheap and easy to assemble :yeah!:
racingmini_mtl
Super MS/Extra'er
Posts: 9129
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by racingmini_mtl »

Interesting. What runtime data rate (frames per seconds) can you get with that? In case you're not aware, you can get this information from one of the standard TunerStudio gauges and by setting the data rate in the communications menu to the max reads per second.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

Re: ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

well I set the data rate to max reads per second, but I dont see an overall indicator? the tach seems to be significantly more sensitive now...
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

Re: ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

nevermind, figured that out...

Image
racingmini_mtl
Super MS/Extra'er
Posts: 9129
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by racingmini_mtl »

That's a good start but TunerStudio optimizes the data transfer to only what is displayed on the dash and there's not much on the default basic dash. For a really worse case scenario, open the realtime display under the basic settings menu and select the All OutputChannels tab. Since this displays all the available data, TunerStudio has to read it all from the MS3.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

Re: ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

so this? I mean, if this is the be all end all test it should probably not be running on a tablet, but still seems fine, even though the java app sucks every bit of resource :lol:

Image
Image
racingmini_mtl
Super MS/Extra'er
Posts: 9129
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by racingmini_mtl »

It does seem quite good. As a point of reference, on my PC with a USB-serial connection I can get about 19.6 frames/s with the realtime display open. So it's a bit slower but nothing major and some of it might be due to the lower processing power of your tablet.

So I would say that this a very viable option especially for wireless. It's definitely a lot better than what I've seen from Bluetooth.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

Re: ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

:yeah!:

thats great to know what a USB cable should run while monitoring everything.

also, bear in mind that its all hooked up with breadboard jumpers, I am going to get it mounted to some protoboard and then run some more tests

the esp-link firmware offers 3 modes of operation which may affect throughput

mode 1 - it joins an existing WLAN and acts as another device on the network
mode 2 - it creates its own WLAN and acts as a DHCP server
mode 3 - it joins an existing WLAN and also creates its second WLAN and acts as a DHCP server

I was doing all of my first tests last night in mode 3 so Im wondering if there is some speed to be picked up in non-relay mode

I also plan on hooking a meter/scope up to the USB connection on the MS and see if it has the USB power pins enabled - Im envisioning a board that plugs into the USB connector to get power (leaves data lines untouched) and then connects to the RS232 port so you dont have to run it off a coincell or run a power line to it. I know RS232 ports can be tapped for power but everything Ive seen/read shows the max output from doing that is about ~90ma which probably wont be enough
jsmcortina
Site Admin
Posts: 39611
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by jsmcortina »

Megasquirt USB and RS232 share the same 5V supply.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
racingmini_mtl
Super MS/Extra'er
Posts: 9129
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by racingmini_mtl »

One thing that could be problematic is the harsh automotive environment. Having a good throughput on the bench is one thing but with all the EMI you have in a car, the effective throughput might plummet. I have no idea sensitive wifi and those boards are to the type of EMI you have in a car so that is probably something that will need to be tested.

But at least you have a good baseline.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
911Ducktail
MS/Extra Newbie
Posts: 15
Joined: Sun Feb 21, 2016 8:58 am

Re: ESP8266 - wifi->serial bridge $5

Post by 911Ducktail »

jsmcortina wrote:Megasquirt USB and RS232 share the same 5V supply.

James
Hi James

the schemetic I found here http://www.megamanual.com/357/

shows +5V on pins 1 & 9, is that correct?
racingmini_mtl wrote:One thing that could be problematic is the harsh automotive environment. Having a good throughput on the bench is one thing but with all the EMI you have in a car, the effective throughput might plummet. I have no idea sensitive wifi and those boards are to the type of EMI you have in a car so that is probably something that will need to be tested.

But at least you have a good baseline.

Jean
yeah, this is just bench racing right now. there are many different flavors of the ESP8266 - some have more than the 2 exposed GPIO pins like the ESP-01 module I am currently working with. Others like this one The ESP-07 already have shielding on the board and an external antenna hook up, along with ~9 GPIO pins broken out - that brings the price up to like $5/each. obviously I would be looking at making my own little board, and releasing it here along with STL files for printing an enclosure

i assume most people here would be able to make their own, but if it got to the point where it took off Im sure it could be assembled for a couple extra bucks

Image

http://www.esp8266.com/wiki/doku.php?id ... ily#esp-07
old guy
Experienced MS/Extra'er
Posts: 362
Joined: Thu Jan 24, 2008 9:20 am
Location: North Carolina

Re: ESP8266 - wifi->serial bridge $5

Post by old guy »

If you come up with a board design you could offer them on Tindie or Osh Park.
dll67
Experienced MS/Extra'er
Posts: 315
Joined: Fri Aug 23, 2013 11:37 pm

Re: ESP8266 - wifi->serial bridge $5

Post by dll67 »

Have you tried this in a car yet .. Was emi a problem?
MS3PU/IOx/CAN-EGT/DBWx2 540ci BBC 325cc int runners (2)innovate LC2 wbo2's, Hilborn ITB injector cnvrtd to EFI, 55LB Inj, d585 coil near plg, 60-2 trg whl & cam ph snsr, Muncie 4spd w/10T VSS, Tilton 7.25" cerametalic cltch 8.5LB flywhl
WestfieldMX5
Master MS/Extra'er
Posts: 403
Joined: Tue Dec 30, 2008 9:46 am
Location: Belgium
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by WestfieldMX5 »

Programmed a module to do the same but can't connect. Loaded the esp-link firmware just fine and I can access the webserver.
However, TS doesn't 'see' it. Did you have to change anything in the esp-link settings? Does AP or AP+ST mode make a difference? Tried both of them but no luck :(

Edit
Ouch, no visit by 911Ducktail since sep 19th. Guess I'll have to tinker so more with it :s
2016 Westfield SEiW MX5 1.8 - 6sp - Torsen - MSM turbo - MS3 Pro - 2.3kg/hp
Suprazz
Master MS/Extra'er
Posts: 499
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by Suprazz »

Hey I just wanted to share my solution. Not cheap like your's but it work very well too. It's based on the HLK modules

I might consider doing a newer version of my wifi module with the esp8266 or esp32s


http://perfecttuning.net/qc/accessoires ... results=11
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
WestfieldMX5
Master MS/Extra'er
Posts: 403
Joined: Tue Dec 30, 2008 9:46 am
Location: Belgium
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by WestfieldMX5 »

Managed to get the ESP8266 working. Works flawlessly now. Just load Esp-link and connect with Tunerstudio. This is so cool. Range is a lot better then with Bluetooth.


Verzonden vanaf mijn iPhone met Tapatalk
2016 Westfield SEiW MX5 1.8 - 6sp - Torsen - MSM turbo - MS3 Pro - 2.3kg/hp
Valeriy
Helpful MS/Extra'er
Posts: 78
Joined: Sat Oct 21, 2017 11:54 am
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by Valeriy »

WestfieldMX5 wrote:Managed to get the ESP8266 working. Works flawlessly now. Just load Esp-link and connect with Tunerstudio. This is so cool. Range is a lot better then with Bluetooth.


Verzonden vanaf mijn iPhone met Tapatalk
Hello! I have this module how to connect it to MS3PRO? Is there an instruction or connection diagram?
piledriver
Super MS/Extra'er
Posts: 1681
Joined: Tue Oct 27, 2009 6:24 am
Location: Van Alstyne, Texas

Re: ESP8266 - wifi->serial bridge $5

Post by piledriver »

Valeriy, if you aren't into building one just buy the unit from perfecttuning.net listed above.


I also want to get this working with $5 of off the shelf parts.

Ordered myself an ESP-01 on a usb serial<>ttl converter for a few bucks, works fine.
This allows flashing the ESP-LINK firmware on the esp01 and initial setup, basically.
$3 but I waited a month for shipping from China.

Picked up a cheap max3232 rs232 to ttl serial converter board that also works fine.
(the max 3232 works on 3-7v)

The only problem is there is no 3.3v regulator on either, and the esp01 needs ~3.3v to live.
Note 911ducktail was using a coin cell battery holder to provide 3,3v.
(the usb converter part seems to have a 3.3v regulator built in, but the convertere is not usable on the ms)

One old school method of dropping a voltage is simply running it through a few diodes, most will provide a .7v drop, so a pair in series will give you 3.6v from 5v which is in the sane range for operation., a pair of 1n914 diodes should work.
This should allow running off MS5v on pin 9 of the db9 if you choose.

An led will work as well if the current needed is in the safe range of the led.
Always doing things the hard way, MS2 sequential w/ v1.01 mainboard, LS2 coils. 80 mile/day commuter status.
Suprazz
Master MS/Extra'er
Posts: 499
Joined: Mon Jan 22, 2007 7:58 pm
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by Suprazz »

There is a new version plug and play with the ms3pro evo and ultimate. It's not listed yet but should appear soon!
Best looking and most advanced CAN-bus gauge
Toyota Supra 7MGE, 7M-GTE and 1JZ-GTE Plug and play ECUs: http://www.perfecttuning.net
Serial to Bluetooth or Serial to WiFi
DIYAutotune Canadian, EFI Source and ECUMaster reseller!
Valeriy
Helpful MS/Extra'er
Posts: 78
Joined: Sat Oct 21, 2017 11:54 am
Contact:

Re: ESP8266 - wifi->serial bridge $5

Post by Valeriy »

piledriver wrote:Valeriy, if you aren't into building one just buy the unit from perfecttuning.net listed above.


I also want to get this working with $5 of off the shelf parts.

Ordered myself an ESP-01 on a usb serial<>ttl converter for a few bucks, works fine.
This allows flashing the ESP-LINK firmware on the esp01 and initial setup, basically.
$3 but I waited a month for shipping from China.

Picked up a cheap max3232 rs232 to ttl serial converter board that also works fine.
(the max 3232 works on 3-7v)

The only problem is there is no 3.3v regulator on either, and the esp01 needs ~3.3v to live.
Note 911ducktail was using a coin cell battery holder to provide 3,3v.
(the usb converter part seems to have a 3.3v regulator built in, but the convertere is not usable on the ms)

One old school method of dropping a voltage is simply running it through a few diodes, most will provide a .7v drop, so a pair in series will give you 3.6v from 5v which is in the sane range for operation., a pair of 1n914 diodes should work.
This should allow running off MS5v on pin 9 of the db9 if you choose.

An led will work as well if the current needed is in the safe range of the led.
Finally :yeah!: I found the time and did what I wanted! I managed to make this module ESP-01 work tablet windows 10 home . https://www.youtube.com/watch?v=B0oJSeZbpnk
Post Reply