Author Topic: Closed loop control of DC motor  (Read 341 times)

Offline kamelryttarn

  • High Voltage Experimenter
  • **
  • Posts: 87
  • Karma: +0/-0
    • View Profile
Closed loop control of DC motor
« on: February 28, 2018, 09:41:26 AM »
A while ago I started a build of a simple (or so I thought) magnetic stir plate. I ordered a cheap motor on ebay and a friend helped me to 3d-print a holder for the neodymium magnets. I use and arduino with a mosfet to get speed control by PWM.

The problem was that the magnets locked on to the screws I used to mount the motor in the plastic case so it took quite a bit of force to get it to start so I thought I could use a closed loop to control the speed of the motor. I bought a new motor with a built in magnetic encoder that sends pulses when the motor spins. I wrote a small program for my arduino and connected the pulse output from the motor to one of the hardware interrupt pins. When I tried it I got very erratic behavior that I believe may be caused by the inertia of the rotating axel . Would you agree and do you have any good ideas what I can do to remedy the problem?

To understand the pictures better I will try to explain the code I used. Every time I got a change (either rising or falling edge) from the encoder, the mosfet channel is turned off and the arduino resumes the regular loop that has a pause time (to regulate speed) and the turns the mosfet on again. In the pictures channel 0 is the encoder on the motor and channel 1 is the mosfet driver. The last screenshot is from a test I did where i let the motor spin for a few seconds and the turned the mosfet off to see how long after the power was cut to the motor it still turned.

High Voltage Forum

Closed loop control of DC motor
« on: February 28, 2018, 09:41:26 AM »

 


* Recent Topics and Posts

post Re: My First DRSSTC
[Dual Resonant Solid State Tesla coils]
sjsimmo
Today at 08:08:58 AM
post Re: How to calculate VA rating and other things for Ferrite Core? (SMPS)
[Transformer (ferrite core)]
sjsimmo
Today at 01:24:15 AM
post How to calculate VA rating and other things for Ferrite Core? (SMPS)
[Transformer (ferrite core)]
FilipŠebík
January 18, 2019, 07:32:38 PM
post Re: How to design a 7.5kV AC source?
[Transformer (ferrite core)]
profdc9
January 18, 2019, 04:25:14 PM
post How to design a 7.5kV AC source?
[Transformer (ferrite core)]
CristianM
January 18, 2019, 03:48:06 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
the_anomaly
January 17, 2019, 02:01:36 AM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 16, 2019, 04:26:38 AM
post AC vs DC fuses, high current, explosive destructive testing and theory
[Capacitor banks]
Mads Barnkob
January 15, 2019, 09:48:48 PM
post Re: My X-Ray Machine
[X-ray]
neukyhm
January 15, 2019, 10:51:46 AM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 14, 2019, 05:08:38 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
the_anomaly
January 14, 2019, 01:15:53 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
Mads Barnkob
January 14, 2019, 12:22:07 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 11, 2019, 05:10:39 AM
post Re: My X-Ray Machine
[X-ray]
Max
January 10, 2019, 10:59:25 PM
post Re: 迎词、来
[General chatting]
profdc9
January 10, 2019, 06:56:59 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 10, 2019, 05:33:48 PM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General chatting]
black.yang
January 10, 2019, 02:11:58 AM
post Re: My X-Ray Machine
[X-ray]
Mads Barnkob
January 09, 2019, 09:14:59 PM
post Acoustic spectra of sung vowels by the FFT analyzer HP 3561A
[Electronic circuits]
Physikfan
January 08, 2019, 08:44:16 PM
post Re: IGBT failure in DRSSTC
[Dual Resonant Solid State Tesla coils]
Felix Bieri
January 08, 2019, 05:33:55 PM
post Re: Huawei RRU3928 1800MHz radio base station teardown (part 1 of 2)
[Radio frequency]
Mads Barnkob
January 08, 2019, 08:25:08 AM
post Re: SimpleDriver v2.3, my phase-shifting QCW DRSSTC controller
[Dual Resonant Solid State Tesla coils]
flyglas
January 08, 2019, 08:25:02 AM
post Re: SimpleDriver v2.3, my phase-shifting QCW DRSSTC controller
[Dual Resonant Solid State Tesla coils]
Hydron
January 08, 2019, 02:01:50 AM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Hydron
January 07, 2019, 10:23:38 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 07, 2019, 08:53:32 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 07, 2019, 08:17:44 PM
post Re: SimpleDriver v2.3, my phase-shifting QCW DRSSTC controller
[Dual Resonant Solid State Tesla coils]
Netzpfuscher
January 07, 2019, 07:37:53 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Uspring
January 07, 2019, 01:30:36 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 07, 2019, 12:43:26 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Hydron
January 07, 2019, 08:09:49 AM
post Re: SimpleDriver v2.3, my phase-shifting QCW DRSSTC controller
[Dual Resonant Solid State Tesla coils]
NEYi
January 07, 2019, 07:43:50 AM
post Re: Welcome new members, come say hello and tell a little about yourself :)
[General chatting]
Mads Barnkob
January 07, 2019, 06:48:06 AM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
January 07, 2019, 06:39:56 AM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 06, 2019, 09:23:19 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 06, 2019, 07:11:25 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Uspring
January 06, 2019, 07:02:14 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
flyglas
January 06, 2019, 12:43:46 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 06, 2019, 11:55:09 AM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
TDAF
January 06, 2019, 09:48:06 AM
post Re: First SSTC build, need help troubleshooting
[Solid state Tesla coils]
TDAF
January 06, 2019, 09:45:17 AM
post 关于: 这个便宜的 drsstc 驱动程序从 aliexpress 1.3 b 类型?
[Dual Resonant Solid State Tesla coils]
black.yang
January 06, 2019, 08:34:46 AM
post 迎词、来
[General chatting]
black.yang
January 06, 2019, 08:20:21 AM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
flyrod
January 06, 2019, 12:34:15 AM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
petespaco
January 05, 2019, 05:27:23 PM
post Re: Help for people buying the "12-48 Volt 1800/2500 Watt ZVS induction Heater"
[Electronic circuits]
flyrod
January 05, 2019, 03:46:29 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 05, 2019, 09:51:10 AM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
January 04, 2019, 11:02:25 PM
post Re: (DR)SSTC II
[Dual Resonant Solid State Tesla coils]
Laci
January 03, 2019, 08:38:15 PM
post Re: SimpleDriver v2.3, my phase-shifting QCW DRSSTC controller
[Dual Resonant Solid State Tesla coils]
flyglas
January 03, 2019, 08:15:48 PM
post Re: Component questions
[Dual Resonant Solid State Tesla coils]
Mads Barnkob
January 03, 2019, 02:05:31 PM

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30