Woohaa i try to figure out but there's too much 'maybe this or that' in my mind.
Can you post your whole code and schematic?
Woohaa i try to figure out but there's too much 'maybe this or that' in my mind.
Can you post your whole code and schematic?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thank you, mister_e.Originally Posted by mister_e
Tonight I've found that absolutely there is not the software that cause this so strange behaviour. Since the board is under control of another one that drive 2 bigger motors in PWM (24Vdc, anytime separated from the power of the logic but this 24Vdc are the same that power the tiny motors where I loose pulses), I've found the following:
If I let one of this bigger motor to use a little bit more power (just because I'm trying to move the shaft with my hand and the PID controllers try to oppose to my strenght) THEN the strange behaviour start happening. If I turn off one of these motors, the "strangeness" do not happen.
Seems that there is some kind of disturbance that is picked-up by the micro.
I've putted so many caps and grounded any unused pin as you can see... what can I do more?
Also, when I start missing pulses on TMR0 (RA4) seems that I pick-up many other "ghost" pulses on RB0...
Thank you for your time.
OR your power supply is not good enough to provide more power. Assuming a spike when you need more power, the voltage may decrease enough at the input of the 7805 to make this one unable to provide the stable 5Volt at the output. If the output of the regulator drop under the Brown Out voltage of your PIC, it may badly reset the PIC and send the PC to an unwanted program location. Hence do some strange behaviours.
How about if you use another transformer (let's say wall wart) to drive your PIC?
I'll have a look to your schematic.. maybe i could find something in.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thank you mister_e for the answer.
I forgot to mention that I'm using a commercial switching power supply for the logic that is able to deliver 4A at 12V. Then I slow down from 12V to 5 with the LM7805. The power supply is really bigger than my needs.
But let me explain what I've discovered next:
The board that is "misunderstunding" the pulses is inside a big metal case. This big metal case is connected to the earth ground throught the switching power supply, BUT not to the GND of my boards.
Then, when I was making my tests, a personal computer inside this big case was running in the same time. Then I was experiencing the erratic behaviour as I told you.
I found that the personal computer inside the case was running by ANOTHER power extension that DOEN'T HAVE any earth socket!
Now, I'm running this PC with the earth ground connected and SEEMs that this erratic behaviour is disappeared.
I Hope...
There is a logic in this?
Every missing earth or else ground could do something. Without seeing the whole it's a little bit hard but maybe you got one of the possible cause.
Ground bouncing, ground looping is sometimes hard to find... Well keep us posted.
Finger crossed!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Oh boy...
MAYBE I've discovered WHY so strange behaviours...
I was supposing that my DC motors provider got me a couple of motor with filters capacitors inside (just like the invoice said).
Instead I've found that NO CAPACITORS was inside the motors.
Now I've mounted a couple of motors with capacitors inside and still seems that anything is working...
The motors without the filter capacitors was a couple of big one that are not in the schematic I've posted, and seems that the disturbances are coming from the board that drive in PWM locked anti-phase these 2 motors.
Anyway, Steve, some good suggestion on PCB design to avoid disturbance as much is possible?
I'm using for the PWM section two LMD18201.
These 2 drivers are very close to the regulator section...
There is a ground plane on both side of the PCB connected to the logic gnd.
Thank you.
probably something like that
http://www.picbasic.co.uk/forum/show...14&postcount=3
and keep driver far from the regulators. Well, my idea.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks