A board I've been working on- need some feedback before I get it fabbed - Page 1
Forum section: electronics / projects

author: crispytato
author_rank: Regular Contributor
timestamp: September 11, 2013, 12:51:31 pm
content: Hi everyone. I'm working on an LED tail light setup for one of my friends who is into modifying his car. I'm going to be using LED strips and controlling the individual horizontal strips (about 2 watts at the duty cycle we'll be using it at).I've included my schematic, is there anything about it that looks as if it wouldn't work? The transistors are n-channel MOSFET, with low gate voltage so they should open up properly with pwm driving them.The H9 header goes to the ATMEGA that's controlling the lights. The other headers go to individual horizontal strips. Hopefully this all makes senseThe transistors I'm using seem up to the task, if anyone thinks they could suggest a better n channel fet that can be activated with a gate voltage/current thats not too high as to stay in the HC595's specs.

author: Andy Watson
author_rank: Super Contributor
timestamp: September 11, 2013, 01:15:15 pm
content: D1 to D8 won't light up.And does +12V really mean 12V ? It might be a bit too much for U2

author: mariush
author_rank: Super Contributor
timestamp: September 11, 2013, 01:34:04 pm
content: As Andy says, the leds D1 to D8 seem to be the other way around.As for the rest of the circuit, is the U1 even necessary? Can't you just get a few mA from the 5v in the header to drive that shift register?

author: Experimentonomen
author_rank: Regular Contributor
timestamp: September 11, 2013, 01:38:24 pm
content: This will be a illegal modification. Car lights have to be approved by various safety places, ie not something you can just diy and expect to work.The forum AllaboutCiruits.com have a zero tolerance policy on automotive modifications, its strictly prohibited there and should thus be here as well.

author: Psi
author_rank: Super Contributor
timestamp: September 11, 2013, 01:47:58 pm
content: Quote from: Experimentonomen on September 11, 2013, 01:38:24 pmAnd here i am wanting to replace my entire rear light clusters with a matrix array of 20x20 RGB leds and a MCU so i can dynamically divide up the led area into whatever lights need to be on at any time.- Only turn signal = entire array flashing yellow- Turn signal plus braking = half array red and half flashing yellow.etc..Maybe with transition effects where for example, the red area for showing braking slides in from the right over 0.5sAnd of course the big red button for "police mode" (flashing red/blue)Yeah, i am kind joking, but i still think it would be cool.

author: AlfBaz
author_rank: Super Contributor
timestamp: September 11, 2013, 02:03:22 pm
content: Quote from: Psi on September 11, 2013, 01:47:58 pmIf you were going that far you couldn't go past the big finger outline for tailgaters

author: Experimentonomen
author_rank: Regular Contributor
timestamp: September 11, 2013, 03:05:44 pm
content: If your tail lights are in need of replacement, then scrap your peoject and buy some from a car parts store that are approved.Any diy crap will only get you into trouble, either by the cops on the road or during the yearly roadworthy inspections.

author: crispytato
author_rank: Regular Contributor
timestamp: September 11, 2013, 03:27:37 pm
content: Here in NZ, the laws do allow for this sort of modification so long as it outputs an appropriate amount of light (ie, spread out and visible easily and at a correct angle) and doesn't dazzle other drivers. I've looked into it before I started working on the project. The guy who's car this is intends to show off the car thus the bling factor is what he wanted done.Thank you for pointing out the LED polarity, I'm always mixing them up...Psi, that was my original idea, but I wanted to cut down on the complexity level. I was going to do individually addressable RGB strip and have a full RGB panel, but with that level of complexity comes far more likelihood of potential crapping out while in use. I figure that I'll pwm control the horizontal lines and come up with a few more animations along with just proportionally brightening them based on brake pedal position. I had the idea of it filling up like pouring water into a glass, line by line as the brakes are progressively applied. All of that can be fairly simple with the addition of a pot and micro.I will be designing the controller board once I've got the code drafted up. I've since made the schematic into a board layout, and i'll be sending it to the fab in the next few days- once I can come back to the design with a fresh set of eyes. I'll include the diptrace files in this post just in case anyone is interested in my progress. I intend to make this into open source HW once I've completed the design and it's been actually testedI really hate the allaboutcircuits ban on car mods, its silly and stifles people's ideas. Anything you see here is to be consumed at your own risk. It's legal in my country to do this, and it's your own responsibility to check if you're in the same boat. It shouldn't be up to Dave or his mods/admin to censor information especially since I don't see how modifications that remain street legal could really be any sort of proper hazard...As for my use of the reg- I have a lot of 7805s laying round doing nothing, and I was concerned that since the car might be a noisy environment at times, I didn't want to be running long cables with power to avoid picking up any excess noise.peacechris

author: crispytato
author_rank: Regular Contributor
timestamp: September 11, 2013, 03:43:28 pm
content: I forgot to include this in my last post- its my second attempt at the board. It's 3.42 am here, I'm going to bed, I shall check the thread when I get up, and also have a look at the design with fresh eyes(I do realise the led's are still backwards, I shall be changing those tomorrow. I only checked the thread after finishing this first version of the layoutpeace

author: crispytato
author_rank: Regular Contributor
timestamp: September 11, 2013, 05:18:54 pm
content: This board is only one third of the system. Theres the LED strips and the MC board, which is going to be optically isolated from this (because it is running at "line voltage" on the input) and run on a seperate local supply. We were measuring voltages on the wiring today, and it was crazy how much it was jumping around.Or do you mean on the "12 volts" in? Should I do anything beyond a couple thousand uF of filtering?

author: RossK
author_rank: Contributor
timestamp: September 11, 2013, 05:42:21 pm
content: First, I know nothing about the automotive electronic environment apart from it should be considered hostile...1. use an automotive rated regulator - they normally have considerable built in protection and can take transients upwards of 60v or more2. place a PTC in the high side feeding the LED's to protect the system from shorts and reduce the chance of catching your FET's on fire. this could be extended to provide reverse polarity hookup protection by placing the PTC as the first high side device in your diagram then following it with a diode connecting to the low side (such that the diode will conduct if power is hooked up backwards, causing high current to flow through the diode and PTC which will trip the PTC and protect the rest of your system from the reverse hookup - your tank caps would blow up if power was hooked up backwards as-is).3. is this a 3.3 or 5v MC system? If its 5v then each digital IO from the MC will be asked to push 5/220 = 22.7mA which is very likely unreasonable, even if this is within specs i doubt the x8 of 180mA total current is within specs of the MC. even if this was 3.3v then each gate will draw up to 15ma resulting in 120mA total - is this in spec, remember that the MC will need to both source and sink this current? will the MC and regulator be able to dissipate the resulting thermal energy (i don't see even a ground plane under the MC)?Surface mount tank caps might not be worth the trouble or expense I would go through hole at that size and make sure they can withstand the transients and possible voltage inversions they may encounter (i wont suggest a voltage rating but 16v caps would be a bad idea).and... simulate / breadboard the circuit before you fab it

author: mariush
author_rank: Super Contributor
timestamp: September 11, 2013, 06:00:16 pm
content: I'd also suggest... go either all surface mounted, or use more radial parts.There are 7805 alternatives in to263 format or even smaller surface mount layouts and since it looks like you're only powering the shift register it won't heat up a lot.Those electrolytic capacitors may handle vibrations and shocks better if you'd go through hole and maybe gluing them down horizontally on the board with some selastic or something similar.A heatsink may be cheaper than the pcb surface... if those mosfets even need that much of a heatsink, maybe if you go with some to-220 or similar fets and you put them on both sides of a wide heatsink and shrink the pcb.Agreed with protections for over/under voltage... have a look for some regulators for automotive etc.

author: RossK
author_rank: Contributor
timestamp: September 11, 2013, 06:26:47 pm
content: Quote from: crispytato on September 11, 2013, 03:27:37 pmWhile i'm sure radiated EMI is a contributor I would imagine the primary source of damaging noise is from all of the inductive loads which are present on the power rail of a car. First there's the power source itself, it's not a battery, its an alternator. Then there's the cabin blower, the radiator fan, door lock solenoids, power windows and seats, compressors, and the list goes on and on - all of these inductive loads will contribute considerable noise - respect the inductive load

author: Kjelt
author_rank: Super Contributor
timestamp: September 11, 2013, 08:58:11 pm
content: Looking at your pcb, if it is one of a kind ok but if you want to mass produce: switch all SMD components on one side so you only need one time in the reflow oven and no glue. I personally have a bad experience with SMD elco's, in my reflow oven they sometimes pop off the board and also in consumer electronics they are one of the most weak parts in the design. So if it is not expensive or mass product I would replace them with through hole elco´s.

author: crispytato
author_rank: Regular Contributor
timestamp: September 12, 2013, 06:52:40 am
content: Well this has been a bit eye opening, I shall have to revise my schematic a fair bit in a few ways from the input that you've given me. I recognized the harsh environment and dirty as power line, but didn't realise that anything but exceptional cases would warrant the measure's you're discussing.I've never bought a mod or other type of transient suppressor of that type, what specs and numbers/letters/brads should I be scared of?I have been bread-boarding the HC595 circuit along with a few digital pins, but I'm waiting on LED strips to arrive in the mail before I go through with getting this design produced after reading some of the comments especially. The LED mounts in the board are for testing and verifying that it works without having to wait too long or cost too much going do wn the wrong path. Thanks very much for the input and not just saying, "that's stupid!" or something.I might make a toner transfer board for the chance to iron it out a bit further (hahahhaha) it'd be great to avoid any major mistakes before I send off the board for making the first revision.My intention with the final board was to go for fully smd, I was going to bend the to-220 down and silicone it in place. I shall instead install something smd, since you're correct when you talk about the amount of current being drawn, its very low comparatively.Is there an automotive version of the 7805 or LM317 in a similar point in the pricing scheme? what I mean, is jellybean status, something that wont cost an arm would also be sweet. Finding entirely suitable components can be one of the hardest parts of engineering I've found, searching RS or eBay for hours at a time just to get the exact one.I shall be searching for replacement parts for the module, and then try some of the ideas out that I've gotten on here- I shall post as I progress.peace

author: Experimentonomen
author_rank: Regular Contributor
timestamp: September 12, 2013, 07:11:52 am
content: I strongly discourage you to do this.

author: sleemanj
author_rank: Super Contributor
timestamp: September 12, 2013, 08:37:00 am
content: Quote from: Experimentonomen on September 12, 2013, 07:11:52 amHow much are the shares in your cotton wool factory Eperimentonomen, betting on the Aussie election didn't pan out so well so I'm looking for a new investment, sound slike you must have the market corneredChris, try Littelfuse parts for a TVShttp://www.littelfuse.com/products/tvs-diodes/surface-mount/p6smb.aspxMaybe the P6SMB15CA - RS has it in quantities of 10 and I've noticed that particular part is sold in very large quantities by chinese vendors (actually I have a few sitting here for a future idea when I find my round tuit).

author: ovnr
author_rank: Frequent Contributor
timestamp: September 12, 2013, 09:36:00 am
content: Quote from: crispytato on September 12, 2013, 06:52:40 amWell there's your problem: You're looking for parts in all the wrong places.But seriously, the points here are valid. You really need to be able to accomodate a very harsh environment, and will need a lot of protection. Hell, I've heard of people jump-starting their 12V cars with 24V batteries just because it's quicker. Good luck dealing with that, if your system is only able to take >12Vspikes!As to legality... if it's fine in the country you're in, no-one here has any right to tell you otherwise. And if they're trying to, at least back it up with a good argument why it's actually unsafe, eh? *looks at Experimentonomen*

author: crispytato
author_rank: Regular Contributor
timestamp: September 12, 2013, 09:40:13 am
content: sleemanj, thanks for the tip, I think that part would suit this circuit perfectly. I might look for a SMC size version just to feel safe in having got it a bit over rated rather than under...I'm looking at PTCs, I get the feeling that larger, multimeter sized THT ones might be able to absorb a lot more heat/energy, with all the lead mass and increase in size compared to smd footprints. I would very much like to keep the board as smd as possible, so that its the least possible hassle to find an apropriate mounting place. I'll include my latest schematic, I've made many of the modifications I got from here. I'm considering an adding an inductor to further filter the ~12v coming in, would this be a good idea? I'm also intending to add ferrite RFI chokes to any lines carrying serial data as a "just in case" measure.note, these resistor values need tweaking, I will need to get some of my mosfets before I can do that though.The changes are basically- moved to:LM2936-5.0for the voltage regs andAUIRLR3410n-ch power mosfet, they're uprated (and rated for automotive use) and also in a bigger package (dpak). Hopefully this will at least be a decent starting point. I shall have a go at the board a bit later on tonight.

author: MacAttak
author_rank: Unknown
timestamp: September 12, 2013, 02:24:08 pm
content: Not all cars need to meet those regulations, not even here in the US. You only need to do that if you want to have it licensed for public road travel. You can do anything you want on private property. You could install a V8 into a wheelbarrow and drive that around your property if you want.There are entire classes of vehicles that work fine (and some are safe too!), but which cannot be used on public roads. Many antique cars, highly customized "show cars", race cars, "kit" cars, and some types of tractors to name a few.So what if he does the modifications? If it violates vehicle safety regulations for public roadway access, then he just won't be able to get a license plate for it - no harm, no foul.

author: Experimentonomen
author_rank: Regular Contributor
timestamp: September 12, 2013, 07:38:50 pm
content: If you promptly must have led tail lights, just buy some that are approved and roadworthy. Personally i think leds have no buissness in car lights, every truck and lorry i see with led tail lights have like half of the leds dead despite the light looking like its brand new out of the box.LED tail lights are shit, everyone who have driven behind a car with led tail lights knows what i mean, a like 25-50Hz flicker which is highly annoying.

author: Kjelt
author_rank: Super Contributor
timestamp: September 12, 2013, 08:02:22 pm
content: Quote from: Experimentonomen on September 12, 2013, 07:38:50 pmAll your points are just bad design. If you have a PWM of less then 200 Hz on the leds yeah its gonna be noticed. On the other hand break lights should be noticed so maybe they did it on purpose as a featureI can tell you one thing for sure, Led as lighting (also in cars) are alreay here and they are here to stay.Even the front head lights are already leds in some brands and others follow very soon.

author: Corporate666
author_rank: Unknown
timestamp: September 12, 2013, 10:21:48 pm
content: Quote from: Experimentonomen on September 12, 2013, 07:38:50 pmI'm of two minds about this.(disclaimer: We design and manufacture various automotive lighting).On the one hand, it is bad when people start modifying their lights when they don't know what they are doing - and they often end up with a shoddy design that is illegal and dangerous. On the other hand, people get WAAAAY too "safety Nazi" whenever someone asks questions about it. If it's commercial, there are entities which handle the legal aspects of it. If it's home brew, people shouldn't assume people will use it illegally. We manufacture all sorts of flashers and "wig-wag" units and we sell them to everyone. Mostly it's police/fire/ambulance but I talked to a guy who is one of the leaders of the "Patriot Guard" here in the USA and they are using the modules for their parades and such.I disagree that LED lights are shit. They are great. Properly designed, they are brighter, instant-on, more reliable, a better color and quality of light, and allow for much cleaner stylings than old bulbs do. I love the new Mercedes Benz LED lights, for example.The flashing you are talking about isn't 25-50Hz, it's faster than 25 for sure, but nowhere near what it needs to be. Cadillac is terrible for this... their lights flash at a rate that is not entirely noticeable until you look away, then the POV burns a series of images into your retina, which causes you to think "wow, wha???" and look back at the light. It's very distracting.We PWM at 500Hz-1kHz and there is no visible POV artefacts.

author: Corporate666
author_rank: Unknown
timestamp: September 12, 2013, 10:29:02 pm
content: Quote from: crispytato on September 12, 2013, 09:40:13 amIs this a design you are commercializing or just something for a friend? If the former, you definitely need to do a lot more testing and R&D before you roll something out. In the USA, the SAE (IIRC) publishes a standard that automotive electronics must meet. Here is something similar for you to read through:http://www.advantech.com.tw/eservice-applied-computing/newsletters/white%20paper/Power_Challenges_Faced_by_Vehicle_Applications.pdfYou need to worry about load dumps, reverse connection, inductive transients, cold starts and such. As someone else said, automotive regulators are designed with high max input voltages for this reason.If you don't know how to adequately protect against these things, look into a component like the RBO40-40 from ST Micro. Part of the problem in automotive electronics is all this stuff is happening all the time (transients, etc), so you can design something that you test and it works OK and you say "great!" and put it into production. But it is getting hit with transients every day for months on end and fails after 3 months in the field. So a TVS is good... but if you use an 18V TVS and someone dumps 24V in, you're going to have a problem. The SAE spec lists what the requirements are for adequate protection.

author: crispytato
author_rank: Regular Contributor
timestamp: September 13, 2013, 05:16:42 am
content: Hey everyone, it seems I havent been clear enough with describing exactly whats up with my project.At present it's a custom design for one guy, that isn't going to be used on the road until we've assured ourselves that it all works 100% and isn't going to unintentionally cut out without anyone realising. which could be terrible. These board designs are just the first step of many more, I need a working led matrix so that I can go further with my designing.This board I am putting together, is my first revision. it will be mainly just used so that I can get the code up and running and tested before it ever gets to the car. I absolutely recognise the risks here and I'm being cautious of the law in all accounts. If anything I think this panel will be significantly more visible. The worry of refresh rate is really important to me, I shall make sure I get it high enough frequency that it's not an issue. Very useful to hear other people's numbers, thank you sirs)My intention is to end up with lights that act a little like the BMW lights in recent 1 series. They adjust for brightness of the light around them, and have variable levels of intensity based on brake position. all of it would be PWM done through the 74HC595 and into the d-pak switching mosfets. Ivr included a big fat footprint for a big ass protection device and a ptc also. I might include a regular fuse at the "main input" wire, before it even reaches the board, so as to protect shorts to ground. I've considered adding a smooth fade-off, over 20-30 ms, that makes the brake-off switchoff off a little smoother. Time will tell.The LED strips I have access to have been reliable as could be with clean supply power. I think I have the circuitry protected enough at this point to make it through development and testing. I shall address it with the final revision of the board if there are any inadequacies in the filtering, or noise etc.Being that they're not very expensive, and the led's are fairly sensitive, I had the idea of adding little PTCs in series with the led strips (one with each) in order to protect it from somehow getting shunted too much current through the circuit unintentionally. would it be wise to go that far, or not necessary?Here's my current layout. not all of the components are correct thus I'm not finished routing till I do that.

author: kizzap
author_rank: Unknown
timestamp: September 13, 2013, 01:27:47 pm
content: As people have stated already, you need to have a lot of decent protection in automotive circuits. I can't remember where I read it, but different devices have differing requirements and expectations on what they can do when there is a large spike. IIRC some devices can actually disconnect themselves from the supply till the transient passes. However I suspect this might not be allowable for brake lights.You need to look at input protection.Read this for some ideas.-kizzap

author: crispytato
author_rank: Regular Contributor
timestamp: September 13, 2013, 02:54:14 pm
content: I've been working away on the board tonight. I spent an hour or two looking through lists and datasheets for ptcs that would be suitable. I've found a few different models that would seem to be rated correctly so thus had footprints to work around. Would I be wise to look for auto-rated ptc's or some other tough variety, or would standard parts suffice? I didn't have much luck finding automotive specific ones really.I will be considering this as the ready-to-manufacture version of my board, but I'll give it a couple of days so I'm sure there's nothing missed! I also need to do up the silk screen a little more nicely in places, and double-check that I have all the right device footprints...I've learned a lot about surge protection in the last 2 days, I had no idea that tvs diodes existed until they were mentioned here, I'm glad to have broadened my knowledge a little bitHere's the boardThe only thing I still want to change on this particularly, is the vias I've grouped together. They were looking tidy and in-line but somehow got messed up while I was doing work. I will have to arrange them neatly before manufacture, I might also cut down on the numbers. Is the general rule of 1-1.5 amp per via reasonable to use?

author: mariush
author_rank: Super Contributor
timestamp: September 13, 2013, 03:33:40 pm
content: Why don't you turn the shift register 180 degrees and save on going on the other side of the pcb through so many vias? It looks like you may even be able to flip it by only 90 degrees and still get the design simpler...Also, if you use 0805 or larger for R1-R8, maybe you could route the trace UNDER those resistors so you won't have to go on other side.. that Y formed by the trace and the 8pin header on the back side of the board doesn't look so nice to me...But I don't have a lot of experience in pcb design so I could be wrong.

author: Corporate666
author_rank: Unknown
timestamp: September 13, 2013, 03:49:33 pm
content: Quote from: crispytato on September 13, 2013, 02:54:14 pmIs that big thing the RBO40?As for the vias, it's based on current capacity, temperature rise, copper thickness, etc. There is a good calculator herehttp://circuitcalculator.com/wordpress/2006/03/12/pcb-via-calculator/I never go above 1 amp which is usually fine for 1oz boards and 10mil finished holes on a 1.6mm FR-4 PCB. But usually you are charged drills based on density, and on a board as big as yours, you could add 100 vias and it would be the same price - so if I have the space, I add extras.Looking at the bcak of your board, you have 9 vias going into a trace which has a much smaller current capacity than those vias do. If that is a high current trace, why not make it a copper pour?

author: kizzap
author_rank: Unknown
timestamp: September 14, 2013, 01:46:06 am
content: Quote from: mariush on September 13, 2013, 03:33:40 pmHe would have to mount the IC on the other side of the board to get the traces to where he needs them, easier to just leave it at the moment. Besides it looks neat.crispytato, just check the size of the thermals on the TVS diode at the voltage input there, seems that they are a little small for the current the rest of the board suggests. Also can you not use the bottom copper fill for a ground plane? Seems like it would clean some stuff up there for you.

author: AlfBaz
author_rank: Super Contributor
timestamp: September 14, 2013, 02:52:31 am
content: I don't know what the power consumption is for each device but it appears you have thermal reliefs for all the components except the mosfets. Depending on how much power these items dissipate I would be tempted to do away with reliefs, meaning you either pre-heat the board before soldering or reflow it. If the power dissipation warrants it you could also stitch the top planes to isolated pads on the bottom for even better heat dissipation

author: crispytato
author_rank: Regular Contributor
timestamp: September 14, 2013, 04:41:38 am
content: Quote from: mariush on September 13, 2013, 03:33:40 pmThe first revision had the shift register mounted on the underside, it was neater with regard to those traces, but it ended up being a lot messier over all, I'd rather just keep it all on one side for now for simplicity's sake. IMO the vias are neat and keeps it all to single sided load which makes mounting the board more simple.I'm personally really not fond of routing in between smd traces, particularly in smaller devices. It just looks a bit messy IMO.The big chunky device in the middle-left of the board is my voltage regulator, the TVS diode I'm using is up the top in one of the diode packages.QuoteYou're entirely right, I don't know why i missed it the first time through, I shall enlarge that trace into a larger pour. I need to neaten up the vias anyway, so I'll just tear the whole patch up and start it again.