Welcome! Log In Create A New Profile

Advanced

ESP8266 Duet web interface for any board

Posted by toxuin 
Re: ESP8266 Duet web interface for any board
December 06, 2015 06:38AM
Hi guys, so with Repetier we'll be able to use this with Mega/Ramps?


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 06, 2015 06:48PM
Yes, just use the latest development version and select "Enable JSON formatted info out for ESP8266..." In the configurator.


Re: ESP8266 Duet web interface for any board
December 08, 2015 09:27AM
Quote
toxuin
Quote
realthor
Hi guys, so with Repetier we'll be able to use this with Mega/Ramps?
Yes, just use the latest development version and select "Enable JSON formatted info out for ESP8266..." In the configurator.


I have the stuff to make this happen. I will give it a shot.
Re: ESP8266 Duet web interface for any board
December 11, 2015 07:44PM
Since I am such a lousy dev I've put a bug in Repetier Firmware with my addition of JSON-style responses. That's what gives you guys all those weird errors in Web UI.
I've submitted a patch, let's see how it goes.

New stuff:
- I've added password authentication, but I have to test it first. You'll get mad if it will kick you out of your Web UI for no reason.
- Fixed some nasty bugs. That's what I do: I recklessly put bugs in code and then later I wake up in cold sweat and run to fix them. That's who I am.

Remote update thing works out not as good as expected: it requires some experimental APIs from ESP8266 Arduino IDE that aren't yet part of "stable" or even "staging", so I have to figure out a way how to make this happen or scrap the idea for better times. Also, full module software update consist of two files instead of just one: an application and a SPIFFS data. I have to come up with some kind of manifest format to allow such unattended updates reliably. Still thinking.

In the meanwhile, you can join me on Gitter to chat about ESPrinter or just to ask silly questions and fool around. Click here to join. Being the only person there feels kinda lonely.

Edited 1 time(s). Last edit at 12/11/2015 07:49PM by toxuin.
Re: ESP8266 Duet web interface for any board
December 13, 2015 08:14AM
The upcoming ESP32 is looking very interesting. Dual core - I could imagine (or at least dream) of dedicating one core to step generation leaving the other core for all the low precision house-keeping chores. Potentially it looks like an almost ideal printer cpu.
Re: ESP8266 Duet web interface for any board
December 13, 2015 11:50AM
Quote
JamesK
The upcoming ESP32 is looking very interesting. Dual core - I could imagine (or at least dream) of dedicating one core to step generation leaving the other core for all the low precision house-keeping chores. Potentially it looks like an almost ideal printer cpu.

Are you thinking at the ESP32 as more than a Wifi gateway to the borad? Maybe offloading some functions currently employed by the board so you free some pins there that would better be used elsewhere?

I am not too familiar with ESP32 nor can I do electronic diagrams reading and the such but I am interested what can this chip be used for in the 3D printing realm and how far are we from that? Right now is there any such mini-boards based on the cheap that are being tested by coneseurs? Maybe @madmike8 can report any progress with his attempts?


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 13, 2015 01:45PM
Apparently there are a very limited number of ESP32 boards with beta testers, but for the rest of us it's still vapor ware. What we do know is that there is basically more of everything - io pins, ram and of course the two cpus. That should make it easily more capable than a Due, with wi-fi built in, so yes, I could see this being a complete solution for printer control. If they package it in the same sort of easy to use form that they have used before I would imagine someone like DC42 could build a very capable duet- like interface board around it. But who knows, until it is widely available there could turn out to be some reason why it's not suitable. I'm prone to getting over-excited about new toys. For now I'm having lots of fun trying out my new ESP8266 and learning what it can do.
Re: ESP8266 Duet web interface for any board
December 13, 2015 02:44PM
I've read it doesn't have enough IO to be a true 3d pri.nter capable board. That's why it might remain an additional board. But just to provide wifi could be enough.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 13, 2015 03:57PM
The ESP32 appears to me to have sufficient I/O, including support for dual extrusion and a PanelDue. It does have a couple of limitations. There is no USB port; and although I don't use USB to control my printers in normal use because the web interface is so much easier to use, USB is useful for debugging and for uploading the initial firmware, or for uploading firmware when other firmware update mechanisms (e.g. OTA update) are not working. I guess most users could manage without USB, and developers like me could use an FTDI adapter connected to the serial port. Also, it doesn't have a high-speed SD card interface, so SPI access to the card would have to be used. This would limit the file upload speed, but perhaps not too severely.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: ESP8266 Duet web interface for any board
December 13, 2015 04:39PM
Quote
dc42
The ESP32 appears to me to have sufficient I/O, including support for dual extrusion and a PanelDue. It does have a couple of limitations. There is no USB port; and although I don't use USB to control my printers in normal use because the web interface is so much easier to use, USB is useful for debugging and for uploading the initial firmware, or for uploading firmware when other firmware update mechanisms (e.g. OTA update) are not working. I guess most users could manage without USB, and developers like me could use an FTDI adapter connected to the serial port. Also, it doesn't have a high-speed SD card interface, so SPI access to the card would have to be used. This would limit the file upload speed, but perhaps not too severely.

