![]() |
Forum Index : Microcontroller and PC projects : Many CPU execptions...
Author | Message | ||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
This is tonight's electronic plaything that is having a go at me: ![]() Every time I run the program, I get a DIFFERENT CPU exception, which leaves me scratching my head. ![]() This is the code: ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
What device? What firmware version? what CPU speed? Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Sorry. 170 MM2 chip, SSOP Version 5.04.08 Boot-up speed. 48MHz. I'm playing with the train-controller thing from a year or so ago: ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
UPDATE: Problem goes away, if I remove the motor. Perhaps I need a bit of decoupling on the supply, as it is not on the board to save space. Smoke makes things work. When the smoke gets out, it stops! |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Works OK for me on a MX170 28pin running V5.5.2 speed 40 VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Yes, I need decoupling. I soldered a 470uF 16v cap across the bridge, and now the motor works fine forward and reverse. The only problem is how do I fit a nice big juicy decoupling cap on the board... The cap is almost as big as the PCB is. ![]() Thinks...... Smoke makes things work. When the smoke gets out, it stops! |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
G'Day Grogster Back when you started this project I asked if model railway motors are brushless yet. You didn't know and given your current problem I decided to investigate. Things have changed since my kids had these things. You now have a choice of brush, brushless or coreless. Then you cab select gearboxes etc. etc. If you have a brushless motor it is possible that your big electro. is not needed. Good luck Peter edit For cab read can P |
||||
mikeb![]() Senior Member ![]() Joined: 10/04/2016 Location: AustraliaPosts: 174 |
Forgive me saying so Grogs but "Who the hell does a bridge rectifier without a capacitor ? All you end up with is 100Hz positive going pulses. Hard to predict what the motor will get with an L9110 fed with that. I take it you are using PWM. Obviously be careful of your DC voltage. It is now the peak @ 1.414 x the RMS value with a suitably sized 'smoothing' capacitor. BTW Thanks to you, and Rozee, for the E28's. They're great little buggers. (A loyal customer :) ) There are 10 kinds of people in the world. Those that understand binary and those that don't. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
[Quote=mikeb]Forgive me saying so Grogs but "Who the hell does a bridge rectifier without a capacitor ?[/Quote] Well....an idiot. ![]() Yes, that would be me.... ![]() I think this is certainly where the problem is, but I just did not have the physical room for one. I will look at improving this bad design. Smoke makes things work. When the smoke gets out, it stops! |
||||
PeterB Guru ![]() Joined: 05/02/2015 Location: AustraliaPosts: 655 |
mikeb & grogster I have no experience with the 9110 but I would have thought it would be quite happy with "lumpy dc" but the 12V limit is going to be a killer. Is there any good reason to use ac. A regulated SMPS at 11.99V could be a good thing. Grogster, have you bought your DSO? You are going to need it ![]() (Only joking about the 11.99) Peter |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
When I was playing with these modules, I was actually running them from DC, so in some ways, this should not have been an issue. I think the REAL problem was that without the reservoir cap on the board, when you try to PWM the motor, the load causes a little voltage drop, and that is enough to piss off the processor. ![]() When driving motors, I would have liked to include around 1000uF/100n, but there was simply no room on the PCB. I might just have to stick with soldering the electro across the bridge and leave it at that. So long as I can get it inside the model.... Smoke makes things work. When the smoke gets out, it stops! |
||||
Turbo46![]() Guru ![]() Joined: 24/12/2017 Location: AustraliaPosts: 1642 |
Grogster, I sent you a PM but your mail box is full! Bill Keep safe. Live long and prosper. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Bloody hell! Again?! One moment..... OK, deleted a few pages of messages - try now. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
popular boy! ![]() |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |