Help needed in designing system

Hey all, first of all congratulations for the great project and the vibrant community!
I am in the process of redesigning a system for a dance performance in which I previously used a DC motor that had a few problems (overheating mostly), and I got blown away from the possibility of using SimpleFOC.
But this is a bit outside my comfort zone and I would like some help from you.
I need to make a system in which there is a performer pulling a thread (wound on a reel), and the motor must pull the thread in the opposite direction. The motor should pull with some force, but not insanely (I have used a 6.8W DC motor for this and it was ok). The point is to keep tension on the line, and to wind up the thread when the performer goes towards the reel.
Here an image that explains it.

Based on what I got from SimpleFOC I will need the “Position Control” mode. So that the thread tries to go back to its starting position.
The question is: what combination of microcontroller+driver+motor fits best?
To complicate things even further I would need to make 5 of these, for five performers. And the data about the position needs to be sent to a controlling computer.
In the previous version I used an encoder connected to the reel and an ESP32.
I found the Dagor solution and that looks interesting, but I don’t know if it is easily sourceable at the moment. I live in the Netherlands, don’t know if there is anyone in the vicinity that has experience in the availability of parts.
Since it is quite challenging I can and want to offer money if anyone wants to guide me through the selection of components and the architecture design.
Thanks and I hope to hear soon!

1 Like

@Sindel

Welcome to the community, and wish you success in your endeavors.

What you want is very doable.

Let’s see first if anyone else is willing to pitch in and help you. If you don’t get anything in a day or two, I may be able to offer some assistance.

Cheers,
Valentine

1 Like

Pulling strings is exactly what I try with my paragliding trainer project. I am not yet there, but the proof of concept looks very promising. The SimpleFOC part is really easy. I use the B-G431B-ESC1 boards and CAN communication between them. Works very well and all very easy. The critical part is to not overheat the boards, which I control using the built in temperature sensor. The forces you need to apply sound very low, so this should not be a real problem, but I would attach heatsinks to the MOS FETs nevertheless and limit the current to something like 1…2A (@Owen_Williams has more experience with the heat of these boards than I do!). The only downside of the board is that it has no wireless communication at all and the sensor contacts are a bit tricky to solder (hint: solder a row of header pins first, that’s easier and more robust than thin wires). If you need help with the CAN bus, I can probably help a bit, I just designed a library for it (heavily based on work published by others on this forum).

  • Chris

Hey @Valentine, thanks for the availability! I don’t need it by tomorrow but I need to have a reasonable plan relatively soon. Rehearsals start in May and I’ll need to build and test beforehand. Any help is welcome!
@Grizzly Whoa, paragliding trainer sounds like a crazy great idea! Anyways I searched on Octopart for the board you described and it seems that only Digi-Key is left with some stock of 10 units, which I expect to be gone very soon. This damn chip shortage is haunting me in every project.
Anyways I haven’t used CAN protocol yet, only i2c and SPI so far. But definitely can learn and use libraries. I’m guessing it needs also a special transceiver module, if I wanted to use an ESP32?

@Sindel

While we are waiting, can you draw a simple diagram/picture of what does what and where and a list of things you believe you will need? I’m still not clear on what the low level requirements are.

Cheers,
Valentine

As per your request, a very horrible diagram. I hope this was what you were asking for.

So from what I got from the SimpleFOC concept is that I need a microcontroller (preferrably some fast ones) that handles the motor driver and the encoder. In my case for the microcontroller I would be inclined to use an ESP32 (worked with them before), but it is just my hunch.
Regarding choice of motor driver and encoder, I am oblivious. My experience with encoders is limited to the knob type (quadrature). Drivers are also not my strong point.
What I am asking the community is if there is some project that you’ve seen that suit my needs and is ready made, or if you have experience based suggestions that would point me to a safe direction.
Or, even better, make a complete BOM and schematic as a paid commission. I like peace of mind :slight_smile:

Let’s refine the diagram. Ill need some time. Will post here in parts.

Am I on the right track?

Questions:

  1. What is the role of the master computer module?
  2. How often you send commands to the WiFi Driver control module?
  3. What commands do you send? Examples?

Cheers,
Valentine

@Valentine whoa, that’s commitment! Thanks a lot for the effort!
I think your diagram is more complete than mine, so yeah. I don’t exactly know what you mean by “integrated” driver, but I guess it is the combination of the microcontroller, driver and sensor with the SimpleFOC firmware loaded.
Master computer module sends and receives data from the nodes.
The whole point of the system is to have real-time data about how much thread is being pulled, so how much distance is from the spool to the performer. We use that as a live parameter for sound synthesis.
So while I don’t send much data to the nodes, I have to be able to get data from them, with a sampling frequency of minimum 20Hz.
With the old system I had a simple equation that also increased the pull (PWM applied to the DC motor via transistor), the farther the performer was, to generate enough pull on the thread and keep it taut. This was done in order to not overheat the motor when not much power was needed. If the same thing needs to be applied here, then let’s say every second I would need to update the torque.
But I haven’t yet studied the SimpleFOC APIs, so I’m flying blind as to the configurations needed.
To summarize the commands I need to send are:

  • Calibrate starting position.
  • Start pull to rewind thread to starting position
  • Increase / decrease torque
    The commands I need to receive are:
  • Linear distance travelled.

