Electronic Design

I spend all my time designing things electronic and trying to keep up with the need to learn the programming required. Currently I am biting my teeth on ARM based micro controllers.
 
  • Like
Reactions: Pattern-chaser

Pattern-chaser

Active member
I have always loved design. I wrote a blog some time ago, aimed at a fictitious young designer just starting out in firmware design. I hope you won't think me presumptuous if I ask you to read it yourself, rather than me composing the whole lot again? 😉 Here's the link: https://carelesstalkblog.wordpress.com/2017/11/30/now-is-the-time-to-say-goodbye/ For the purposes of my blog, your name is Sam. ... Don't worry, that will make sense when you read it. 🙂
 

Pattern-chaser

Active member
I'm not trying to muscle in here as some kind of elder statesman. I just want to talk about design with someone who is also interested. If I offer the wrong impression ... well, I'm autistic. 😉 I do my best. I hope I'm doing OK?
 

Pattern-chaser

Active member
"Currently I am biting my teeth on ARM based micro controllers."

I did quite a bit with ARM7 uCs, and a little with ARM9. But more recently, I used Cortex-M3 uCs. They're better for real-time firmware.
 

Thunderchild

Administrator
No feel free to fire away. I'll read the blog. I have just started out with Atmel/Microchip SAMC as I hope to work myself up to CANbus applications. These conveniently work up to 5V unlike the vast majority of chips that are limited to 3.6V. It's an M0+ core so hopefully simple enough to bare bones code. I looked at some of the start up code generators and gave up as to use them i need to understand the chips intimately at which point I may as well learn the chip and bare bones code it my way.
 

Pattern-chaser

Active member
No feel free to fire away. I'll read the blog.

Thank you. 😊 I hope it proves useful to you.

I have just started out with Atmel/Microchip SAMC as I hope to work myself up to CANbus applications. These conveniently work up to 5V unlike the vast majority of chips that are limited to 3.6V. It's an M0+ core so hopefully simple enough to bare bones code. I looked at some of the start up code generators and gave up as to use them i need to understand the chips intimately at which point I may as well learn the chip and bare bones code it my way.

Are you doing this for an employer, or for yourself?

Working alone, you are right that you do need to understand your uC platform well enough to code (say) device drivers. But if you start from scratch, and continue alone, you will have a lot of work to do. Without help, and depending on what you already know, this could be years of work. When I was starting out, I couldn't've coded something like that "my way", although I might've been tempted to try. 😉 Back then, I didn't know what design was, nor why it was important. 🙄 But I learned, and I got quite good at it, eventually. 👍

What language(s) do you use?
What editor/compiler/etc do you use?
How do you plan your designs? Do you use any particular methodology or practices?
Do you mind me asking all these questions? 😉
 

Thunderchild

Administrator
Well both myself and my employer. I have always been passionate about electronics and although I work for a mechanical company there is plenty of scope for electronics but they are not very interested. It's deemed a necessary evil I think. although I have now carved out an electrical/electronic role for myself now at the time I proposed a product that I devised myself and no one was interested so I started my own company. I do do electronic design now for them but as they are not very interested it it other than the results I just do as I please to the point that I use the same software and it's been an effort to get electronic project data included into the main record keeping system. I share my component library between myself and work as that way i can produce parts twice as fast without duplicating the work and confusing myself.

Yes I gather that ARM is a lot of work full stop unless I suppose you run some sort of OS. I mainly do simple controllers like measuring temperatures and controlling fan speeds. M0+ based units are more than sufficient to do what i want and rather than go for a dirt cheap STM I have opted for an Atmel that looks for all the world like it is aimed at automotive which is where most of my work happens now.

I use C at the moment. Not fully proficient but enough to write the sort of simple projects that I do. I am currently using Atmel Studio as it just works and I am not fussy about a particular IDE just that it works.

My designs are not too complicated but it has to start with the mechanics really. How will the circuit live in it's application. For example my last design is a circuit board on the back of a connector, so chunky is the expensive plastic IP rated connector that I decided to make use of it's imposing mechanical presence to be the mount point for the unit as it has holes for self tapping screws with the PCB on the back. The whole thing can be dropped into a potting box PCB first so that it can be potted part way up the connector and be a sealed unit that can be screwed in anywhere.

Any µC will do what i want. Currently i have done a little work with the new AVR mega's which are just microchips reincarnation of the xmega's that no one liked as they were 3.3V only. They are good for cheap little units but with a small SAMC ARM chip being only twice the price at £1.5-2 I may as well start to look at these as they are feature rich.
 

Pattern-chaser

Active member
I'm not sure how to proceed here. I don't want you to think I'm preaching. I really don't want to preach. I want to participate, and I want to be useful; of help. To that end, I offer the various blog posts I wrote soon after I retired. I think some of them might be useful to you. I hope so.

Here's the first one. They probably make most sense if you start there, at the beginning. If you read them all, it will cost you only a few minutes of your life. I promise. 🙂

Please let me know if they are of any help?
 

Pattern-chaser

Active member
Oh, I know I can speak freely. 👍🙂 I'm just applying my many autistic social skills 😳 to drawing you into a conversation about (software/firmware) design. 😉 Maybe hardware too, although it's a VERY long time since I designed hardware (1982).
 

Thunderchild

Administrator
Well hardware is what i can do a bit better. i fuss over my circuit board designs until i think they are just right. EMC is a big thing for me as much of what i do goes into a military application and they are very stringent. i watched more experienced people than me fail completely in this area as they did not realise how stringent it had to be. General low power/signal stuff is easy but any higher powers do present huge obstacles.
 

Pattern-chaser

Active member
EMC, and EMC testing, is a big thing in the industry. My colleagues used to estimate roughly a third of their labour on a project would be occupied with EMC testing, to all of the standards that all the international markets require. A skilled EMC designer/tester can command a significant salary. But the whole thing is a PITA, as they say. 😉
 

Thunderchild

Administrator
Well how does one know one is a skilled EMC designer and prove it? As far as I know there are no official courses in it. I did a module in my HNC but then learned they are dropping the module which is a shame as it's one of the few modules that was any use.

It is a black art but I have found it less hard than others to understand. At work we are trying to develop something that has to pass stringent EMC without being expensive which is crazy as the base parts we are starting with are totally not designed for the sort of we want.
 

Pattern-chaser

Active member
There is training and qualifications for EMC Engineers, I think. But bear in mind that the firmware was my bit, and the hardware was just something I heard my colleagues talking about. ;) One thing I do know: you can't do EMC testing quickly or cheaply. I hope yours goes well.

Will it have firmware, this thing you're working on?
 

Thunderchild

Administrator
Oh right. i went to an EMC event this time last yea but it was hopeless as it was just a gathering of various equipment suppliers with various talks going on. The speakers were pretty hopeless as it was a free event. I think one was very good but he does a 1 week course for £1'800 so spent 1 hour pretending to explain common mode noise by just making it sound harder than it was.

My project has a tiny amount of firmware, just enough to produce different PWM outputs when a button is pressed. The issue was the motors used are very fast with not even decent bypass capacitors so their EMI are horrendous.
 

Pattern-chaser

Active member
My project has a tiny amount of firmware, just enough to produce different PWM outputs when a button is pressed. The issue was the motors used are very fast with not even decent bypass capacitors so their EMI are horrendous.

It sounds like you're in the classic startup situation. The old Einstein quote "as simple as it can be, but no simpler" would seem to apply here. Your hardware appears to be too simple to achieve its assigned task(s), usually for reasons of cheapness. It always backfires, but it may take a while before its failure is obvious. If your customers are the ones to discover where corners were cut, you will lose them, no matter how cheap your product is. It's not cheap if it doesn't work, after all. 😉

This kind of thing is one reason why I (nearly) always chose to work in larger companies. They have their own problems, admittedly, but at least there is a possibility to do the job correctly. Not over-engineering, but just enough engineering. Firmware like yours still needs design, but the design should match the complexity of the task, and a small task only needs a 'small' design. 👍

Good luck! 🙂
 

Thunderchild

Administrator
Well the company is mechanical historically so electronics is new. There is a slight culture of what we don't don't know won't hurt us. The product is aimed at the defense market. It is very rugged and there is not really a problem with the product but the requirements of EMC are very challenging and often overstated. What is the point in totally passing the standard if it goes in another box anyway (the vehicle), but no one wants to retest a vehicle at that is very expensive so every subsystem is expected to totally pass in it's own right.

We once had a ridicolous shock/vibration requirement which was equivalent to the impact of a missile. If our system was to be subjected to such a shock it's survival would be meannigless as you would have killed the vehicle occupants anyway. But the customer was just passing the buck down the line which is a problem when you want to achieve something quite robust as suddenly it's not even doable. We could not even find a test lab in the UK to do the ridicolous test.

EMC is the hidden killer of our projects. i have a guy comming back in tomorrow do discuss what he is designing for us because I have sounded the alarm early and this time they are listening. We had a meeting all about how hto make one ECU work in several projects but we never really discussed the system architecture in terms of EMC.

My best description of what it's like to do design within EMC guidlines is that it's like trying to have sex with someone that has an STD without becoming infectected yourself....... Every wire has to be considered, where it comes from, where it is going and what is it carrying, it's easier said than done. I think for the current project we are OK on all components but for out actualy ECU that will pretty much end up galvanically isolated from everything else so that nothing can get passed around.
 

Pattern-chaser

Active member
EMC is a PITA for manufacturers, but we need it if the radio spectrum is to remain usable, not filled with noise and crap. The military have their own ways of thinking about things. Sometimes, they are a bit strange, as you've discovered. But all of these things are requirements that your design must meet, not impediments put in the way of your otherwise-much-simpler design. Your design must fit the world it's aimed at, so EMC is here to stay, I'm afraid. 😐
 

Thunderchild

Administrator
Oh yes certainly here to stay. You can't really do modern electronics without it. i remember hearing engine ignition system noises coming over a radio. The first SMPS cell phone charger I ever plugged in destroyed the AM reception on my radio.