Stepper Motor - which drvier?

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Stepper Motor - which drvier?

#21 Post by jph »

Hi Ralph, did you guys add an acceleration option to the hw_stepper ? - I had a quick look the other day and couldn't see it but I was 99% convinced it had been added ?. or perhaps I am thinking of something else... ? (old age) :lol:
Joe. CISSP, MSc.

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Stepper Motor - which drvier?

#22 Post by Ralph »

No it is indeed linear. An animation might be nice for the future.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Stepper Motor - which drvier?

#23 Post by jph »

It would be nice. Accelstepper operates on a pseudo PID basis - but is fully adjustable. If it senses a large delta from the last reading it controls the acceleration and deceleration and constantly changes speed to match. It will also do a gradual stop if commanded when the delta to the next reading is unchanged.
I am planning on doing quite a few different and esoteric messageport versions of goodies for the pico (happily running at 240 mhz with full dual core operation. I will build a small wrapper function in AM Lua to support the libs via MP
Accelstepper is one of many libs that would be great to open up and no problems with GNU etc as it is external to AM.
Joe. CISSP, MSc.

marcel_felde
Posts: 159
Joined: Wed May 09, 2018 12:19 am

Re: Stepper Motor - which drvier?

#24 Post by marcel_felde »

jph wrote: Tue Aug 23, 2022 6:33 am If you use Arduino IDE then look at a lib called accelstepper and their example codes. The movement is so fluid and the options are simply amazing.
In fact, I am not so deep in this topic so I did mainly use the solutions I got with ArdsimX, Air Manager etc. to not work with libraries directly, but thank you so much for this hint! Maybe one day... ;)
One day I will write a messageport stepper control for AM using that lib using a PICO.
I would be very curious how your Messageport Stepper Control would work like. Any way to make this "one day" come faster? ;)
A single board driving 40 steppers would be really cheap to build
I did pay around 150-350 Euros per gauge for our Dornier Simulator 14 years ago. So paying 5 Euros per Needle with a Propwash-Board was not an issue. I did meet that guy in Las Vegas and bought more electronics from him. Was a nice contact and talking, so I am happy to support him. ;)

marcel_felde
Posts: 159
Joined: Wed May 09, 2018 12:19 am

Re: Stepper Motor - which drvier?

#25 Post by marcel_felde »

jph wrote: Tue Aug 23, 2022 6:43 am Oh, yes, you mentioned the original drive units. I could tell (hopefully) if you post an image or two but they are most likely sin/cos drive. A little like the old resolver units.
Thanks for the hint! I will try to make you some pictures of the gauges.

In fact, I had to learn so much for doing this project: Restoration, metal work, welding, soldering, stitching, coding, painting, riveting, CAD and 3d printing, flight model design, sound recording, sound design, sound engine, motion and vibration generation, control forces implementation, all aircraft related stuff like systems simulation, wiring diagrams,... you name it. But those electronics and their i/o coding are still the most challenging for my brain. ;)

marcel_felde
Posts: 159
Joined: Wed May 09, 2018 12:19 am

Re: Stepper Motor - which drvier?

#26 Post by marcel_felde »

Ralph wrote: Tue Aug 23, 2022 6:54 am The stepper motors that run not so smooth with Ardsim, or was it Simvim? Anyway :) I'm curious if they run smooth with Air Manager.
Will try to find the time for making a test setup.

Do you have the small geared needle as well in your design?
I have two solutions in development:

1. Using two X27 steppers. The one turning 360° with a optical sensor is the small needle of this gauge.

2. Using the original instrument plate and gear and using one stepper to drive the gauge. In fact, also the gear is very smooth and does not need much force, the X27 are usually to week. So I maybe using a 28-BYJ instead.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Stepper Motor - which drvier?

#27 Post by jph »

Hi Marcel,
As to when I can get time I am honestly not sure. I have rather a lot going on at the moment but will see what I can do. Not 'soon' though unfortunately.
I understand what you are saying regarding the huge amount of new things you have to learn when taking on a project like this but quite often things like coding are more about imagination. You still need the basics, but you can learn those. It is the imaginative coder that produces remarkable things.
Are you not the chap who did the lovely little Neon simulator with and LED ?
Not difficult coding, but very very good coding and solution. ;)

