Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Pic18f485 / Error on values when everything is connected

Status
Not open for further replies.

Zwilorg

Member level 5
Joined
Oct 13, 2010
Messages
89
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
1,906
Good day,

I am having a weird error.

I assembled together a some parts (Max IC for reading temperature, a stepper motor, LCD, a bunch of buttons, LEDs, Rs232 connection)

Everything is running at 5V except the Max IC which is on 3.3V and the motor at 20V 4Amp.

The logic part of the drive of the motor also works at 5V.

The pic reads the temperature from the thermocouple and acts as an encoder by reading the steps of the stepper motor.

The problem is as follows:

When i connect everything except the motor all runs fine. The values that the PIC sends over Rs232 and the ones i read on the LCD are correct.

However when i connect the logic part of the motor the temperature value goes to half (even less sometimes) and the position of the motor sometimes has spikes from 300 to 1300 then going back to 300.

Anyone has any idea about this problem?

Maybe i could use some sort of relay to separate the Pic from the drive, no?

Thank you in advance
 

Make sure the PIC VDD and VSS lines are properly decoupled. Connect 0.1uF ceramic capacitors across all VDD and VSS pins. Connect a 0.1uF ceramic capacitor from MCLR to ground. Connect an electrolytic capacitor (between 10uF and 220uF) between VDD and VSS. Connect a diode between the regulator input and input source. Connect a bulk capacitor and a bypass capacitor between regulator input and ground. Filter the motor drive supply as well with a bulk capacitor and a smaller bypass capacitor in parallel.

This should fix the problem. Try it and see the results.

Another thing you could try is to isolate the drive section from the power section by having two power supplies and using an optically-coupled driver stage for interfacing between the control and drive stages.

Hope this helps.
Tahmid.
 

Anyone has any idea about this problem?

Maybe i could use some sort of relay to separate the Pic from the drive, no?

How are you currently driving the Stepper Motor? H-Bridge, Darlington Array, etc?

Can you post a schematic of your design?

Have you ensured a common ground?

You maybe experiencing Back EMF from the Stepper Motor coils.

It is difficult to provide definitive advice without reviewing the actual circuit/design.

The bypass and filter caps which Tahmid suggests are a good start, however you maybe dealing with even larger issues.

I'm also confused about your following statement and references to the position of motor spiking between 300 to 1300:

However when i connect the logic part of the motor the temperature value goes to half (even less sometimes) and the position of the motor sometimes has spikes from 300 to 1300 then going back to 300.

Can you elaborate? What model of Stepper Motor are you utilizing?

BigDog
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top