the most reliable low-end microcontrollers - Page 1
Forum section: electronics / general

author: Simon
author_rank: Unknown
timestamp: May 19, 2012, 05:50:49 pm
content: hi guys, I'm being promoted at work. I think I have pissed the works manager of to the point that he wants to unload me to the engineering Department, where they will be very happy to use my electric and electronic skills amateurish as they may be (although the current skills level in that department is lower). I've not done a lot with microcontrollers, and I guess most designs will benefit from them in what I will do (air conditioning control). So maybe it is time to make a new series start with microcontrollers, considering many of our designs go into military vehicles I would want the hardest thing possible without of course going nuclear proof and expensive. Which of the basic commonly available microcontrollers is generally preferred in these environments?what should I start to learn?

author: SeanB
author_rank: Super Contributor
timestamp: May 19, 2012, 06:10:09 pm
content: Use no micros, just a simple comparator and hysteresis.Though you can add more error checking with a micro, almost any one will do at the speed of the control loop. More important is watchdog, good noise immunity ( no 1.8V parts then) and providing a lot of input filtering and overvoltage protection on all inputs and outputs ( including parts that are disconnectable like displays and remote receivers), along with providing a power supply that is capable of surviving all the input will throw at it without failing.

author: Simon
author_rank: Unknown
timestamp: May 19, 2012, 06:25:33 pm
content: yes I would use Standard electronics where possible. But in some situations a microcontroller would make the design infinitely more flexible and much cheaper. I am just looking at the best of what is out there in the consumer market. At the moment all electronic devices we use are just consumer grade for the automotive market. As this is only air conditioning systems it is not a matter of life or death, I'm just looking at what is known to be the most reliable brand or which is the most not recommended.

author: SeanB
author_rank: Super Contributor
timestamp: May 19, 2012, 06:46:56 pm
content: If you think AC is not important you have not sat in a Saracen with a broken AC and with some deeply unhappy people outside asking to come in, and you are in the sun and are thinking that being a lobster in a pot is a lot more desirable.

author: Simon
author_rank: Unknown
timestamp: May 19, 2012, 06:52:13 pm
content: yes of course and we are already supplying units that have PIC microcontrollers in them. But then of course the supplier is not to know that I looked inside. We have not had any of these actually failed due to the microcontroller over the last three years. I am currently using PIC microcontrollers for the basic things I do, but have heard somebody mention not to use them in things like military. Or perhaps that person was referring to the fact that microchip do not guarantee their parts for military or medical use. This is despite the fact they produce parts for the military temperature range.so basically the question is should I favour Pic, atmel or any others or are they all about as reliable as each other?

author: SeanB
author_rank: Super Contributor
timestamp: May 19, 2012, 06:59:47 pm
content: Use whatever you are most comfortable with, and which has the right feature set and the right price point. Most important is to make the firmware as bug free as possible, and to reduce the chances that improper inputs and noise can cause it to malfunction. Range checking and sanity testing are good.

author: Simon
author_rank: Unknown
timestamp: May 19, 2012, 07:02:05 pm
content: so what you're saying is that most manufacturers are going to be all about the same for reliability. At the moment I'm using PIC microcontrollers, I'm not really sure why and I have no problem with them. I suppose really I need to start learning C now.

author: SeanB
author_rank: Super Contributor
timestamp: May 19, 2012, 07:15:34 pm
content: Silicon, mostly from the same suppliers. Wafers made to pretty much the same exacting quality standards and tested multiple times. Assembled into packages by a small number of specialist companies, and to pretty much similar high reliability specs.Yes, pretty much any big manufacturer will supply a good product, and parts that have been in production for a few years will have a good record for failure rates and reliability.I would suggest that physically larger parts are more reliable from just having more epoxy keeping moisture out, so the older PIC devices, which also are cheaper, are more likely to be reliable. As you say, you do not need super fast, all bells, just reliable, low cost and usable. If you have space and pins build in simple easy to use test routines, and document them. Works for both production and servicing, very important to think of the end user and the service tech who will either thank you or curse you for that.

author: free_electron
author_rank: Super Contributor
timestamp: May 19, 2012, 08:36:30 pm
content: Definately go with AUTOMOTIVE grade parts (-40 to 125) . don't use commercial stuff ( 0 .. 80 degree C ).Automotive grade parts are tested to more stringent parameters and may have a different internal construction for mechanical stability. Or go with industrial( -55 to 150 ) .The key in desiging automotive circuitry is the power supply and i/o protection. you need to be able to survive a load-dump ... like when disengaging the starter motor. those are enormous spikes !your entre design should be made automotive grade parts. from capacitor , resistor all the way to cpu...it is the ONLY way... al the rest is a kludge..

author: Zero999
author_rank: Super Contributor
timestamp: May 19, 2012, 10:43:08 pm
content: The trouble is, if there's any risk of people being killed by your code going wrong or a transistor failing short circuit, you could be in serious trouble.In a mission/safety critical application an ordinary micro will not do. It needs to fail safe and have a very level high reliability. The maximum acceptable failure rate will depend on factors such as the mission time and the consequences of it going wrong, i.e. severity of injury, loss of life, damage to property etc. The software has to be approved by an external body and there needs to be multiple levels of protection, i.e. a supervisor CPU monitoring the main CPU to check it's behaving and the hardware needs to be designed so a software fault shouldn't be deadly. In fact in a safety critical system the same level of scrutiny also applies to any component from a relay to a switch.I suggest you read more up on industrial controls and articles by manufactures of safety systems: Piltz, Allen Bradley, Siemens etc.

author: vxp036000
author_rank: Regular Contributor
timestamp: May 19, 2012, 10:49:01 pm
content: Having worked in defense before, I can tell you that it will be nearly impossible to overhall the design like you're describing without an enormous expense of re-design and qualification testing. And you'll need to get the customer to buy off on it. This could take many months, if not years.Quote from: Simon on May 19, 2012, 05:50:49 pm

author: Psi
author_rank: Super Contributor
timestamp: May 20, 2012, 12:09:30 am
content: In some situations you might be able to implement a system with 3 micros. (Like how airplanes have 3 flight computers).All micros run the same code and have their own dedicated powersupply.The system inputs connect to all 3 micros and the outputs are compared together with external logic to check for faults. etc.This way the system can stay running without interruption if one micro dies.It's overkill for most projects.but the hardware cost isn't huge and it does provide a good level of protection.Just a crazy idea.

author: IanB
author_rank: Super Contributor
timestamp: May 20, 2012, 12:21:51 am
content: Quote from: Simon on May 19, 2012, 05:50:49 pmWith military contracts there will be very stringent and precise specifications ahead of time. If your company already has an military contracts these specifications will be on file from previous jobs and you can read up on the requirements. On the other hand if this is a new area you are trying to get into, you will likely find there is a long and arduous qualification process to get through before you can be considered as a bidder. Either way this is something that will be of most concern to your executive management. Hate to say it, but you are just a pawn in the game...

author: free_electron
author_rank: Super Contributor
timestamp: May 20, 2012, 01:48:13 am
content: eh .. these are not mission critical. OP talks about airconditioning ...then again .. you are dealing with the military...And those can be totally bonkers.

author: Psi
author_rank: Super Contributor
timestamp: May 20, 2012, 01:55:23 am
content: Quote from: free_electron on May 20, 2012, 01:48:13 amAir Conditioning can definitely be mission critical.Refrigerated/climate controlled shipping containers for example.If they fail on a trip in the middle of the ocean the goods inside are ruined very quickly.It's such an issue that shipping companies often pay electrical, mechanical and software engineers to be at sea the whole trip even though there's normally nothing at all to do.You have 1000's of containers stacked up to many levels that are not easily accessible so they require constant monitoring and the software/hardware to do that.They need people there who can fix any issue instantly, just in case something goes wrong.And there are many other areas too, like medical storage.Also museum storage where old books/artifacts have to be kept at a constant temp/humidity to prevent deterioration

author: rsjsouza
author_rank: Super Contributor
timestamp: May 20, 2012, 04:49:00 am
content: Did you consider the Cortex R4's? They are usually automotive grade (as mentioned by free_electron before) and several have great peripherals (high resolution PWMs, CAN are among them).Although a lot more complex than your typical 8 or 16-bit micro, they will give you a lot of extra room if the specifications change (or keep changing every week...Not to mention there is a great variety of dev tools around...

author: Rerouter
author_rank: Super Contributor
timestamp: May 20, 2012, 05:01:24 am
content: though its a more obscure brand of micro, renasis micros are quite popular in electronic throttles in vehicles (i would guess second most important thing in a vehicle following brakes)

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 08:06:06 am
content: well this is all bearing in mind that I am not very good at programming, so I'm really looking for the simplest possible system. Performance should not really be a problem, as all this stuff should be doing is working a control panel, press a button to turn something on or off. I am actually thinking is the arduino an option? it's based on an atmel microcontroller so fairly reliable, and want to have a good program it should be good for good?

author: EEVblog
author_rank: Unknown
timestamp: May 20, 2012, 08:18:40 am
content: Quote from: Simon on May 19, 2012, 05:50:49 pmWell done!, enjoy the new role and never step back!If you want ultra-reliable then as a general rule you'd want to stick with the larger geometry devices, which are invariably the oldest (e.g. an 8051, 80186 et.al).And also companies that you can throw extra money to characterise them better.I think the 80x386 series are still popular in those circles?Here is an interesting list of what space probes have used over time:http://www.cpushack.com/space-craft-cpu.htmlDave.

author: EEVblog
author_rank: Unknown
timestamp: May 20, 2012, 08:21:02 am
content: Quote from: free_electron on May 19, 2012, 08:36:30 pmThat's pretty much the best easy way to go without having to get into special test/verification deals with the manufacturers.So you can get better than average reliability ensured, but still be able to buy your parts off the shelf.Dave.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 08:31:28 am
content: Quote from: EEVblog on May 20, 2012, 08:21:02 amcough cough my lot of very lax on that sort of thing. At best they just throw something so massive at it it will never go wrong. At worst they just take a chance on some shit they got from China or the bloke down the road that is no better than a hobbyist. I'm hoping to strike a healthy balance. Basically as I am at the very beginning with microcontrollers, it is prime time to decide which branch to go for with this new perspective in mind.Do I need to consider the software aspects as well? It seems most microcontrollers are used in automotive systems so once I have some working software is that it? I don't really think I want to go for a full blown CPU, as in a 386 or anything like that. This should be really basic stuff where a microcontroller will just be replacing a few chips to make better use of space or add that little function that would otherwise require lots of chips.In the little amount of work I have done for them electrically in the past I did go towards a microcontroller because the guy could never make his mind up what he wanted and kept changing his mind. So I know that a microcontroller might be a good idea even if just for that so that I can make that simple change in software and not have to redesign my whole PCB layout.yes really the most important thing in the design is going to be protecting against transience and load dumps, we have had issues with this in the past because we had an automotive grade thermostat with no protection, the customer then came up with a whole load of garbage to protect it from that and we had to accept it. I will be doing better than that.

author: EEVblog
author_rank: Unknown
timestamp: May 20, 2012, 08:52:13 am
content: If you have experience in PIC, then I'd just stick with that. Tons of options in the Microchip range, and one of the most popular in the industry.Dave.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 10:46:38 am
content: well yes I've used pic but I need to start afresh because the mikroe basic software is crap so I need a fresh start as a bobbiest as well as for work. Which is why I'm willing to switch. I don't know enough about pics for abandoning them a bit to be an issue for me, as the basics I do know are about valid on any microcontroller.I've ordered an arduino uno just to get me back into things at home at least, after all it is based on C which is better than messing about with basic.

author: Rufus
author_rank: Super Contributor
timestamp: May 20, 2012, 10:49:41 am
content: Quote from: Simon on May 20, 2012, 08:31:28 amThen you should read "Def Stan 61-5 Part 6". I think Issue 6 is current.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 03:48:35 pm
content: Quote from: Rufus on May 20, 2012, 10:49:41 amYes I have already done some work for them in measuring spikes from their own system to demonstrate to the customer that we are not blowing up our own thermostats. If I design anything I will build in spike protection which so far they have not done and relied on the customer's power supply to be protected. We had issues in the past where the control box would get blown up the first time the vehicle was turned on, then they would replace it and from then on it would be fine. Obviously a problem with the customers vehicle but they tried to blame us.

author: rsjsouza
author_rank: Super Contributor
timestamp: May 20, 2012, 04:19:08 pm
content: Interesting things to consider:Quote from: Simon on May 20, 2012, 08:31:28 amAlmost equally important as hardware. Software will be very important when dealing with electrically harsh environments. For example, noise on power may case the device to reset or trigger unexpected interrupts - in this sense you need to recover gracefully from these conditions without blowing up stuff along the line or "locking up" - the so-called exceptions. Typically larger CPUs have specialized hardware to deal with exceptions (the x386's or R4's previously mentioned, but there are others).Also, keep in mind that any CPU (complex or simple) is programmable using plain C language, therefore the core software (your main algorithm) can be easily portable across processors. The hardest is the software used to program each processor's individual features - mostly the peripherals. To reduce the efforts for this second scenario, watch out for the availability of example code from manufacturers and/or developers to program GPIOs, ADCs, PWMs, etc.Quote from: Simon on May 20, 2012, 08:31:28 amI don't know about 386's, but R4's (like the TMS570, for example) have built-in flash and RAM and therefore keep you from having to add tons of external devices. A clock circuit and the bypass capacitors are all you need to have the device up and running - similarly to a microcontroller.

author: nctnico
author_rank: Super Contributor
timestamp: May 20, 2012, 05:22:55 pm
content: For automotive their is a set of C programming rules called MISRA. These rules are intended to avoid many C pitfalls in order to create robust software.In my own software I use a lot of range checks in functions intended to be called by other modules. This helps to make sure an error doesn't spread like an oil stain. A bad parameter causes something to not work instead of crashing the program for an unknown reason.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 05:30:08 pm
content: guys I am not looking at engine management here or anything complex like that. Just controlling various devices in response to push buttons or other switches in the system for example pressure switches. If the system is to reset that should not be too much of a problem obviously it can't keep resetting perpetually. Given the small amount of power required by the microcontroller and associated electronics it should be relatively easy to protect it from spikes and load dumps. The problem my company have had in the past is that they have not bothered at all to try and deal with these things. It is not something that has ever been discussed with the customer. Most of the problems my company have are down to poor communication.In the very distant past we were cleverer, there is an air conditioning system we supply to a military end-user. The first thing in the system is a series of 10 movs in parallel. They obviously forgot why they use these, and these days don't bother any more. The reason these were putting I am told is because of the spikes coming off the alternator in the vehicle. I am guessing that with a 450 amp system there can be some powerful spikes floating around.

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 05:53:42 pm
content: Yes, a clean power supply is a very important thing. think of old Jaguars, a lovely exterior, but with a fuel consumption second to none, and electrics by Lucas, the prince of darkness.100v plus spikes with every plug firing, 5V of alternator noise on the supply, battery voltage of 6V during starting and load dump transients of 400V are vety common. You need to at least have on the power input a series resistor ( a polyfuse as well will be better), a reverse voltage diode, a transient suppressor diode and then an automotive rated 5V regulator with watchdog output. That, along with some electrolytic and ceramic bypass and reservoir capacitors, gives a clean power supply to the micro, and a reset input that will handle brownouts properly. A separate power relay supply with only basic overvoltage protection ( 40v transient suppressor and polyfuse) will then be used to drive compressor clutches from the battery supply.All inputs need at least a pull down resistor, a series resistor and a pair of catch diodes to a overvoltage protected bus, basically a diode isolated 5V rail ( fed from the main rail by a 1A schottky diode) with a 5.6V 1W zener across the rail, then a resistor to the micro input. This will survive any automotive voltage applied to it aside from the coil voltage. No direct outputs from the micro, at least a power transistor as a buffer, with a catch diode to the input rail if needed, and a transient suppressor across the transistor as standard, a 40V MOV and a 100V rated transistor works well here.All basic protection, adds a little to board space, but the saving in warranty returns will be considerable. You can make a model for each one and repeat as needed, a common BOM will work wonders with bulk buying and dropping per unit cost. About the only leaded items are the 1W zener and the MOV's, the rest are available as SM parts, and you can use SM parts for the MOV's if you parallel 2 lower rated devices as well.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 06:05:14 pm
content: Yes when I did do some testing for them they were finding it hard to believe that 400 V could come off of a compressor clutch coil. So I told the technical director, my oscilloscope may have been fooled but the shock I felt in my fingers when I held the PCB of the thermostat under test was unmistakable. In this case it was due to stupid design and a lack of back EMF diodes. Prior work back EMF diodes are a new thing apparently, although some people are pretty sure they were used in the past. In fact I found on some older projects a standard part on the parts list for relays are Relays with back EMF diodes built in. But that's progress. I'll be heading straight back to the dark old days, and then bringing us up to date.I'm not sure what point I will start doing electrics, the first thing they will put me onto is learning the CAD software and I will be a draughtsman mainly, I'm guessing I will be called on for electrics as and when needed. Hopefully I get through the CAD learning quite quickly and have time for Electronics. We don't need a huge amount of electronics were I work, but knowing them they will diving headfirst and get burnt when they do decide to go more electronic. I know that the one and only current electronic design is not turning out as easy as they thought. But then if you have an engineer asking you if a ground pin is an output or an input you don't really need to wonder why.the guy is going to retire soon I'm guessing I may replace him eventually

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 06:24:01 pm
content: If you are going to drive the clutch directly from the board I would recommend using a relay, and place a MOV across the output, 60V will do, instead of the catch diode. add a snubber and another MOV across the relay coil as well, 10R in series with a 100n 250v polywhateverwillfitthespace will be a good starting value. This will keep the spike to a sane level, but will allow the clutch to drop out fast. MOV's will have to be leaded big units, to have enough heat capacity to handle frequent switching while not burning the relay contacts. When selecting relays take care with inrush current ratings versus on current ratings.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 06:27:37 pm
content: Usually a decent back EMF diode is all that is needed for a compressor clutch. It is only one and a half amps and is only used "occasionally" as far as electronic timings go. Of course if you don't bother with one, you may be left wondering why you have 400 V at the thermostat that controls the clutch. I think due to the voltage it was jumping across relay contacts before they had the chance to disengage, or possibly jumping the small gap as the relay started to open.

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 06:37:35 pm
content: Are you sure it is 1.5A, i have seen many that draw around 5A, some up to 10A on initial engagement. The MOV is a lot better than a diode, it allows a small spark, and allows the coil to disengage the clutch faster, saving wear. The MOV's are available in many voltages, generally choose one of double the battery voltage and place across the contact.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 06:39:58 pm
content: the compressors we use all have a one and a half and clutch. I don't understand how a mov will allow the clutch to disengage faster, surely when you pull the power it disengages, but diodes will just take care of the back EMF in the coil.

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 07:02:52 pm
content: The diode allows current to circulate in the coil until the energy is dissipated in resistance and diode forward voltage drop. The MOV has a higher voltage and dissipates the energy faster, and thus the coil drops out faster.Look on it as faster dissipation of energy. With nothing there the voltage creates an arc across the relay contacts and dissipates the energy that way. Trade speed of opening with voltage spike.Analogous to a SMPS in many ways.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 07:08:49 pm
content: I see, if the clutch stays in for another fraction of a second that is not a problem. But if as you say a mov will dissipate faster that is good. But the mov will not go off until a set voltage, where as the diodes will immediately catch the negative peak. So I still don't understand how a mov is faster.

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 07:21:33 pm
content: The diode allows the current to circulate until it decays, with most of the power dissipated in the coil. The MOV dissipates most of the energy when it switches off. A negative spike on a relay output is no concern, you only have to watch out for excursions above or below the supply rails if you are using semiconductor switches instead of a mechanical relay, as then you might stress junctions that have limited energy handling capacity.Do an experiment, using a battery and the biggest iron inductor you can find, using the catch diode and the mov respectively, using a mechanical switch. Use a 10x probe and a high volt/div initially so as not to pop the scope. If you do not have a 60V MOV use a pair of 47V zener diodes back to back instead.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 07:25:55 pm
content: I see, well as the coil can handle that dissipation, it would not be a problem would it? Yes 60 V across relay contacts should not be a problem. But I would rather kill any negative spikes off altogether. If the clutch is controlled by semiconductor surely all the more reason to use a diode?

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 07:36:01 pm
content: Depends how the coil is connected. If you are doing a low side switch you just need to have a MOV across the coil connection, and a transistor with a Vce more than the mov rating at the current in the coil. A high side switch will need the diode to prevent the power device being pulled below the negative rail.A suggestion for the high side you can do with the catch diode is to place a zener in reverse in series with it, this allows the zener to do the dissipation without exceeding the transistor ratings. Zener needs a rating equal to coil energy, the mov is cheaper than a 5W zener, or you can use a TVS diode at a cost in between.

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 07:38:39 pm
content: Yes a TVS would be a good idea. But I'm not sure when you would ever see a positive spike, unless of course it was a power surge.

