Attiny25/45/85 FW Development Thread

diptrace - I've heard of it for sure. Maybe the guys here @work use it, because it sounds very familiar - I'll ask around.

So, it can do the full PCB design, and generate the files in a format OSHPark accepts? If so, it sounds so much better than Eagle...

Quick schematic:

Thick lines are the main current path. 7135 not shown.

C2 and R4 are optional, but recommended.
If C2 is not used, C1 should be moved over to its position.
R5 is the new resistor, 1 to 10 ohms.

I’ve just this week been looking for a pcb design software. I was going to try eagle but maybe I should try this? Which is best for someone just learning?

I want to layout a charging circuit in 16mm pcb. Then I will transfer the parts from a basic charging circuit from eBay. I can then use direct drive driver in some lights without sacrificing the charging circuit. Many lights now come with this feature.

Dang, I'd be very much interested so please post when you get it goin.

DipTrace should be good to go for OSHPark, if that's what you want. See their DipTrace notes here: http://docs.oshpark.com/design-tools/diptrace/

Here's the page listing all the design notes for Design Tools: http://docs.oshpark.com/submitting-orders/

I've never worked with a PCB design package before, but think'n of looking at DipTrace - gotta do some research on it to see if easier than Eagle. Like that schematic support mentioned by Texas_Ace, and it was also recommended by a super tech I work with, who does all our PCB designs at work.

DEL - that schematic looks really good!! I think we can fill in all the values at this point? Also, I'm thinking the R5 resistor will impact the voltage monitoring values I currently use, since it's before R1?

It’s great, we really need more of those for drivers. I’m wondering, do you know what the point of C1 is now? I mean what’s the advantage of having the large C1 before the diode with small C2 next to the MCU vs just putting the large capacitor next to the MCU? Is the smaller cap better at really short current bursts (eg. like the one to charge the FET gate)? Or something else way above my head? I think I need to find a good book on the subject.

R5 is so small compared to R1/R2 (even with the default R1, R2 values) that it will have practically no impact.

I would say these are good ball-park numbers:

R1 : 22 k (or 220 k for e-switch lights, like you have been using)
R2 : 4.7 k (or 47 k for e-switch lights)
R3 : 100 k
R4 : 47 ohm
R5 : 4.7 ohm

C1 : 10 uF
C2 : 0.1 uF

Re. the need for C1, we can probably get away with only one C if space really does not allow for both.
Having it before or after D1 is a trade-off, will have to compare the performance.

Ok. i will do that. Ive not done this before, but i already know the circuit. so if i can learn how to do a basic layout, it shouldnt be too hard.
I guess ill try DipTrace then since i know it will interface with oshpark

In reference to the schematic above “[schematic]”:Attiny25/45/85 FW Development Thread - #1005 by DEL .

Comparing three options, C1 + C2, C1 only and finally C1 moved to the C2 position:

This time trace 2 is the voltage at the C1/D1 node on the schematic. Zero for all traces is again the 1st div line from the bottom. Traces 1 and 2 are scaled 1 V/division. Traces 3 and 4 are 2 V/division to fit the peaks.

R5 gives a major improvement on what we had before with all three options.

Removing C1 and changing C2 to 10 uF looks pretty good at pin8 (yellow), but keep in mind trace 2 (light blue) is what is going to R1+R2 (the ADC). We can always move R1 as well, this is what is done on the nanjg 105 drivers. But then we have to fudge a number for the D1 voltage drop in firmware.

Not recommended, C1 removed and C2 only 0.1 uF, but it gives an idea of what the MCU will put up with:

Note the peaks at pin 8 (yellow trace) is at 6.6 V. Imagine where it is at when the MCU starts to freak out. Tough little chips.

I honestly can’t recommend it enough over Eagle. After using diptrace for a few minutes I uninstalled eagle as I knew I would never ever use it.

Seeing as they are both free, you can naturally try both but I highly recommend you start with Diptrace.

I will try to snap some screen shots of my work in progress SRK driver later.

It is used by a lot of deisgn firms so it would not surprise me if your coworkers use it.

It may not be the best thing out there but it is Free and is 10x easier and more capable then eagle.

Yep, it allows you to draw out the schmatic (or download one naturally) then you can transfer it to PCB design mode, draw out the PCB size and then it will try to place the components automatically. Although with these tiny boards we use it is generally best to lay it out yourself.

