I have a filament winder project that uses a DC motor whose speed is controlled by dialing a potentiometer. There is also a servo which moves a guide back and forth across the spool as the filament winds on. When you press and hold a button, you can use the potentiometer to position the servo to set it's min and max positions. I had this working with a breadboard and an Uno, and am now trying to set it up with a custom board. I basically did a PCB version of the breadboard Arduino, using a 328 that came with an Uno bootloader and ran traces around to the various connections I need.
In this version, the potentiometer does nothing while the servo jerks around all over the place. When I hold the button, the potentiometer positions the servo just fine. The motor does not run until I turn the potentiometer up to it's full extent, at which point the motor turns on full and the servo stops freaking out. Unless it is turned all the way up, it basically acts as if the pot is unplugged altogether.
If I disable the servo by commenting out its assignment
// servo.attach(guidePin);
then pot controls the speed of the motor the way it should. I originally tried removing any code that commands the servo, but it didn't work. If there is a servo object assigned to the pin and nothing after that, it will misbehave. The pin assigments are correct, the servo and motor are both on PWM pins and the motor is run through MOSFET and diode. Any ideas on where to look for the problem?

