Im using DSPIC33EP512MC806 to drive a Stepper motor, Schematics is attached below. driver works ok at low voltages ( 15 or less ) and low currents ( 2A or less ) at higher currents or voltages the PWM module resets randomly.
can some one tell me what is the issue. design worked before with SM72295 driver IC and risistive current sensing.
PWM Modules are Init with fallowing values
PTCon: 0000
PTPER: 123A
DTR1: 03E8
ALTDTR1: 03E8
IOCON1: C000
PWMCON1: 0400
LEBCON1: FC3F
LEBDLY1: 03E8
FCLCON1: 0003
PWMCON1: 0400
TRGCON1: F000
IOCON1: C000
RCON: 0000
but after pwm stped all of them are reset to there POR values
PTCon: 0000
PTPER: FFF8
DTR1: 0000
ALTDTR1: 0000
IOCON1: 0000
PWMCON1: 0000
LEBCON1: 0000
LEBDLY1: 0000
FCLCON1: 0000
PWMCON1: 0000
TRGCON1: 0000
IOCON1: 0000
RCON: 0000
if i code the MCU to print out the values at fixed intervals i some time get response with some of them reset to POR values other have random values
Any idea what cause this ?
Firmware Developed in MikroPascal for dsPIC
DSPIC33EP512MC806 PWm Reset randomlly Can some one help
DSPIC33EP512MC806 PWm Reset randomlly Can some one help
- Attachments
-
- MCU2.PNG (39.81 KiB) Viewed 3881 times
-
- MCU1.PNG (79.6 KiB) Viewed 3881 times
-
- HBridge.PNG (53.04 KiB) Viewed 3881 times
- lana.arsic
- mikroElektronika team
- Posts: 1715
- Joined: 15 Jan 2016 12:50
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
Hi,
Welcome to the MikroE forum.
Did you try to watch signals with oscilloscope?
If you have access, can you try to measure it from output of ACS712?
Kind regards,
Lana
Welcome to the MikroE forum.
Did you try to watch signals with oscilloscope?
If you have access, can you try to measure it from output of ACS712?
Kind regards,
Lana
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
I did and attached is the DSO plot
- Attachments
-
- Capture.JPG (146.67 KiB) Viewed 3621 times
- lana.arsic
- mikroElektronika team
- Posts: 1715
- Joined: 15 Jan 2016 12:50
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
Hi,
From the image which you have sent,
it seems like some noise, it doesn't seem to be an issue.
But from your description it seems that it is hardware issue,
that something influence on MCU like voltage spikes,
so I have consulted with our developer.
You can try to place resistive load instead of motor,
i.e. instead of A and B coils to place only resistors
which could work with high current.
Then you can try to use higher current at which your system reset previously,
and if it resets again then it means that you probably have some issue with ground.
If it doesn't reset you can see that something doesn't
influence on microcontroller.
Kind regards,
Lana
From the image which you have sent,
it seems like some noise, it doesn't seem to be an issue.
But from your description it seems that it is hardware issue,
that something influence on MCU like voltage spikes,
so I have consulted with our developer.
You can try to place resistive load instead of motor,
i.e. instead of A and B coils to place only resistors
which could work with high current.
Then you can try to use higher current at which your system reset previously,
and if it resets again then it means that you probably have some issue with ground.
If it doesn't reset you can see that something doesn't
influence on microcontroller.
Kind regards,
Lana
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
Any idea what is the issue with ground cos one before i tested with resistive load and it did happen.
any ideas what caould be the issue
any ideas what caould be the issue
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
hi,
I tested with 12V blubs and it des not seems to stop. at lest till the blubs burnt out.
but it did happen ones when i turn on it for the first time, but after i reset not happen. ill test with 24V blub tomorrow.
last time i tested i noticed if i connect and disconnect the terminals ( causing a spark ) it turns off
Any ideas what could cause ?
I tested with 12V blubs and it des not seems to stop. at lest till the blubs burnt out.
but it did happen ones when i turn on it for the first time, but after i reset not happen. ill test with 24V blub tomorrow.
last time i tested i noticed if i connect and disconnect the terminals ( causing a spark ) it turns off
Any ideas what could cause ?
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
Hi
i tested today with 24V bulbs ( Risitive load )
and the driver did not turn off with them.
but with the motor alone or motor with blubs in parallel the driver turns off
Any info will really help
i tested today with 24V bulbs ( Risitive load )
and the driver did not turn off with them.
but with the motor alone or motor with blubs in parallel the driver turns off
Any info will really help
- lana.arsic
- mikroElektronika team
- Posts: 1715
- Joined: 15 Jan 2016 12:50
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
Hi,
I will consult with our developer,
and let you know about conclusion/suggestion.
Meanwhile, can you put your decoupling capacitors
as close as possible to VCC/GND?
Kind regards,
Lana
I will consult with our developer,
and let you know about conclusion/suggestion.
Meanwhile, can you put your decoupling capacitors
as close as possible to VCC/GND?
Kind regards,
Lana
Re: DSPIC33EP512MC806 PWm Reset randomlly Can some one help
decuppling caps are right under the Vcc Pins and bottom layer is used as ground power plane