top of page

Motor Controller Circuit and PCB Design

I was contracted to build a rotating speaker assembly for an amplifier company. The project as a whole is a multi-disciplinary effort, you can see more about the mechanical side of things here...

​

Before printing, these circuits were prototyped on breadboards and protoboards. The circuit includes... 

  • 24VDC motor controller circuit.

  • 5VDC microcontroller circuit used with amplifier foot pedal switch box.

  • Atmega88A chip

  • Adequate circuit separation via an optoisolator to mitigate any potential noise from the DC motor that may disrupt the microcontroller. 

  • Two power supply circuits to convert from 120VAC. Each unit also has the appropriate EMC components to mitigate electromagnetic issues.  

  • Factory calibration hardware so that a build tech can set the rotational speed of the baffle to specific frequencies. 

  • 1/4" TRS jack (Tip, Ring,  Sleeve) used to integrate with foot pedal.

PCB Design - Motor Controller: Text
PCB Design - Motor Controller: Pro Gallery

Embedded C Coding and Circuit Design

  • ATMega88A MCU embedded C coding was done using Atmel Studio. All code was uploaded and debugged via ISP using my Atmel ICE device. 

  • Schematic creation and PCB layout was done in EagleCAD.

PCB Design - Motor Controller: Text
PCB Design - Motor Controller: Pro Gallery

Button De-Bouncing

Two user buttons control the speed of the rotating unit. To have a responsive human interface I used interrupts to signal a change in duty cycle was required. Initially I didn't think about de-bouncing and I had incredibly unrelieable button sensing. Due to the switch bounce, the microcontroller was picking up on repeated interrupt commands.I implemented two button de-bounce solutions. In the hardware I added de-bounce capacitors, and in the software I used some time delays to check the input condition of my button pins to make sure the MCU only reacted to the stable button state.

PCB Design - Motor Controller: Text
20210529_235235_edited.jpg

Motor Noise and Observed Duty Cycle

Investigating the relationship between my PWM signal, observed motor duty cycle. My test circuit had a sharp response, and the duty cycle of my signal and the motor were very much alike. In my PCB I am observing capacitive tendencies within my MOSFET driver circuit which are effectively increasing the observed duty cycle. 

​

Additionally, I am attempting to reduce motor voltage ringing and motor noise with a change in PWM frequency.

PCB Design - Motor Controller: Image
bottom of page