author: SeanB
author_rank: Super Contributor
timestamp: May 20, 2012, 07:46:47 pm
content: In low side switching the spike is always positive going................

author: Simon
author_rank: Unknown
timestamp: May 20, 2012, 09:11:27 pm
content: is it? I suppose it is, because the positive side of the coil is tied to the positive power rail and so still has a reference. But the negative side is floating and so the opposite polarity spike on it will go positive way above the power supply positive. But then I reversed diodes will still do the job, because the same logic applies but round the other way.

author: jerry507
author_rank: Regular Contributor
timestamp: May 21, 2012, 04:53:57 am
content: At page three the answers all seem to focus on designing systems for missile guidance, not simple control panels. Just go with an older PIC and use the internal watchdog timer. If you don't feel safe enough, use an external. Write your code from the ground up to use it, don't add it as an afterthought. Be careful about your inputs, low pass filters, series resistors or ferrite beads, even buttons. There likely isn't a thing you'll be using the micro for that will explode if your micro locks up, so don't be terrified by the doom and gloom people. Just make sure it's easy to reset the unit just in case it does lock up....

author: andersendr
author_rank: Regular Contributor
timestamp: May 21, 2012, 05:36:59 am
content: I know some of the Freescale micros have built in multiple CPUs and built in error checking for vehicle control systems. They will have 4 CPUs, 3 will execute code, while the 4th checks all their results. Not sure if these are available for sale yet. It was about a year ago we had a meeting with one of their design engineers and he was talking about this. FYI, we were evaluating these for use in fire truck/emergency rescue vehicle electrical control systems for use in the USA.

