Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:02 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Picomite D.C. Motor Speed Controller

Author Message
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 08:13pm 11 Aug 2024
Copy link to clipboard 
Print this post

Hello Everyone
As part of my NON CNC Machine tool control system, I have been researching how I could build a Spindle speed control. What I need is something with a feedback loop like an optical encoder or a Hall effect on a spindle running 12,000 RPM but I could run a Gt2 Gilmer Belt drive to the encoder or sensor at 3:1 to bring it down 4k or 6k/min and use that feed back to control an R/C Car Electronic Speed Controller, and they work just like another Servo! I use Radio Control Car DC Brushless Motors to run my small Cheep Chinese Lathe & Mill My idea is the Pico controls the ESD to run the Motor and get rpm Feedback and adjust accordingly the PWM to the Speed control

I have some questions
1. will the Pico handle 4k or 6k pulses /min ?
2. has anyone messed with an RPM sensor like this?
3. if The Pico isn't viable would this Work?
 Silicon Chip Mini-Maximite Basic Computer Kit

I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 08:34pm 11 Aug 2024
Copy link to clipboard 
Print this post

You asked about this on 7th August and I don't think things have changed much over the last few days. :)

That's a very expensive board for what it is. Isn't it the old mono Maximite 1 but stripped down and in a smaller package?

The clock is 80MHz A non-overclocked Pico is 133MHz and you can go a lot faster than that.
Then you have the PIO on the Pico... It's designed for high speed stuff.

.
Edited 2024-08-12 06:39 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 09:23pm 11 Aug 2024
Copy link to clipboard 
Print this post

Phenixrising uses a pico to decode quadrature encoders at high speed.
He also knos PI F.

Consult him.
Edited 2024-08-12 07:24 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 09:53pm 11 Aug 2024
Copy link to clipboard 
Print this post

A spindle motor doesn't need a quadrature encoder, you only need to know the speed not the angular position.
Just paint one side of the shaft white and the other black. 12000 RPM is only 200Hz.

Illuminate it with 38kHz PWM and IR LED and sense with an IR remote control receiver - easy with the Pico FIN.

This idea is tested and proven to work.
.
Edited 2024-08-12 08:01 by phil99
 
Rickard5

Guru

Joined: 31/03/2022
Location: United States
Posts: 463
Posted: 11:25pm 11 Aug 2024
Copy link to clipboard 
Print this post

@ mixtel90 I wan't asking about the Mini Maximize I was Pointing it as a picomite MMBasic Alternative if the Pico wasn't fast enough to use as a Spindle Tach and control the Speed Controller. Ultimately I'm looking at building it modularly with 1 Master Pico that is the User Interface, and modules for Speed control and Stepper I want to make all Cheep Pico 1s and I don't need color for the display
I may be Vulgar, but , while I'm poor, I'm Industrious, Honest,  and trustworthy! I Know my Place
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 01:01am 12 Aug 2024
Copy link to clipboard 
Print this post

  Rickard5 said  I'm looking at building it modularly with 1 Master Pico that is the User Interface, and modules for Speed control and Stepper


You mean you basically want Mick's RPZ system with additional modules (if actually needed)?







Mick's RPZ Compute

~
Edited 2024-08-12 11:03 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 05:56am 12 Aug 2024
Copy link to clipboard 
Print this post

Search for CNC speed monitor on this forum.

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 06:04am 12 Aug 2024
Copy link to clipboard 
Print this post

@Rickard5

It can't be overstated, just how great the PicoMite has become for proper motion control, thanks to the PIO.

A very common dedicated motion chip is the LM628/629. The PicoMite blows it out of the water....look at what it costs:





The MMBasic code is ridiculously simple and I can provide all that you need.

We have:

-Standard PID
-Advanced PID (sounds grander than it actually is) which includes Acceleration Feedforward, Velocity Feedforward, Offset, Torque Limit, etc.
-Full velocity profiler which consists of:

Acceleration (ramp-up) in encoder-counts/sec/sec (no time delay nonsense)
Velocity (continuous) in encoder-counts/sec
Deceleration (ramp-down) in encoder counts/sec/sec

@Volhout modified existing encoder-counting (quadrature decode) PIO code to work with MMBasic and it's absolutely rock-solid. I've had my small motor running @6,000RPM with 2,000 encoder counts/rev. This is absolutely trivial for this device.

Lots of lathe hobbyists employ the method cited by Phil99 which works fine BUT if you want some real fun.....