Hope that makes it clear for you!
And thanks again!
Anyhow this is my interpretation of the parts I would use for such a system. If there is a simpler way, you are welcome to suggest!

In that case you don’s have to send any data, just relay back the length of the string pulled at 20 times per second, like a constant stream of numbers.

If that’s the case then this is an update picture

Question. Why do you need WiFi. Can you just draw a long cable? Where is the need for wireless?

If you avoid the wireless, you will greatly simplify your setup (and cheapen it too).

Wifi Arduino is expensive and time consuming. Relatively speaking of course.

Just for clarification, my CAN lib implemented for the B-G431B board only so far. For ESP32 you would need to implement the hardware dependent layer. Certainly doable, but given the time frame critical.

@Valentine The reason for wirelessness is that I need to make 5 nodes, placed at various positions. If I could avoid drawing wires it would be great. If not possible, then I have to think of the communication protocol and required hardware for that (like for example ethernet board for every microcontroller, or other protocol).
Has anyone had experience with the Dagor board? From the videos I saw it sounds like a potential good solution, but I haven’t dug deep enough in the tech specs to ascertain if it exactly fitting for this.

For what he needs, there is no need for that. His setup is actually rather simple. He can control the driver boards with five ESP32 using serial, and the five ESP32 will wirelessly communicate with the central computer. No need for CANBus or anything else. Also, he is only receiving telemetry from the nodes at 20 samples per second. Not really controlling anything.

Not, sorry. Due to the shortage I heard you cannot even order a Dagor board. Did you contact the person?

Not yet, I wanted to verify from the community first that it was indeed a good idea.
Damn, it looked like a compact nice little driver board, with embedded sensor and ESP32.
Hey @David_Gonzalez, have you got any on stock? If it is a good match for my project, I’d be interested in purchasing 5 units

I agree Dagor boards would be perfect for you.

If none can be found, perhaps you can consider a SimpleFOC shield paired with an ESP32 in Arduino format (they exist). If all else fails, you can wire a ESP32 DevKit board to a driver board using jumper wires.

Perhaps I can help with some software examples for ESP32 if its helpful to you.

One thing you can look at in this context is OSC - could be a nice protocol for this type of application, although simple UDP packets or a ASCII TCP stream would probably work just as well…

@runger

Thanks. One option (last option) would be that @Sindel orders a hackjammer or a mosquito, these are fully integrated boards. All components are in stock. However this means he has to wait for JLC to manufacture the boards, and the hackjammer is not exactly very cheap, and a total overkill for the job. Also he has to program them with an SWD dongle. Again not really very straightforward, needs soldering.

In this case, he will still need an external ESP32 but in case of using a fully integrated board the WiFi on those off-shelf boards and connecting to the hackjammer is trivial, just a Serial. ESP32 Wroom are widely available and cheap.

Let’s see where this goes first. I already had 5 mosquito boards ordered, but they come without angle sensors, so that’s yet another problem. I may be able to pre-program and snail mail those? Wow that would be messy.

Also, @Sindel will need a 3D printed setup to hold the entire system, who’s going to do that? Combining the motor, spool, angle sensor and boards in a custom box is a non-trivial mechanical project by itself. You can’t just tape this together with sticks and glue.

Hmmm…

Cheers,
Valentine

We all want more Dagor boards! including me :frowning:
I’m looking into alternatives for parts, but can’t make any promises. Options are very limited and volatile.

I’ve used a SimpleFOC shield with a ESP32 devkit and jumper wires. Totally an option!

MP6530 driver ICs are available, perhaps they can be a nice replacement. I have ordered those and soon will be experimenting on them.

Hey all, thanks for the great support!
To answer your questions:
I have a ST-Link programmer so I can program boards if needed.
I can solder, both THT parts and SMD (with soldering iron mostly). I have a rework station as well, although it’s not my forte.
I also have a 3D printer, and I designed the spool system and motor holder for the previous (DC motor based) version of the system. I design parts in TinkerCad, so nothing fancy really.
@runger I have used OSC for many projects, it’s a great protocol! Is there a specific example you are referring to for FOC?
I cannot really choose which combination of boards, I don’t have enough expertise on the matter.
If the SimpleFOC shield is a good option then I could also opt for that. No need to complicate things if unnecessary.
Let me know your thoughts and thanks again!!

Hey @Sindel ,

There’s some OSC examples in the SimpleFOC library’s examples directory - like I said I’m not sure it makes sense in your context, but if it does then it could be an easy way to talk to other devices or existing software.
Basically there is a OSC library for Arduino, and using it you can send/recieve OSC messages via UDP on an ESP32, since it has WiFi.
I also have code around setting up WiFi, OTA updates and announcing to mDNS (Bonjour), all of which I’m happy to provide if it’s helpful.

But I think your first-order thing is finding some drivers/ESP32 combination you can work with.

1 Like