Are you a mobile or desktop app developer?
-
TL;DR, if you know how to develop desktop or mobile apps and would like to help an open source (public domain) project of a low cost Bluetooth stepper motor analyzer please ping me.
The development of the Bluetooth stepper motor probe progressed well and I have now a working prototype that sends 50 data points/sec with motor step count and speed to a desktop python demo that plots it in real time. The Next revision of the PCB (see above) will go to fabrication in a week or a two (5-10 units). The unit is 'plug-and-forge' since it doesn't require batteries, external power, or data cable, just connect it in series to the stepper and forget about it.
The next step is to write a desktop or mobile app that will connect to the device and provide the necessary user interface, maybe similar to the Simple Stepper Motor Analyzer as a starting point. This kind of development is is above my pay grade so help would be appreciated by myself and by the community. If you are good in developing apps (preferably with cross OS frameworks such as Flutter, React, QT, and the likes) and would like to contribute to this exciting open source (public domain) project please respond here or send me a PM. In return I will send you a working unit.
Also, if you find your way with firmware and would like to help with developing the device's firmware itself (e.g. adding a MCUBoot/DFU loader for field updates) please let me know as well (technologies involved are C++/Zephyr/Platformio/MCUBoot).
-
@zapta this is a great product from you and my opinion is, it would fit nicely into DWC as a plugin. Plugins can share data between DWC places, so the data could be used in multiple places.
The DWC libraries support different views for different screen sizes, so there can be optimizations for PC, tablet and smartphones.
-
@joergs5 said in Are you a mobile or desktop app developer?:
it would fit nicely into DWC as a plugin
That's a very good idea. I think this is possible with the Web Bluetooth API which allows web pages to access bluetooth devices. We need to find somebody that is proficient in UI apps to make it happen.
-
@zapta I've a bit experience with DWC now https://forum.duet3d.com/topic/28492/robotviewer-dwc-plugin and the used BabylonJS library for graphics is very fast (more than 60 fps), so I see good chance that it is fast enough for your application. I can help you with developing, but not now, in a few months. Your stepper monitor is great, and I'd like to help.
-
@joergs5 said in Are you a mobile or desktop app developer?:
I can help you with developing, but not now, in a few months
Thanks @JoergS5, ping me if/when you will be available. I like the way it works.
This is version 1 of the PCB which I am testing:
And below is the python demo apps which plots in real time (50 updates a second) the (i) step (ii) speed and (iii) stepper current.
The stepper current is a new measurement that computes the combined current of the two coils as sqrt(a^2 + b^2) and ideally should be a fixed value. In this example, the stepper runs on 12V and can't maintain the current at high speeds, hence the reduction of graph (iii) at high speeds, hence reduced torque.
-
@zapta I unfortunately didn't have the time to build your stepper analyzer, but I appreciate your development with great respect. You motivated me to start with PCB solutions on my own.
Building the DWC, I want to design it with adapters, so different solutions can be connected. I'll tell you when I have the time to start.
-
@chrishamm do you have preferences which libraries to use for future DWC development? E. g. this plugin can be implemented with chartjs or babylonjs. BabylonJS is fast, which may be more important for this plugin than a nice coordinate labeling, but has a not so well manageable coordinate system.
-
@joergs5, @chrishamm, looking at the link below, it says that the web ble API, which is required to connect with the ble device, is "HTTPS only". What does it mean for potential integration with DWC?
-
@zapta looking into DWC, it consumes some https sources like configtool and REST connections, but let's see what chrishamm says.
-
@zapta I searched the web a bit, there are multiple library projects to read NRF52 like https://github.com/NordicSemiconductor/pc-ble-driver-js https://www.nordicsemi.com/Products/Development-software/nrf-connect-sdk https://www.novelbits.io/smart-ble-lightbulb-application-nrf52/
so I expect we find a library which doesn't have the https restriction, in case it's a problem. DWC itself is unprotected, so there is no additional security to protect the bluetooth data. Taking over the printer is a higher risk.
About making DWC https capable if desirable, there was a thread here: https://forum.duet3d.com/topic/13851/dwc-https-and-password-protection
The Web Bluetooth lib links to this page: https://w3c.github.io/webappsec-secure-contexts/#intro where there are examples mixing http with https (e.g. 1.1 example 4), this may be an option.
-
@joergs5 I'll upgrade ChartJS to v3 in DWC v3.5 and likewise the BabylonJS dependency because the heightmap + Gcode viewers depend on it (fortunately we're no longer using ThreeJS). So it's up to you which one you want to use.
DWC can operate in HTTPS mode but only if an SBC is attached and if HTTPS is enabled via
M586 P0 T1 S1
. -
@chrishamm thank you for clarifiying.
-
@zapta dear zapta, are you still interested in a DWC plugin for this motor analyzer? I can begin developing it next week (slowly). Whether I can manage to use bluetooth without https or how to find a workaround, I am unsure and have to check.
-
@JoergS5, yes, very much so. Either DWC or any other cross OS client.
BTW, did you try the python client?
https://github.com/zapta/ble_stepper_motor_analyzer/tree/main/python
-
@zapta thanks for confirmation, then I'll start this week. I didn't look at the analyzer and Python yet, but I will use Python as a starting point. I want to use DWC, so it is integrated into the other Duet related tools.
Can you please give me a proposal where it should be placed in DWC. Please plan for displaying data of multiple analyzers. I need this proposal not now, but the next few weeks. I expect it would be valuable in some situations to show it together with other information in DWC, so showing it together with this information would be good. But I don't have an overview over the use cases.