You'll be playing for hours, just commanding your motor to do anything you want it to do with perfect precision. Turn the motor power off and push the spindle out-of-position by hand, turn the motor power back on and the spindle will jump right back to perfect position.

The PicoMite can handle multiple encoders so you can synchronize for threading purposes and even have a standard MPG (manual pulse generator) to jog the axis.

Outstanding and I've been a motion specialist for 40 years  
Edited 2024-08-12 16:31 by PhenixRising
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 06:46am 12 Aug 2024
Copy link to clipboard 
Print this post

WOW mate from what your saying in order to get my cnc going just throw out the steppers and get some servos to replace them and problem solved.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 07:33am 12 Aug 2024
Copy link to clipboard 
Print this post

  Bryan1 said  WOW mate from what your saying in order to get my cnc going just throw out the steppers and get some servos to replace them and problem solved.


Well, the simplest way to upgrade would be to take the existing pulse/direction signals and instead of driving the motor, have them become merely position commands to the PicoMite. The PicoMite would then close-the-servo-loops.

This way, we never lose pulses and can run much faster. @Volhout was looking at using the PIO for handling pulse/direction commands.

There exists many low-cost servo packages that already accept pulse/direction but the PicoMite is able to do sooo much more.

Would be awesome if someone came-up with a G-Code interpreter for the CMM2 or H7 that could dish-out commands to the PicoMites. 16+ axes of interpolation would be no-sweat.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 08:12am 12 Aug 2024
Copy link to clipboard 
Print this post

  PhenixRising said  

This way, we never lose pulses and can run much faster. @Volhout was looking at using the PIO for handling pulse/direction commands.


Oops, forgot about that...
Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 09:01am 12 Aug 2024
Copy link to clipboard 
Print this post

  Volhout said  
  PhenixRising said  

This way, we never lose pulses and can run much faster. @Volhout was looking at using the PIO for handling pulse/direction commands.


Oops, forgot about that...
Volhout


No sweat....it's a future thing.

Right now, I'm prototyping a board to interface to a 4KW Yaskawa servo system. The encoder is 17bit (131,071 counts/rev) and runs @3000RPM...should be a good test  
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 12:35pm 12 Aug 2024
Copy link to clipboard 
Print this post

You will need to run the PIO at speeds I never tested (250MHz or more), and also the hardware interface to the pico IO pins will require lots of attention since the signals change with 30MHz.

Not loosing any counts will be pushin pico to the limit.
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 01:57pm 12 Aug 2024
Copy link to clipboard 
Print this post

Ah, meant to quiz you on this from an earlier comment you made about this; I suspect that you have this backwards....unless it's the way that the PIO code works(?)

For example; a line frequency of 500Hz, multiplies via quadrature decode to 2000 counts/second.

So, if this is the case, then we would be looking at 30MHz/4

My MC3486 line receivers are only good for 10Mbit/sec anyway. Galil Motion Control employ the same device and they boast a maximum count rate of 22M quadrature counts/sec.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 02:30pm 12 Aug 2024
Copy link to clipboard 
Print this post

Just to be clear, I am not stuck with this rate of feedback. Most CNC systems would choke at a few MHz.

Yaskawa connect their encoders to their drives via a proprietary "Mechatrolink". The drive has an encoder simulator output and the resolution is user-programmable.

Typical requirements for me (linear axis) are, max velocity 1000mm/sec and position resolution of 0.01mm. No point in going beyond this but I wanna see what the PicoMite can handle.

I have lots of experience with big dollar controllers and I can see already how this solution can make life soooo much easier for the motion engineer.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 04:23pm 12 Aug 2024
Copy link to clipboard 
Print this post

Sometimes these things just get silly...
SDR using a Pico and a couple of passives. Here
That PIO is fast!
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 04:36pm 12 Aug 2024
Copy link to clipboard 
Print this post

131000 states per revolution, 500 per second, is 65 meg changes per second, results in 32MHz max frequency.
The PIO needs 4-8 clocks per state change, so you must run 8x32=256MHz minimum.

Volhout

Edit:actually, the PIO may even require a clock of 512MHz, since is does not work on frequency, but on state changes. 65 meg per second.
Edited 2024-08-13 02:46 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6781
Posted: 04:46pm 12 Aug 2024
Copy link to clipboard 
Print this post

Good job 384MHz seems to be stable if you aren't wanting VGA then. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 05:04pm 12 Aug 2024
Copy link to clipboard 
Print this post

  Volhout said  131000 states per revolution, 500 per second, is 65 meg changes per


3000RPM = 50 revs/second though.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024