Re: Controlling a RepRap with ESP8266 and no Arduino November 18, 2016 05:46AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 19, 2016 06:24AM |
Registered: 8 years ago Posts: 91 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 19, 2016 03:10PM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 21, 2016 04:50AM |
Registered: 8 years ago Posts: 181 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 21, 2016 10:36AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 21, 2016 12:45PM |
Registered: 8 years ago Posts: 91 |
// Create a down-counting triangle wave. if (--counter == 0) counter = period; // If the PWM should be active then set the bit in the I2S output data. if (duty >= counter) out |= PWM_BIT;
Re: Controlling a RepRap with ESP8266 and no Arduino November 21, 2016 01:02PM |
Registered: 8 years ago Posts: 91 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 22, 2016 04:16PM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 22, 2016 05:54PM |
Registered: 10 years ago Posts: 14,684 |
Quote
Hubberthus
Did you know that the only firmware supporting JSON-style printout is RepetierFirmware? And that is not even a fixed standard, according to the Wiki.
Re: Controlling a RepRap with ESP8266 and no Arduino November 22, 2016 07:15PM |
Registered: 8 years ago Posts: 91 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 23, 2016 03:58AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 24, 2016 06:08AM |
Registered: 8 years ago Posts: 91 |
Quote
Hubberthus
It's no use in starting to create an ESP firmware for ESP8266 when we have now the ESP32.
This "fun with ESP8266" is pretty good to reveal what problems I can run into with an actual ESP32-exclusive firmware, and what to use.
Re: Controlling a RepRap with ESP8266 and no Arduino November 24, 2016 06:44AM |
Registered: 8 years ago Posts: 181 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 24, 2016 07:58AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 06:46AM |
Registered: 9 years ago Posts: 1,873 |
Quote
Paliap
The program then runs round the polygons from quad to quad linking the ends up.
When you now have a set of polygons for RepRap to outline and to fill in. But a list of line segments is a very non-robust representation of a polygon for operations like zig-zag infill, and also it's hard to offset. You need to offset the polygons to make smaller ones inside because the stream of polymer is not zero thickness, so - for example - you need to run the write head slightly inside the polygon you're going to create to outline it. Then the zig-zag infill needs to be a zig-zag in a smaller polygon inside the first offset polygon too.
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 06:53AM |
Registered: 10 years ago Posts: 14,684 |
Quote
JamesK
Quote
Paliap
The program then runs round the polygons from quad to quad linking the ends up.
When you now have a set of polygons for RepRap to outline and to fill in. But a list of line segments is a very non-robust representation of a polygon for operations like zig-zag infill, and also it's hard to offset. You need to offset the polygons to make smaller ones inside because the stream of polymer is not zero thickness, so - for example - you need to run the write head slightly inside the polygon you're going to create to outline it. Then the zig-zag infill needs to be a zig-zag in a smaller polygon inside the first offset polygon too.
How did we get on to writing a new slicer? Sounds like fun, just not sure how we got here.
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 06:59AM |
Registered: 9 years ago Posts: 1,873 |
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 09:06AM |
Registered: 8 years ago Posts: 91 |
Quote
Hubberthus
@lhartmann - Weeell... It surely can work, I won't say it can't. But I'll rather stick to ESP32 when it comes to creating a firmware for the "family".
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 11:59AM |
Registered: 8 years ago Posts: 23 |
Quote
lhartmann
ESP32 is out already, both as ESP12-like and NodeMCU-like. For that price, though, we would be better off with an Orange Pi Lite. The advantages of the *Pi would be proper fast SD, filesystem, webserver, and we would be able to run octoprint. All we would need to code is a gcode-capable, I2S, motion-control backend. Apart from timelapses, though, we can do pretty much everything on an ESP8266.
I kinda loved the Orange Pi Zero form-factor, that would be great for an embedded solution and is pretty much the same price of a NodeMCU. Unfortunately the Orange Pi Zero's I2S pins are not available (used internally for wifi-enable and something else).
Re: Controlling a RepRap with ESP8266 and no Arduino November 30, 2016 12:24PM |
Registered: 8 years ago Posts: 91 |
Re: Controlling a RepRap with ESP8266 and no Arduino December 01, 2016 05:52PM |
Registered: 8 years ago Posts: 181 |
Re: Controlling a RepRap with ESP8266 and no Arduino December 01, 2016 10:07PM |
Registered: 8 years ago Posts: 91 |
Re: Controlling a RepRap with ESP8266 and no Arduino December 02, 2016 09:04AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino December 02, 2016 10:31AM |
Registered: 8 years ago Posts: 91 |
Quote
Hubberthus
Regarding the SD-card problem: (...) If you can harness the power of primary SPI, and do the timing from SW so you don't interfere with the SPI flash, then you're a master Jedi, and I'll bow down before you!
Quote
Hubberthus
Whoah, a gcode compression! Another fine topic. (...) With everybody creating their own format, it will soon be a huge mess.
Quote
Hubberthus
And of course in the meatime I was working with my ESP8266+Arduino core+Marlin+ESPrinter+DuetWifi combo. I had to merge in the DuetWifi's webpage because ESPrinter is 1 years old, and its code is buggy.
Quote
Hubberthus
However I won't continue the Marlin port, would be just a waste of time.
When I will receive the ESP32, and the holidays are over, then I will continue with digging into the module.
And the FreeRTOS-based modular 3D printer firmware should be started out somehow.
Re: Controlling a RepRap with ESP8266 and no Arduino December 03, 2016 09:49AM |
Registered: 8 years ago Posts: 26 |
Re: Controlling a RepRap with ESP8266 and no Arduino April 10, 2017 09:56AM |
Registered: 7 years ago Posts: 2 |
Re: Controlling a RepRap with ESP8266 and no Arduino August 30, 2018 11:23PM |
Registered: 9 years ago Posts: 281 |
Quote
lhartmann
I believe I found a way to use just an ESP8266 module to control the stepper drivers directly. This post explains how.
Background:
1. Other projects show how to use ESP01 as a wifi-serial bridge to the arduinos, but serial is still a bottleneck and wifi uploads are impractical.
2. Altough ESP8266 does 160MHz at 32bits processing (versus 16MHZ 8-bit from most Arduinos) it has insufficient realtime GPIO for controlling printers.
3. Raspberry pi shared the realtime gpio limitation, but wallacoloo still did reprap control using DMA. Nice! [www.youtube.com]
4. CNLohr did a really cool WS2812 led driver (weird one-wire serial protocol) using ESP8266 I2S audio output and DMA. [www.youtube.com]
5. I2S and SPI look very much alike, and SPI can control shift registers. Hey! Opportunity!
I got the code from CNLohr on github, modified it to output a 32 bit counter (16 bit left + 16 bit right channels) via a circular DMA buffer, and created a small PCB with four cascaded 74HC595 shift registers. wiring is simple:
- I2S Data to '595 input data
- I2S Bitclock to '595 shift clock
- I2s word clock (left/right) to '595 buffer clock.
This is what RAW I2S output signals for the counter look like: word-clock (yellow), bit clock (cyan), data (purple). Notice how LSB of data is output after the word clock rising edge. [www.youtube.com]
Fixed the offset (software shifing) to match the parallel outputs, raised the frequency a bit (just cause), plugged in the shifter board. Now this is what word-clock (yellow) and the 3LSBs (cyan=1, purple=2, blue=4) look like:
The code and the PCB: (https://github.com/lhartmann/esp8266_reprap)
What this does:
- Allows realtime bitbanging of 32 data bits via I2S and DMA.
- Demo code just outputs a 32bit counter at 185kHz sample rate.
- Reference shifter board is provided.
Limitations:
- 1MSB is actually delayed by 1 sample due to I2S signaling standard. This delay is constant so it could be compensated, but I didn't bother.
Hopes for the future:
- No extra arduino necessary, ESP would control the drivers directly.
- SDcard uploads over wifi would be feasible for large files, no more serial connection bottleneck with wifi-serial bridging.
- Browser-side slicing with slic3r and (http://www.skulpt.org). No software install required on the client!
Re: Controlling a RepRap with ESP8266 and no Arduino August 30, 2018 11:27PM |
Registered: 9 years ago Posts: 281 |
Re: Controlling a RepRap with ESP8266 and no Arduino September 07, 2018 05:16AM |
Registered: 12 years ago Posts: 364 |
Re: Controlling a RepRap with ESP8266 and no Arduino September 20, 2018 11:04PM |
Registered: 9 years ago Posts: 281 |