So this would actually be just like an Arduino. Would it need a special shield designed for it? How/what form should we expect the industry to adopt it, if at all? Are there any other "candidates" to offer a better job? I've lately seen some $9 computer, some <$20 64 bit Pine SOC computer, the pi Zero, then the subject of our discussion. It's a low cost madness out there and we should somehow be profiting out of it, not necessarily in money but in improving our printers.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 13, 2015 05:08PM
Quote
realthor
Quote
dc42
The ESP32 appears to me to have sufficient I/O, including support for dual extrusion and a PanelDue. It does have a couple of limitations. There is no USB port; and although I don't use USB to control my printers in normal use because the web interface is so much easier to use, USB is useful for debugging and for uploading the initial firmware, or for uploading firmware when other firmware update mechanisms (e.g. OTA update) are not working. I guess most users could manage without USB, and developers like me could use an FTDI adapter connected to the serial port. Also, it doesn't have a high-speed SD card interface, so SPI access to the card would have to be used. This would limit the file upload speed, but perhaps not too severely.

So this would actually be just like an Arduino. Would it need a special shield designed for it? How/what form should we expect the industry to adopt it, if at all? Are there any other "candidates" to offer a better job? I've lately seen some $9 computer, some <$20 64 bit Pine SOC computer, the pi Zero, then the subject of our discussion. It's a low cost madness out there and we should somehow be profiting out of it, not necessarily in money but in improving our printers.

