Background
I decided a couple of weeks ago that it was about time I got back into writing software; something I haven't done for a very long time. I've always liked the idea of controlling things with micros and this seemed a good place to start.
So, I needed to pick a platform and a project to aim for. After considering the Arduino, I settled on the ESP32. I thought of making something to connect to my home automation system Hubitat Elevation hub, which mainly uses zigbee. Although Xbee could be used with Arduino, the ESP32-C6 apparently had onboard support.
So next was picking a project. I have a workshop that is mainly used for woodworking but I also do other things as well. Whilst doing a woodwork project a week or two ago, my extraction remote broke. It still works intermittently but is irritating to use. So I thought I would replace the remote that controls the extractors and add some further functionality. And so the blast gate/extraction project was conceived.
The workshop
My workshop is, what I would describe as, a well equipped home workshop. I am retired and the workshop is at the bottom of my garden in the UK, and just for fun.
Apologies for the messy state. 😊
There are two extraction systems:
An Axminster Craft AC153E low vacuum high flow Dust Extractor that is connected through rigid PVCu piping and used for the machines. The blast gates are cast alloy body with a steel guillotine style shutter and are all connected to this system.
The second is a twin motor Camvac which is a high vacuum low flow system. This is used for hand power tools and machine cleaning. There are no blast gates connected to this. I have included it because this will need to be controlled (on/off) via the system created through the project.
The workshop currently has six blast gates:
Mitre saw and Table saw gates
Floor sweep vent gate
Planer/thicknesser gate
Bandsaw gate (You'll have to use your imagination here because I removed it for the project development 😊)
Pillar drill gate
A seventh gate for the router table will be added later this year
System requirements
Requirements spec version 1 - a system that would:
• Open a particular blast gate, close all other blast gates and start the Axminster extractor.
• Control the Axminster extractor (on/off) independently of the blast gates.
• Control the Camvac extractor (on/off).
• Control the system via a remote control that I could wear on my trouser belt loop so it would always be with me.
• Open each gate locally which would also close all other gates and start the extractor.
• Close each gate locally.
• Each gate to show it's status via an indicator (probably led).
• Option to easily disconnect the blast gate module from the blast gate. If I'm in the middle of a woodworking project and there is a module error, I don't want to have to stop and fix it immediately.
• The modules will be retrofittable to the existing gates.
I hope this post hasn't been too long winded. Development has already begun so I'll post over the next few days until the posts have caught up with the development, and then just post when there is something new to say/show.
The next post will be system design.
Well, that could’ve gone better 😬
@andydowns That is an excellent project overview. Now anyone wanting to learn or help has a really good idea of the scope of the system. As a former woodworker with a professional dust extractor I see nothing out of line with what you said. You have added some interesting additional features I did not have but they seem doable. As a long time electronics and computer guy I see no major hurdles to your overall design. Unfortunately I am not familiar with any home automation equipment and I also have no familiarity with Zigbee or Xbee. I am concerned you are using the gen 3 esp32, it is still very buggy and now many of the API's are broken. Based on my >50yrs experience, I estimate at least a year before they have it as bug free as the gen 2 products if not longer. BTW, there was no forewarning about the broken API's!
Maybe I am misunderstanding something, but since I know how new the gen 3 esp boards are and how old Zigbee is I smell a conflict. So I went a googling and quickly turned up what might be alternatives to the esp board you are focused on so far and I predict will give you nightmares (and I am probably the biggest esp32 promotor on this forum) Here are a couple links, I urge you to do your homework, picking the wrong hardware generally leads to mission failure (I was involved in one of $Billion size)
I am not sure why you think a special radio is needed, it looks like ZigBee is 2.4mHz which almost every MCU or MPU has.
Here are some links I think may prove interesting
https://www.instructables.com/Setting-Up-Zigbee-Communication-to-Transfer-Data-B/
https://www.hackster.io/Neutrino-1/xbee-zigbee-setup-with-arduino-and-nodemcu-81f7fa but I do NOT recommend the UNO, substitute a NANO for it.
This is official Arduino doc https://docs.arduino.cc/retired/shields/arduino-xbee-shield/
Here is a post on HA (Home Automation) site which is one of the biggest home automation systems in NA, not sure about EU. https://community.home-assistant.io/t/building-own-zigbee-device-using-arduino-zigbee-shield/172990
And a couple misc links clearly showing Zigbees being used with ordinary NodeMCU V3 LoLin ESP8266 and Arduino NANOs which have been around for a while. These modules are cheap and have no broken API's.
https://www.researchgate.net/figure/Connecting-ZigBee-node-and-Arduino-NANO_fig6_259386272
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Thanks for the links @zander.
There are some very interesting articles and videos there. I will be returning to Zigbee in another project and have the links bookmarked for the future.
I am concerned you are using the gen 3 esp32, it is still very buggy and now many of the API's are broken. Based on my >50yrs experience, I estimate at least a year before they have it as bug free as the gen 2 products if not longer. BTW, there was no forewarning about the broken API's!
Hmm, that is troubling. I have got a protype working, which I will share in the next few days. It doesn't do any of the communication yet, it is just controlled locally via buttons. All will become clear.
So far, so good with the ESP32. It is doing exactly what I expect it to, so no bugs discovered yet. There's plenty of time for that though. 😊
I was about 30% into writing a business application using VB version one many years ago and found a bug which halted the project in it's tracks. It took me ages to get Microsoft support to own up to it, but they did eventually. It was a very painful exercise!
I'll be posting the system design shortly.
Well, that could’ve gone better 😬
Well, that could’ve gone better 😬
That looks like a good plan to me. I currently use a shelly relay in my workshop to control the workshop heater (for the winter months to keep the tools toastie) controlled via mqtt messages sent from a rpi 4 control situated in my house (that controls other stuff as well)
I have an ethernet link to my workshop that has its own workshop router/wifi box. I also have workshop internal and external temperature and humidity sensors linked to a rpi pico W that uses mqtt to send the info back to the control rpi. I may be inspired to do more in my workshop, such a blast gates, when I see how your project progresses. 😀
If you need any assistance in getting the mosquitto mqtt broker up and running on your rpi then give a shout. You could make your own remote control to send mqtt messages, but have you considered using an existing small remote device with buttons operating via IR or 433MHz transmitter? It might be easier to fit on the belt and they are cheap as chips. An appropriate receiver could easily be linked to an rpi. Just a thought
PS - as I see you used to do VB programming, and I also, somewhat briefly worked as a contract VB programmer for a while ( back in the VB6 days ) I would humbly suggest you might prefer to have a go with python on the rpi rather than code red as when I had a go with code red, good though it is, I was getting a bit frustrated with it and found I preferred to do the manual coding. Micropython on the rpi pico or ESP32's etc is also a very nice option too.
@byron Thanks for that. At least I going in the right direction with something that is feasible. 😁
I currently use a shelly relay in my workshop to control the workshop heater (for the winter months to keep the tools toastie) controlled via mqtt messages sent from a rpi 4 control situated in my house (that controls other stuff as well)
I have an ethernet link to my workshop that has its own workshop router/wifi box. I also have workshop internal and external temperature and humidity sensors linked to a rpi pico W that uses mqtt to send the info back to the control rpi. I may be inspired to do more in my workshop, such a blast gates, when I see how your project progresses. 😀
That all sounds excellent. I don't know where you are, but we have the rusty tools issue in the UK as well. I have a dehumidifier in my workshop that is controlled by Hubitat from a temperature/humidity sensor in the workshop.
We need to be careful what we share. I have a feeling our project lists may grow substantially. 😂
If you need any assistance in getting the mosquitto mqtt broker up and running on your rpi then give a shout.
Appreciated, thanks. I have set the pi up as headless this evening and installed mosquitto. It seemed to go smoothly and appears to be working. I bought the wrong case - without fan - and so will not be running it too much until it has some cooling. Something that many including Bill suggests with a pi 5.
You could make your own remote control to send mqtt messages, but have you considered using an existing small remote device with buttons operating via IR or 433MHz transmitter? It might be easier to fit on the belt and they are cheap as chips. An appropriate receiver could easily be linked to an rpi. Just a thought
Yes, I was looking at these and wondering how easy they would be to integrate?
There don't seem to be many with enough buttons. Ideally I need a minimum of ten buttons. I guess if I did my own I might be able to have less multi-functions buttons, but that's not ideal.
PS - as I see you used to do VB programming, and I also, somewhat briefly worked as a contract VB programmer for a while ( back in the VB6 days ) I would humbly suggest you might prefer to have a go with python on the rpi rather than code red as when I had a go with code red, good though it is, I was getting a bit frustrated with it and found I preferred to do the manual coding. Micropython on the rpi pico or ESP32's etc is also a very nice option too.
Hmm, interesting. I think I'll stick with C++ (at least I think that's what it is 😊), but will explore this further once I have a bit more experience with ESP32 and rpi.
On infecting each other with more projects, I fancy having a go at a router lift with a stepper on it. It would have a calibration function to zero the router cutter after it is fitted, and then be able to type in a cut depth and have it raise the router to the right position. 🤔🙂
Well, that could’ve gone better 😬
I live in the UK too (Norfolk), but I insulated the workshop roof and floor and with the log type walls I just provide a bit of heating on the coldest nights. I set the heating to come in if the temp falls below 8 degrees C and a couple of small electrical oil filled rads (about 400 watts each) is enough to do the job. I have a humidifier in the workshop, but I've not found the humidity to be high enough to need to use it.
There don't seem to be many with enough buttons. Ideally I need a minimum of ten buttons. I guess if I did my own I might be able to have less multi-functions buttons, but that's not ideal.
On infecting each other with more projects, I fancy having a go at a router lift with a stepper on it. It would have a calibration function to zero the router cutter after it is fitted, and then be able to type in a cut depth and have it raise the router to the right position.
Well lets temp you to spend a bit more then 😎. How about a M5Stack Cardputer. I saw one demoed on Explaining Computers today and almost splashed out for one, before telling myself I don't need another toy. Lots of buttons to press, but probably too big to clip on the belt.
Which got me wondering if a button presser clipped to the belt would soon fall out of favour once you've forgotten to clip it on for the nth time. How about linking an ESP32 or picoW to a small touch screen where the 'buttons' are just blobs drawn on the screen that you prod at with one of your fingers. I do this with a picoW and an ili9341 screen connected via a pcb I created and encased in a 3d printed box. You could then sprinkle the little control boxes around the workshop so one is always ready to hand, and whatever button number you press is then highlighted and propagated to update all the sprinkled command screens for a consistent view of the status. You might need some more electrical socket points though they could just be 5v outlets.
As for controlling a router lift with a stepper, that sounds interesting, and probably rather expensive 😀
The M5Dtack Cardputer looks an interesting little device. I watched the same video. I’ll keep that in mind for future use.
I think my first system will be basic, which I can then build upon.
From a usable perspective the first and minimum system will be having modules on each gate operated by local switches and communicating to the broker. I.e. opening the local gate, close all other gates and start the Axminster extractor. Pressing the local close button will stop the extractor.
The remote and Alexa control can come once it is up and running.
Im in the workshop pretty much every day, tinkering with something or another, so the button will probably stay on my trousers only swapping to another pair on wash day. 🙂
Well, that could’ve gone better 😬
@andydowns Be very careful with Alexa. She is always listening, and you might inadvertently cause her to do something unintended. I have had several false Alexa responses. Fortunately, I have nothing remotely dangerous in my Alexa network, but that experience just reinforces my opinion that I have yet to see a good use for voice recognition.
By the way, the best router for a lift is the old Porter Cable with the helix base. Plunge routers are NOT engineered for lifting, but many do not adhere to those facts.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Alexa doesn't have direct control over anything directly and nothing dangerous. I have had a couple of moments though. One of my cousins came round to visit with his wife. She didn't know anything about Alexa and asked in a nice loud and clear voice "Can Alexa turn everything off?" Me and my cousin exchanged open mouthed astonishment and waited for the fallout. 😬 Luckily, Alexa didn't recognise her voice. Phew!
On another occasion my granddaughter inadvertently ordered something from Amazon. Needless to say the option was turned off to prevent further unwanted purchases. 😁
Well, that could’ve gone better 😬
@andydowns OK, I thought you wanted to use Alexa to control the blastgates. Turning them all off with the vacuum applied could cause a dangerous situation under the right conditions.
Now, I must see if I have Alexa set up for Amazon orders. That would be a problem, except I can always return things for free.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Alexa will control the blast gates, but only via the Broker, not individually. So she will be able to request a blast gate is opened, but not closed.
As mentioned previously, there is not enough vacuum to collapse the pipes, but running the extractor for any period of time with the gates closed would cause the motor to overheat. Something I will guard against.
Well, that could’ve gone better 😬
@andydowns, so you know, I closed my woodworking shop in 2004 when we sold the city house and moved to the lake. I did have some remote control, but I can't remember anything about it.
I never set the shop back up at the lake house; the basement floor was not suitable, and I ended up selling everything for a song to a neighbour's son.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Prototype 1
With the system design roughed out, it was time to make something to test and learn by.
The first prototype is made from scraps of aluminium sheet and angle. The idea was to try and make it fairly compact so it doesn't stick out too far. The mounting plate can be cut down to size once everything is mounted.
The L brackets on the left are how the gate fixes to the workshop wall, so the mounting plate will be on the left of all gates.
The gate has had slight modification; the plate mounting bolts have been opened out from the 4mm self tapping screws it is fitted with as standard, and tapped M6. There are M6 nuts on the underside to hold the plate on. I could go for a thicker plate and tap that, but I think Nylok nuts are more secure and won't loosen over time due to vibration.
The operating arm can be pivoted out of the way on the lead screw nut, which will allow any gate to be operated manually should something stop working.
The arm mainly relies on gravity to keep it in place but has a slight friction as it fits over the shutter return. It is way too flimsy and deforms slightly which won't be an issue as this will be 3D printed and will have ribbing to give it the rigidity it needs. The piece of ali used for the arm wasn't quite long enough to reach the center of the shutter and so causes it to pitch as it moves. This isn't helped by the ill fitting shutter plate.
The lead screw and nut was from Amazon and pretty cheap. As a result, the nut has a quite a bit of play and backlash, which is also contributes to the pitching. I may need to get a better quality. The lead screw can be trimmed to length when the design has become more refined.
The shutter material is 1mm steel and the gap is 3mm, so I will be making shutters that are a better fit, keeping in mind that it needs to be able to clear dust out of the slider. I use all the gates fairly regularly so this shouldn't be an issue.
The limit switches are simple micro switches and work well.
I wondered when I started, if the opening/closing speed might be an issue, but I think this is fine. It takes about 5 seconds for the extractor to get up to speed.
These are a few test videos.
Gate opening:
Gate closing:
Gate error:
All in all a successful first prototype that has been an excellent learning opportunity.
Still to do.
Experiment with micro stepping as previously suggested. This will, if nothing else, make it a bit quieter along with improving the gate shutter.
The current setting of the A4988 will be revisited once the gate is mounted so I can see how much current it needs. The timing of the gate opening and extraction starting will play a part in this too.
Shorten the coupling between motor and lead screw. It doesn't need to be that long.
Design and print the arm and try it with a new shutter. The pitching an rattling needs to be solved.
A friend of mine came round and suggested a different approach to the design. It looks promising so I will make a second prototype to try that out. It has some advantages and some disadvantages, so I'll develop both a bit further before committing.
Well, that could’ve gone better 😬
@andydowns Looking good. A little slow for my taste, but not a show stopper. One thing I would do is place spark suppression on the limit switches. This might be just a cap, but I am sure someone more knowledgeable than me will chime in with exactly what parts are needed. I am thinking a cap to absorb the surge, and a resistor to ground to bleed the cap off.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.