author: Simon
author_rank: Unknown
timestamp: May 21, 2012, 06:16:37 am
content: Quote from: jerry507 on May 21, 2012, 04:53:57 amThat seemed to be the case from the beginning, my main point was missed and most suggestions have been worded as though I was doing something highly critical. As you say this is just running a few basic devices and if the system resets it wouldn't be the end of the world.I don't know what the scope of arduino is and if I can use it in a commercial design but I'm going to start learning that for myself. Although having read the instructions on the website, I see they have suffered the same pitfall all my Microcontroller language designers seem to which is to explain a complicated Concept and then tell you about the basic elements in that when they should have done it the other way around. Try the page on how to The link and LED while you are doing something else.They never actually explain how to do something else but just some new code. And then you have to go to find out what that new code Means on another page because they should have explained it before they told you how to link the LED.

author: mc
author_rank: Regular Contributor
timestamp: May 21, 2012, 11:06:30 am
content: Quote from: Simon on May 20, 2012, 07:25:55 pmCommon automotive practise is you switch the high side with a relay, and don't do anything about the voltage spike at the compressor side. If an elctronic controller is used, then spike protection is built in to the controller to protect it from the relay, and that is usually just a diode. I don't think I've come across any compressor clutches that don't use a relay, as a relay was the easiest way of dealing with the inductive load, as they can handle the high inrush current, and are more than capable of blowing fuses if a fault occurs.I doubt this will change now, as most manufacturers are moving to variable output/swashplate compressors, which require a PWM supply to control output.

author: deephaven
author_rank: Frequent Contributor
timestamp: May 21, 2012, 11:55:01 am
content: Simon,As you are coming from a hardware background and have said you're not too much of a programmer I would suggest going for something like a PIC chip and program it in assembler. Assembler is a lot closer to hardware compared with C. I think you could relate much more readily to that rather than the virtualised environment of C.For example, you want to turn an LED on and off, here is the code:Turn it on: BSF PORTA,0 ; Bit set PORTA, BIT 0Turn it off: BCF PORTA,1 ; Bit clear PORTA, BIT 0The text after the ; are my comments, not part of the code.So that's the output. Inputs are just as easy with bit test instructions.

author: Simon
author_rank: Unknown
timestamp: May 21, 2012, 12:04:38 pm
content: I tried assembler a long time ago and nearly gave up on MCU's altogether (in fact electronics all together). I'm ok working more abstractly, I was ok with the mikroe basic system but it was buggy.The problem I have is people explaining a particular language are very good as telling you about something more complex before telling you the basics as though you know them already, and these will be people that are supposed to be teaching you from scratch.On the arduino page they explained how to blink a led, fine, then they said but you don't want to stop the program with a delay instruction so do this. An explanation then ensued where nothing was clearly explained and a new instruction suddenly appeared from nowhere, there was a link at the end of the page to its explanation but that was not much help after I had spent 5 minutes trying to figure out what the hell they were on about. And after all that they did not actually show you how to do something else while blinking the led which completely defeated the object as you were back to square one and knew how to do the same thing with different instructions. I mean duhIf you look at the explanation on PWM they made it almost child like, it just does not make sense.I'm willing to learn but teach me in the right order, if you use unknown concepts to explain a new concept you are explaining nothing at all. I'd rather have a book that goes through it in order rather than hundreds of interlinked pages that send you round in circles. Assembly may well be easy, but I'm yet to find someone who has the decency to teach it properly.

author: deephaven
author_rank: Frequent Contributor
timestamp: May 21, 2012, 12:22:41 pm
content: Quote from: Simon on May 21, 2012, 12:04:38 pmI can understand where you're coming from. I quoted an assembler example to show how easy it was to do something simple. I personally find assembler easier than, say, C because I'm a hardware guy and assembler feels closer to the hardware.I don't know if other maker's micros are the same, but there are a few gotchas when using pics. It is a must to look for any possible errata sheets to see if there are any odd little things that don't quite work correctly. Also things like remembering that on some of the chips, the analogue option on many of the pins is enabled by default and you have to set the appropriate register to make those pins digital.Once you've found the gotchas the hard way or the easy way, you're half way there.

author: poorchava
author_rank: Super Contributor
timestamp: May 21, 2012, 09:12:39 pm
content: Maybe I can throw some light on the automotive part (i'm a component engineer in company dealing with automotive safety systems).1) If you're going for really high reliabiliy, I'd consider for example Infineon. They deal mainly with automotive stuff, we use many of their controllers (16&32bit, no ARM though). You can also consider automotive versions of Freescale and Atmel microcontrollers. Atmels are widely known. For Freescale there's CodeWarrior IDE (which i believe is free for commercial use with some code size limitation). Some microcontrollers are even qualified for operation up to 150 *C (although many parameters derate at such high temperature)2) high side switching with a relay is a past. At least when dealing with DC power. Now smart high-switches are the way to go. They have orders of magnitude better endurance. They are pretty powerful (like 2x4A smart switch in SO14 package)3) protection diodes are a must when switching inductive loads.4) since you're doing commercial stuff, you'll probably have to deal with EMC compliance testing (i guess nobody wants ACC to suddenly switch to +40 *C because of some electromagnetic noise in the enviornment)I regret that I can't talk more specific (NDA and stuff)

author: Zero999
author_rank: Super Contributor
timestamp: May 24, 2012, 12:17:01 am
content: Quote from: SeanB on May 20, 2012, 07:36:01 pmWhy not just put a plain old resistor in series with the diode?It's much cheaper than a MOV/zener and the peak voltage can be calculated using Ohm's law. I generally recommend making the resistor's value equal to the coil so the pulse is no more than the power supply voltage plus a diode drop and the turn off time is halved.

author: Simon
author_rank: Unknown
timestamp: May 24, 2012, 04:41:55 pm
content: I still don't understand why just the diode is not the best option. No extra components to get hot or breakdown and the bulk of Dissipation is done in the coil that would normally dissipate that energy anyway. I know there may be some exceptions, but for general use I can't see an issue with just a diode.

author: Rufus
author_rank: Super Contributor
timestamp: May 24, 2012, 06:17:36 pm
content: Quote from: Simon on May 24, 2012, 04:41:55 pmIf a clutch disengages slowly there is a period where the clutch is slipping and wearing out the friction material. That may or may not be significant depending on the load, its momentum, and how slowly. I can't imagine how disengaging quickly would produce more wear.

author: Simon
author_rank: Unknown
timestamp: May 24, 2012, 06:21:14 pm
content: well from memory a back EMF spike is pretty fast. So wouldn't that energy dissipate quite quickly and suddenly stop causing a quick disengagement of the clutch? Yes the clutch may stay engaged for a bit longer than intended, but we are talking milli seconds which is irelevant to something that is turned on or off for minutes at a time.

author: Rufus
author_rank: Super Contributor
timestamp: May 24, 2012, 08:38:00 pm
content: Quote from: Simon on May 24, 2012, 06:21:14 pmWith a diode there is no spike. The current in the coil continues to flow and decays like any other LR circuit except with the complication of a 0.7v diode forward voltage in series and the coil inductance changing as the armature moves.If these clutches are a significant part of your product you ought to know how they behave and wear.

author: Simon
author_rank: Unknown
timestamp: May 24, 2012, 08:55:40 pm
content: Quote from: Rufus on May 24, 2012, 08:38:00 pmwell presumably they will be teaching me that of course there are other things like fans. and I'm not sure how we ended up talking about clutches it seems to have started because I gave the example that I had already had to help them on back EMF. As much as they forgot about back EMF on clutches they also didn't do much on fans either.

author: SeanB
author_rank: Super Contributor
timestamp: May 24, 2012, 09:08:42 pm
content: And don't forget that with fans they generate voltage as well when they are not powered, but have air blowing through them. As well you will have to remember the clutch and fan store considerable amounts of energy in the inductor, as well as having high currents. Best is to use relays to drive them, as you will have to do high side switching in almost all cases. The relays can be driven by mosfets, and you probably will want to use logic level mosfets that are rated for 60v drain, with a 47V zener across the mosfet, no other catch diode needed. Faster turn off, and the mosfet is protected. Faster turn off on a relay switching DC current means faster moving contact motion, and less arcing and wear on the contact. Funny thing about a relay is that mechanically it has a life of generally over a million cycles ( and I have seen some do tens of millions of cycles before they wear to the point of failing) while at full load it has a life of only thousands of cycles.

