Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:12 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Many CPU execptions...

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:24am 21 Feb 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 6283
Posted: 06:36am 21 Feb 2019
Copy link to clipboard 
Print this post

What device?
What firmware version?
what CPU speed?

Jim

VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9610
Posted: 06:42am 21 Feb 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 06:43am 21 Feb 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 6283
Posted: 06:43am 21 Feb 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 06:56am 21 Feb 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 655
Posted: 08:44am 21 Feb 2019
Copy link to clipboard 
Print this post

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

PEdited by PeterB 2019-02-22
 
mikeb

Senior Member

Joined: 10/04/2016
Location: Australia
Posts: 174
Posted: 05:37am 02 Apr 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 07:11am 02 Apr 2019
Copy link to clipboard 
Print this post

[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: Australia
Posts: 655
Posted: 10:31pm 02 Apr 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 10:40pm 02 Apr 2019
Copy link to clipboard 
Print this post

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: Australia
Posts: 1642
Posted: 02:13am 03 Apr 2019
Copy link to clipboard 
Print this post

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 Zealand
Posts: 9610
Posted: 02:18am 03 Apr 2019
Copy link to clipboard 
Print this post

Bloody hell!
Again?!

One moment.....

OK, deleted a few pages of messages - try now. Edited by Grogster 2019-04-04
Smoke makes things work. When the smoke gets out, it stops!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2170
Posted: 07:40am 03 Apr 2019
Copy link to clipboard 
Print this post

popular boy!
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025