It can then auto-rought the traces but once again this is generally best done yourself with these tiny boards. This is quite easy though as it knows where everything should connect and will tell you if you make a mistake.

The best part is when it comes time to change things later, you simply change a component in the Schmatic, import that change into the PCB and it takes care of the rest!

There are a few learning curves but I picked it up in under an hour. Where as with eagle I never could get it to do what I wanted, how I wanted. They also have great video walk-throughs for Diptrace.

The biggest hurdle I had was drawing the exposed copper pads to soldering springs to and the like, it is not that hard to do, just took some creative thinking to get it right.

I downloaded diptrace but the first component I needed was not in the database. With these programs, do you need to import the components you need? The component I needed was the TP4056.

You can generally find components online but there is another program that is part of the diptrace “suite” that allows you to build a new component from the data sheet easily.

Although honestly for what we do, all that really matters is that it is the right type of component so the schematic shows the right symbol (although this is not even a must as long as you are only making the layout for yourself).

The one thing that must match is the package of the component, in your case SOP-8. As long as you find a component with an SOP-8 package it will work fine. There are a few ways to search the database as well, some work better then others for finding specific parts and you can also search by package as well.

On a common package like that you can pick a random component in that package, we don’t generally care about the exacts of the components, that is more for mainstream production. As long as the package is correct and you properly connect the pins it will work.

Here is a picture of a badly laid out tripledown schematic done in diptrace as a test:

Here it is imported into the PCB design I was also using as a test, rough but you get the idea.

Ok. I may not be searching correctly as there are many components I cannot find. Such as the attiny. I’ll keep working with it some more. I really don’t know enough to be asking the appropriate questions.

Check out the video tour: Guided Tour - DipTrace

There are lots of videos on youtube as well.

For the Attiny you can find that easily. Simply click on the filter button and then select all libraries in the top menu and enter Attiny in the name search box. Should list a whole bunch of versions of the attiny.

You can narrow the search by adding more filters but to start with just search everything till you get the hang of it.

Nice via layout TA :wink:

LOL thanks, yeah I was just tossing them on at first but getting them evenly spaced was proving interesting so I figured why try? You see the results of that.

Would these changes to the Q8 e-switch driver also improve with clicky drivers?

Starting to work on a 22mm tripledown driver and since I have a bit of extra space figure I might as well toss in the new parts if they would help.

The schematic I was using is above, it is just copied from reverse-engineering PD68’s design into diptrace (obviously there are too many 7135’s to fit on the board and I am sure other mistakes since it was an early experiment but you get the idea)

Well, yes - for all 25/45/85's, might even be a benefit for 13A's. Not sure yet if DEL settled on final values of the caps and resistors though.

Only difference might be in the FET area - we are testing only with the SIR800DP, which I think all mods would equally apply to the SIR404DP (higher performance). For the other FET's, not sure, but can't hurt.

For us typical none EE's, it's hard to understand and justify at first. I've built 25 and 85 drivers where things seem to work ok, then seems like same exact build again, and it doesn't work - sometimes the resistor of FET gate to grnd fixes it, sometimes boosting C1 helps, sometimes I need to add a C2 (0.1 uF cap) to fix it. Then again, I'm not doing any of the testing DEL has done of worse case scenarios - high amps, low PWM values, etc., temperature checking of parts, plus the wear+tear part lifetime issues we can't easily test at all.

When the circuit results in spikes that are out of tolerance of part specs in the design, I guess it comes down to rolling the dice -- can you get an acceptable failure rate in mass production? WIll you get a decent life time of usage? Will you be creating a lot of unexpected heat? Will suddenly a new batch from the manufacturer be more sensitive to these out of tolerance voltage spikes than previous batches?

We run across bad drivers on occasion, and assume it's one of the parts, but could be the parts are 100% good, just that one part is more sensitive to bad spikes, or the particular traces or reflow on a board is making the bad spike even worse.

So here is what appears to be the ideal hardware setup for a tiny25 or higher clicky driver I suppose? Any comments?

https://s31.postimg.org/l33smx08r/Capture.jpg

We removed the zener from our latest layout - we (DEL ) feels confident it's not needed now. For the rest, DEL would be better than I to provide feedback. He had PD68 do some tweaks on the layout, but not sure how that looks in a schematic. For example, where traces need to be beefier and/or shorter, etc.