I was going to find a link to some info I gave to someone a while back on converting the 28BYxx stepper to biploar from unipolar to allow use of the 2 wire controllers (the new silent types are amazing) - then I realised it was actually you I was chatting to :D https://siminnovations.com/forums/viewt ... 459#p36459
Yes, that lovely compass of yours. I remember now. That was also the thread regarding missing steps.
I will add the accelstepper at some point but I honestly don't know when.
The new processors - (forget the actual arduinos - they are ancient history now :) ) - the new ones like the pico, well, mainly the pico make wonderous things within grasp. This is a 5 dollar micro board (pi Pico) running at 240 Mhz with overclock - and rock solid. It is dual core, it has stacks memory and 2MB of flash. Using Arduino IDE you have FULL support for this beast down to register level, but using just simple arduino stuff you can run multicore work as easy as anything. Having a complete core dedicate to just driving steppers - for example - is perfectly possible whilst the other core runs all the menial tasks. For anyone who has used Arduino IDE, then it is more or less a case of having setup and loop etc along with setup1 and loop1 giving access to the 2 cores. Obviously there are times where things need passing or halting but that is also catered for.
I am VERY excited about the future of AM due to micro boards such as the Pico. It is far better using messageport for certain project's or specific requirements along with a dedicated micro with custom code as you can do exactly what you want. The key needs to be to make that available to others so that once done, if it is of use to someone else, then make the code available which I am prepared to do.
I am programming a complete hardware setup for Zibo and it is ALL going to be messageport with dedicated processors for certain areas. Rather than individual sections of, say, the pedestal area, I am treating the complete pedestal as a single unit with - what is looking like - only a single micro required plus some some IO expansion. and driver boards. The same for the complete overhead and all with customisable hardware. The code can be relatively small, neat and very very quick with the minimum amount of data passed back and forth to AM as otherwise the serial port becomes a real issue. Hopefully one day we can have a UDP network 'messageport.net' . that kind of coding only works for specific projects, but making a 4 or 5 dollar Pico into a dedicated stepper driver, for example. is very worthwhile for the type of things you are doing. A single pico could driver as many stepper drivers as you would want. The number of pins is not a limit as expanding I/O is ridiculously cheap and better, in this case, to keep with one processor rather than adding processors. The cost of the IC's to add, say, 80 output pins to a pico using only 3 of the picos actual pins is less than a dollar. Inputs are the same price per 80... then there are also the amazing STM Nulceo boards and of course the superb ESP32 and S3 version if you need stacks of ram and flash - so pic and chose, but I definitely like the pico as THE most amazing 'all round' thing ever for arduino in the same way that messageport is THE most astounding thing (for me) about AM. The 2 are made for each other - the power of the Arduino IDE and modern processors like the Pico, STM32 and ESP32 S3 with custom programming combined with the power of Lua and AM on the PC is mind-blowingly good. Anyway, I digress.
You have already proven amazing skills AND imagination. It is a winning combination. (forgive any typos I have a migraine and can't be bothered proof reading)
Joe
Joe. CISSP, MSc.

marcel_felde
Posts: 159
Joined: Wed May 09, 2018 12:19 am

Re: Stepper Motor - which drvier?

#28 Post by marcel_felde »

jph wrote: Tue Aug 23, 2022 11:57 am Are you not the chap who did the lovely little Neon simulator with and LED ?
Not difficult coding, but very very good coding and solution. ;)
Yes, that was me. As I have done similar things for add-ons in X-Plane or MSFS, this is not so difficult for me. The creativity is there. Using a AM Output Pin instead a Bitmap-Texture is easy. But that hardware coding is something different. ;)
The new ones like the pico
To be honest - I did never use that before. ;) In fact, I did not want to use SimVim anymore, beside the limitation on usable steppers, it was about chaining a micro-micro-board to a micro-board, and more tiny, tiny micro-micro-boards to the micro-micro-board - to save space an money. I am redoing all my electrics since early 2021 because things got simply too tiny. I love large electronics and keep things clear and understandable. Additionally, you really do not want to use thin cables in a real cockpit shell that simulates vibrations and (small) motion. So I did print even holders for terminal blocks to screw in thick cables that won't tear when you pull'em. ;)
You have already proven amazing skills AND imagination. It is a winning combination.
Thank you so much for the kind words!
I am programming a complete hardware setup for Zibo a
In fact I did organize a real 737 cockpit shell for a friend who is building a 737NG sim with it. So this is great to know!

wendy
Posts: 46
Joined: Sun Aug 26, 2018 7:48 am
Contact:

Re: Stepper Motor - which drvier?

#29 Post by wendy »

I'm currently experimenting with TMC2208 microstepper driver for a gyro and that in combination with Arduino Nano and MessagePort.
Calibration is done with a very small microswitch.

Not yet complete but very smooth movements as you can see in the video.
I did this via MessagePort because I could not get the driver to function with the VID6066 system in AM.



User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Stepper Motor - which drvier?

#30 Post by jph »

Hi, good work.
The best way to test for smoothness in this kind of situation is try it in flight with a very gentle turn, the absolute minimum rate of turn, and then also with a fast turn. The problem, if any, tends to arise due to a fixed 'speed' of rotation as in how quickly a step is completed.
This is then balanced against the number of steps in use in the stepper for a full rotation and also the micro-stepping, and then of course the speed of update via the com port.
The 'speed of rotation' has to be set for the highest rate that wlil occur to keep the instrument movement realistic. This then can, in some situations and in certain programs, cause issue with very low speed as, if the speed of update is slow then the stepper will still move at high speed between small steps.
It is a complete balance between the characteristics of the servo, reduction, microstep setting and speed of update of data.
What stepper are you using ? - is it a modified BY (bipolar) or something else ? - also what driver if on messageport ?
Its looking good :)
Joe
Joe. CISSP, MSc.

Post Reply