You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## ESPels: A simple electronic lead screw for the esp32.
2
2
3
-
A simple electronic lead screw for the esp32
3
+
__DANGER__
4
+
There is no estop right now, not safe. Use at your own risk and hover over the lathe e-stop. The thing could go crazy and crash the carriage into the spindle at any moment. It shouldn't but bugs happen....
4
5
5
-
* DANGER *
6
-
There is no estop right now, not 100% safe. Ensure you can quickly stop the spindle and disengage the half nut. It shouldn't but bugs....
6
+
This is currently in a "beta" state. There may be unfinished features, UI glitches, race conditions, crashes etc. Feedback is needed to imporove the project. Please use github issues with any questions, problems, or requests.
The basic architecture is the firmware does the motion control and the frontend does user interaction and configuration. The frontend is a react SPA (single page application) which uses websockets to connect to the firmware. The Frontend can live where ever you like, you can use the S3 link or you can host it in your own network. Once the files are loaded to your browser it only uses local networking. No silly firwall transitions or anything like that. You might ask why I don't serve the web content directly from the esp32 and the answer is simply development speed. This could be done with littlefs and an esp32 with enough storage.
13
+
* Imperial or Metric
14
+
* Revolution counter
15
+
* Feed Mode:
16
+
* Acts like a full time gear system for the leadscrew (like clough42's ELS)
17
+
* MoveSync Mode:
18
+
* Allows you to feed a fixed distance and stop
19
+
* Bounce Mode:
20
+
* Feeds at a cutting speed and then rapids back to the starting position
13
21
14
-
This repo contains the firmware. The frontend can be found here: [https://github.com/jschoch/espELSfrontend]
22
+
### Planned Features
15
23
16
-
You can see the frontend built here: [http://espels.s3-us-west-2.amazonaws.com/dev0_0_3/index.html]
17
24
25
+
* Spindle angle DRO indicator
26
+
* Broaching mode
27
+
* Utilize bounce mode with spindle fixed for broaching keyways.
28
+
* Virtual compound threading mode
29
+
* This mode will offset threading passes to simulate a compound's angle infeed
30
+
* TPI presets
31
+
* General Presets ( ala touchDRO)
32
+
* Hobbing Mode
33
+
* Reuse codebase for configuring and running my hobbing controller
18
34
19
35
## Configuration
20
36
37
+
Copy config.ini.d to config.ini
21
38
39
+
40
+
in config.ini update the WIFI_SSID, WIFI_PASSWORD Z_STEP_PIN, Z_DIR_PIN, EA, and EB for your encoder signals etc.
41
+
=======
22
42
Wifi: ssid and password need to be defined, this is default a file ../../wifisecret.h
Copy the "config.ini.default" to "config.ini" and update as needed. For example `'-D HOSTNAME="mx210latheELS"'` sets the hostname, EA, EB for your encoder signals.
36
56
37
-
See (Install.md) for more info on installation
57
+
The webUI simply is a react.js application designed to be responsive, it can live anywhere and should run on your phone, tablet, laptop or PC. It connects to the firmware via websockets. No network out to the internets is needed. The s3 links are simply for convienence, you can serve the frontend yourself by copying the index.html or running `HOST=0.0.0.0 npm start`. I may eventually offer an option to serve it from esp32's directly (assuming there is flash available).
38
58
59
+
Once the firware is flashed you simply need to configure the frontend with the IP or dns of the firmware.
After that the "wifi" icon will turn from red to green once connected. You may want to continue to monitor the firmware's serial output the first time you connect. You will see something like this:
Next you can click the red "venc On" button. This will turn on a virtual quadrature encoder to simulate the spindle moving. You will see the RPM: DRO field increase and the rev indicator will show the number of revolutions.
45
68
46
-
the webfrontend can be found here [https://github.com/jschoch/espELSfrontend]
69
+
Finally click the "Selected Mode" dropdown to change the mode, select Feed Mode, or MoveSync Mode, change the parameters (pitch etc) and test away!
When installing on a lathe you will need an encoder with enough resolution. Testing has been done with a 600PPI -- 2400CPI encoder. While more encoder pulses will create more accuracy the algorithm used is limited to a max of 1 step per 1 encoder position. This limits the maximum pitch you can synchronize. Consider this and the maximum thread pitch your lathe can handle when selecting an encoder and stepper microstepping configuration.
51
77
52
78
79
+
A closed loop stepper is highly recommended. The stepper online 1-CL57Y-24HE40 is a good kit for a small hobby lathe.
53
80
54
-
Plan:
55
81
56
-
1.[x] update DRO with toolRelMM
57
-
1.[x] Slave Jog MM stepper mode
58
-
2.[x] get stops working, slave jog to stop mode
59
-
3. figure out how to sync thread start
60
-
4. implement full threading cycle
82
+
You may need to swap your encoder pins and or change your stepper driver's direction. The expectation is that when the spindle turns counter clockwise the "left" buttons should move the carriage Z-.
61
83
62
-
Cleanup:
63
84
64
-
1. rethink "modes", right now there are display_modes and state transitions. The GUI's mode selection should select the state machine mode needed.
65
-
a. get rid of the menu thing.
85
+
## Frontend
66
86
87
+
the webfrontend can be found here [https://github.com/jschoch/espELSfrontend]
67
88
89
+
## HOW
68
90
69
-
** TODO
91
+
Initially I was planning on making a pcb with buttons to control everything. This is messy and hard to update. Now I'm using websockets and a react SPA to control everything. The websockets transmit json and msgPack for configuration and status updates. This is working very nicely.
70
92
71
-
-[ ] fix rapid stepper rtos crashes
72
-
-[ ] lock UI on rapid move
73
-
-[ ] add rapid cancel
74
-
-[. ] Add rapid jog when Mod btn is pressed
75
-
-[ ] Add optional encoder wheel input
76
-
-[ ] Add virtual stops
77
-
-[ ] Add feed to stop mode
78
-
-[ ] Add feed to distance (mm) mode
79
-
-[ ] Display distance to go
80
-
-[ ] Add physical stops (adjustable hall sensors for example)
81
-
-[ ] Add backlash compensation
82
-
-[ ] turn on task monitoring and display via web ui
83
-
-[ ] smooth filter EMA RPM for display
84
-
-[ ] store position after disengaging slave so you can re-index if you re-engage
85
-
-[ ] Add angle measure mode like a manual turned indexing plate.
86
-
-[] bug with startup when spindle spinning it may have a hard time booting
87
-
-[x] Add mm position to display
88
-
-[x ] Add some js for frontend
89
-
-[x ] Add HTML parameter updates
90
-
-[x ] Turn web off when in feed modes
91
-
-[x ] Add EEPROM saving of params
93
+
This is currently using a version of the "didge" algorythm here (https://github.com/prototypicall/Didge/blob/master/doc/How.md_). The slope can't be > 1 so you may need to reduce your micro stepping to facilitate large thread pitches.
0 commit comments