author: Simon
author_rank: Unknown
timestamp: May 24, 2012, 09:10:56 pm
content: yes I warn them about fan motors as well. The fans we use take 24 V and 11 A. So when they are turned off they generate quite some power from the fan that is still spinning with momentum.

author: Zero999
author_rank: Super Contributor
timestamp: May 24, 2012, 09:34:56 pm
content: All right I'll start from the beginning.Why it's important to engage/disengage a clutch as quickly as possible.Clutches dissipate more energy when they engage.disengage slowly, which is when slipping occurs and higher dissipation means more heat is dissipated.The more quickly the current through an inductor is interrupted, the higher the voltage across its terminals and vice versa. If you took a perfect superconducting inductor, placed an idea diode in reverse parallel with it, connected it to a constant current source and allowed the current to reach the steady state, then disconnected the inductor from the current source, the current would flow indefinitely. This is because there are no losses. If the diode were replaced by a perfect open circuit, the current would stop instantaneously and the peak voltage would be infinite. In reality, the situation is always in-between the two extremes. It's not a perfect inductor and there's never a true open circuit, an arc will occur at some voltage.To deactivate a coil as quickly as possible, you need to trade off maximum peak voltage for off time, the lower the peak voltage, the longer the off time will be.

author: jerry507
author_rank: Regular Contributor
timestamp: May 24, 2012, 10:03:13 pm
content: What is the lifespan of a MOV used in that fashion? My understanding of a MOV is that absorbing spikes reduces it's lifespan.

author: poorchava
author_rank: Super Contributor
timestamp: May 25, 2012, 12:32:12 pm
content: This varies greatly with type, technology and application. MOVs are generally meant for surges which are a fault condition, not which are expected. This is to say that if you expect regular surges/transients/pulses you should rather use Transil diode. MOVs can fail as sither short-circuit, open-circuit or constant resistance. On the top of that they they are not recommended by NFPA because they are recognized as a potential source of fire.

author: jerry507
author_rank: Regular Contributor
timestamp: May 25, 2012, 07:04:50 pm
content: Yea, that is what I have always done as well. The question I have then is what is the best way to quickly dissipate the energy stored in an electromagnetic field then? This can apply to either a electromagnet, motor or whatever. It seems like some form of diode with a beefy resistor actually dissipating the energy is the best solution then?

author: Simon
author_rank: Unknown
timestamp: May 25, 2012, 07:16:50 pm
content: by the sounds of it that is not a bad idea. But the resistor needs to be a small enough value so that there is not a large voltage drop across it that will do damage. I assume on the other hand it must not be too low otherwise there will be a considerable voltage drop across the coil instead.

author: SeanB
author_rank: Super Contributor
timestamp: May 25, 2012, 07:40:08 pm
content: I have seen lift motor brakes that used a varistor to absorb the switch off spikes. They worked well enough, and the Tech was kind enough to go and get 130V varistors from stores after i pointed out that a 400V varistor did pretty much nothing on a brake coil powered from 100VDC, and why the 130V units were not exactly good when used across a 230V rail.That was an expensive controller upgrade, the quote was controller only and installation, but the inspector insisted on a new trailing cable ( old one was gutta percha dating back to 1939 and was in good order, provided you did not mind an insulation resistance that precluded more then 48VAC across it before it leaked a little) and, 30m of 40 core flat cable later, it was replaced. 2 weeks later the cable was replaced again, along with the controller, as it turns out the 24VAC outputs did not work well with 230VAC applied to them as a result of the car cutting the cable after it settled in a lay that met with a sharp edge on the car frame. The inspector also insisted on repainting the room, new door locks, new power isolator ( I have the old 1939 made unit in my collection, complete with built in meter) and some other shaft and car upgrades along with new door switches, that brought the install price up to 5 times the quote, we only paid the quote price. Rest was because the lift had 30 years with them.

author: mc
author_rank: Regular Contributor
timestamp: May 28, 2012, 03:49:25 pm
content: Quote from: Hero999 on May 24, 2012, 09:34:56 pmIn theory, that's all true, however the type of clutches that Simon is on about won't be killed by slow switching of, unless you somehow manage to make them take several seconds to fully drop out. Provided the power to them is cut smoothly, they'll survive, as they're designed to be controlled by a simple switch/relay. Only reason for back emf protection, is to protect what's controlling them.