I have been saying for over a year that it would be possible to manufacture a modern 32-bit 3D printer controller board that is substantially better than Arduino + RAMPS but costs less to make. Arduino/RAMPS has a relatively high BOM cost compared to such a board because it uses an expensive end-of-life 8-bit processor, has 2 separate PCBs, a pile of connectors that are not needed in a single-board solution, a separate USB/serial converter chip, and some ancillary components on the Arduino that are not needed for this application. I got most of the way towards laying out the PCB for such a board. But then the Duet and the MKS SBASE became available for about the same price as I would be selling the board (bearing in mind that I can't afford to manufacture thousands to get the price down), so there seemed little point in proceeding. I am not retired yet so I can't afford to spend time on such projects just for the good of the community.

Edited 2 time(s). Last edit at 12/13/2015 05:10PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: ESP8266 Duet web interface for any board
December 13, 2015 05:50PM
Quote
dc42
Quote
realthor
Quote
dc42
The ESP32 appears to me to have sufficient I/O, including support for dual extrusion and a PanelDue. It does have a couple of limitations. There is no USB port; and although I don't use USB to control my printers in normal use because the web interface is so much easier to use, USB is useful for debugging and for uploading the initial firmware, or for uploading firmware when other firmware update mechanisms (e.g. OTA update) are not working. I guess most users could manage without USB, and developers like me could use an FTDI adapter connected to the serial port. Also, it doesn't have a high-speed SD card interface, so SPI access to the card would have to be used. This would limit the file upload speed, but perhaps not too severely.

So this would actually be just like an Arduino. Would it need a special shield designed for it? How/what form should we expect the industry to adopt it, if at all? Are there any other "candidates" to offer a better job? I've lately seen some $9 computer, some <$20 64 bit Pine SOC computer, the pi Zero, then the subject of our discussion. It's a low cost madness out there and we should somehow be profiting out of it, not necessarily in money but in improving our printers.

I have been saying for over a year that it would be possible to manufacture a modern 32-bit 3D printer controller board that is substantially better than Arduino + RAMPS but costs less to make. Arduino/RAMPS has a relatively high BOM cost compared to such a board because it uses an expensive end-of-life 8-bit processor, has 2 separate PCBs, a pile of connectors that are not needed in a single-board solution, a separate USB/serial converter chip, and some ancillary components on the Arduino that are not needed for this application. I got most of the way towards laying out the PCB for such a board. But then the Duet and the MKS SBASE became available for about the same price as I would be selling the board (bearing in mind that I can't afford to manufacture thousands to get the price down), so there seemed little point in proceeding. I am not retired yet so I can't afford to spend time on such projects just for the good of the community.

So much brainpower and talent is lost with all this for-profit economy... where we have to work for a living, instead of having to work for the evolution. I guess Star-Treck-type societies are a very romantic but unrealistic utopias. Still, imagine the waste.... sad smiley


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 13, 2015 06:28PM
Quote
realthor
Still, imagine the waste...
I do, frequently. It's an absolute tragedy that our societies waste so much talent and creativity on humdrum jobs. It's self-evident that our current systems of employment are not sustainable in the long term and we will have to transition to new ways for people to spend their time. Unfortunately I see no hope of that happening in the near term, nor any idea of how it would work in practice.
Re: ESP8266 Duet web interface for any board
December 13, 2015 06:54PM
Quote
JamesK
Quote
realthor
Still, imagine the waste...
I do, frequently. It's an absolute tragedy that our societies waste so much talent and creativity on humdrum jobs. It's self-evident that our current systems of employment are not sustainable in the long term and we will have to transition to new ways for people to spend their time. Unfortunately I see no hope of that happening in the near term, nor any idea of how it would work in practice.

It kinda works but we're at 10% of our societal potential because of that hindering of innovation. I am often contemplating time banking and Venus project as two complementary solutions to achieve that goal. But these will most probably not happen in a timeframe that would be feasible for us and our struggle. So, for the time being it's either making big sacrifices by the ones blessed with enough brainpower and education for the other ones, less fortunate by both nature and parents or the right place on earth to be born in. And all this technological revolution started by Opensource, both in software and in hardware, adopted by the RepRap community is a right step towards the above-mentioned goals. Sometimes it is needed some more.

Closer to earth, if smart guys like DC would opensource/make available anything that he has already done and ended as an effort because of the said Duet/SBASE, it will spurr a chain reaction, motivating and inspiring others that have ideas and some time, who will ideally post their contribution as the opensource licences require and so, little by little, some result will be achieved. I am so angry on myself that I didn't learn these things in university. I wish I was visionary enough to pick up fields like computer programming and/or electrical engineering.

Well ... if we come back to earth completely I guess we'll have to follow whatever development it is done on ESP8266.

Edited 1 time(s). Last edit at 12/13/2015 06:55PM by realthor.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 14, 2015 04:09AM
I often think of standalone car navigation screens as startingpoint for a new controller.
They come with touchscreen, USB, microSD, stereo speakers and a powerful cpu to do almost anything. I'm not sure about RT capabilities, but their GPS signal is a very accurate time base.

Lets hack some Tom-Toms grinning smiley
-Olaf
Re: ESP8266 Duet web interface for any board
December 23, 2015 04:58AM
I don't know if you guys are aware of this so I thought i'd post it here:

http://3dprint.com/112025/printrbot-marlin-firmware/

Among other things, Printrbot wants to “get an esp8266 to connect to wifi”. Even this will be written for Marlin, I am guessing knowledgeable guys will be quickly able to read the code and use it.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
December 24, 2015 12:04AM
Is there any reason the nodemcu This board couldn't be used for this? I have been able to load the esprinter on it via arduino IDE, set up my wifi AP and can see the printer communication through the serial. I've even sent controll commands, but what is eluding me is the actually web interface, All i see are 404's. Printer firmware is latest repetier with bluetooth serial enabled to serial 1, the json respones enabled and boards are connected via d0 and d1. Arduino ide only has 2 files in it when i do the update Esprinter and PooledStrings is this correct?
Re: ESP8266 Duet web interface for any board
December 24, 2015 01:56AM
NodeMCU should be fine. Just know your flash size and select it in Arduino IDE.
Your problem (404's) totally sounds like you've skipped the SPIFFS upload part. It is documented on github readme. Just install the SPIFFS tool to your IDE and click "Upload Sketch Data".
Re: ESP8266 Duet web interface for any board
December 24, 2015 07:24PM
Yep your right I missed the whole spiffs tools portion, I knew it was something silly. So now I see the interface but I am getting ajax disconnect errors, Unexpected end of input. Could this be from using the version from repetier and not your pull? If i monitor the serial port on the node I see a bunch of wait's is all
Re: ESP8266 Duet web interface for any board
December 29, 2015 05:08AM
Well this sounds like a TX lead disconnection. Check if all leads are connected. When you get ajax wait error this means no reply from 3d printer was received.
Yes, do not use my fork, use the latest repetier (work092 branch). My fork was accepted in repetier mainline some time ago.

Edited 1 time(s). Last edit at 12/29/2015 11:33PM by toxuin.
Re: ESP8266 Duet web interface for any board
January 02, 2016 04:30PM
Hi,

What pins are used on RAMPS to connect to the ESP8266? The info on git shows tx1/rx1 for RADDS but I'm not sure what the equivalent would be on RAMPS.
Re: ESP8266 Duet web interface for any board
January 15, 2016 09:32AM
Well, my esp8266 arrived, and I've loaded up the firmware - it looks great! Now to convert the printer over to repetier and work out how to link up the esp. Can't wait, except I'll have to as I've promised to make a camera mount for my wife, and I've learnt not to break wifely promises.
Re: ESP8266 Duet web interface for any board
January 15, 2016 07:44PM
Quote
JamesK
Well, my esp8266 arrived, and I've loaded up the firmware - it looks great! Now to convert the printer over to repetier and work out how to link up the esp.

It would be so nice to have a video explaining everything. I personally have a hard time wrapping my head around it.

Keep up the good work.


RepRap Lander concept on Concept Forge
RepRap Lander concept on RepRap Forums
My Things, mostly experimental stuff
Re: ESP8266 Duet web interface for any board
January 23, 2016 10:06PM
OK, so this turned out to be much more difficult than I expected. Like djinn5150 I was also getting endless AJAX errors when connecting to the printer. I eventually tracked this down to a premature end of line in the response being generated by the M408 code in repetier
line 2318 where it prints the ']' character. I just replaced it with an ordinary
Com::print(']');


Now it connects ok, but very little of the web interface seems to be functional. I can home and move the axis, but no position information shows up, and it continually says the axes are not homed. I can turn on the bed heater but not the hot end, and no temperature readings are displayed (nor the fact that the heaters are turned on). I'm guessing that only the bare bones of the M408 is actually in place yet, and it's up to us to finish up the rest of it. I haven't tried printing with the web interface connected yet, be interesting to see what shows up then.

Annoyingly, the telnet connection seems to crash the esp every time I connect, so I can't use that as an easy debug channel.

Edited 1 time(s). Last edit at 01/23/2016 10:08PM by JamesK.
Re: ESP8266 Duet web interface for any board
January 23, 2016 10:21PM
Just tried a print. There's no auto-refresh, but if you manually refresh the page it shows the current X, Y & Z coordinates, which is better than nothing. Still no temperature info.
Re: ESP8266 Duet web interface for any board
January 24, 2016 05:55AM
Quote
JamesK
OK, so this turned out to be much more difficult than I expected. Like djinn5150 I was also getting endless AJAX errors when connecting to the printer. I eventually tracked this down to a premature end of line in the response being generated by the M408 code in repetier
line 2318 where it prints the ']' character. I just replaced it with an ordinary
Com::print(']');


Now it connects ok, but very little of the web interface seems to be functional. I can home and move the axis, but no position information shows up, and it continually says the axes are not homed. I can turn on the bed heater but not the hot end, and no temperature readings are displayed (nor the fact that the heaters are turned on). I'm guessing that only the bare bones of the M408 is actually in place yet, and it's up to us to finish up the rest of it. I haven't tried printing with the web interface connected yet, be interesting to see what shows up then.

Annoyingly, the telnet connection seems to crash the esp every time I connect, so I can't use that as an easy debug channel.

I 'm getting the same behavior with RepRapFirmware on RADDS so I 'm thinking that maybe Repetier isn't the culprit here...
Re: ESP8266 Duet web interface for any board
January 24, 2016 07:44AM
OK, that's interesting to know. I guess you're talking about the lack of functionality after connecting, because the ajax errors at connect time were a pretty black and white problem in the repetier code.
Re: ESP8266 Duet web interface for any board
January 24, 2016 08:20AM
Ajax errors included.
Until it pops up an ajax error, I can move the machine (always showing as not homed though). But that doesn't last long and an ajax error pops up...
And I have also tried the dwc107 branch too, no change...

In other words, I 'm experiencing the same symptoms as you have described.
Re: ESP8266 Duet web interface for any board
January 24, 2016 08:27AM
Must be a different ajax error; if you could move the machine then you'd already got past the connection error I fixed. Still, your point stands that a lot of these problems must be on the esp/web side. Sadly I have 0 web development experience. It took me ages to find out how to even see the responses being returned to the browser.
Re: ESP8266 Duet web interface for any board
January 25, 2016 01:02PM
That's great that I am not the only user of Esprinter anymore! Too bad it is so broken. I will do my best to fix it on my spare time, but if someone are willing to fix my god awfull repetier patch and/or add functionality to it – would be dandy, please do us all a favour.
Maybe it is not a best idea of me writing patches to Repetier. Compatibility mode is already in Esprinter code so implementing Repetier support should be pretty straightforward for someone who can produce a decent code for such a project as Repetier-Firmware.
I'll take a look at errors and flaws you're describing and push an update.
Sorry, only registered users may post in this forum.

Click here to login