Adventures in TinyAVR 1-Series

  • Yup. That’s how I always do it at Oshpark and they come out just fine.
  • That’s fine then, no problems.
  • Sound good. And yeah, 1.27mm spacing (center-to-center). I use via’s (0.4mm drill with 0.75mm outer diameter), but it’s not necessary. They just help keep the pins in place while you’re flashing.

So many components … :slight_smile: , here how looks linear Infireon driver from Geko headlamp
Here Avsel linear

I talked about it 5 posts above, the control loop is done by the MCU so no need for an OpAmp and all its passives, but this is entierly software and I don’t have the skills necessary, nor do I really want to learn them, and as far as I know Inferion code isn’t open source, if it was it would certainly be easier for people here to implement it in anduril.

Aside from that it can’t do low moonlight, they could add 4 small components costing a few cents for a second channel but they don’t I don’t know why. By the way this new headlamp looks really bad, maybe they are just really cheap.

Anyway I mostly made this linear driver as an exercise and also to propose something not too hard to build, moonlight capable, and a step up from 7135s. Next I will do boost and buck drivers because I like efficiency.

Edit : Avsel one is similar to any linear driver with OpAmp, except it doesn’t have a LDO, I don’t know why, can the MCU output a fixed voltage PWM no matter the Voltage on the VCC in ?
It doesn’t have moonlight levels.

There are MCUs on the market with integrated op amps, logic blocks, and some other peripherals. For example, some of the very low cost 8 bit PICs have op amps, likewise the powerful PSOCs and MSP430s etc (some with similar or lower price points than the AVR 8-bit MCUs). As far as I am aware though, there are no Attinys with integrated op amps though the 1616 does have some analog comparators and a small amount of programmable logic. That said, thefreeman's design probably offers some additional benefits such as Anduril and better control of the analog loop with component choice and feedback optimization. Even if constrained (at least for now) to the Attiny series, Anduril itself is worth the extra cost. thefreeman, nice job, always great to see more options with new designs . As a side note... the pandemic is really affecting supply chains around the world. Many of the QFN AVR1-series MCUs are sold out or very short in supply at the moment, with a lead time of almost 3/4 a year..

Holy crap, I new the microcontroller market was getting rocked but I didn’t know it was this bad. I just check attiny1616 stock at the usual places and they’re ALL GONE. Scouring Octopart now… :frowning:

Edit… well, I think I’ve got 10 on hand which will last me a little while. I just went ahead and ordered 25 at Mouser, they’re expecting more sometime in July. If I can’t get them now, I might as well at least be in line for some.

I planned to order at Farnell but that’s in UK, do they ship to US at reasonable cost ? Indeed stock has disappeared at Mouser, last time I looked there was stock :open_mouth: , I should hurry to make my order.

I added the suggestion from Gchart :

- only one via for the flashing pads because I couldn’t fit more without moving a lot of things

- gnd in the middle of the pads

  • edgecut at 22mm

Thanks :smiley:

Yeah I don’t exactly know how it is done in the Unicorn 1.0/Geko, I thought I read that Vsense is read by the ADC, with some wizardry to increase resolution, then a PID loop to control the current, not sure though, maybe it’s something else.

I saw those at Farnell and some over in Asia. Every place wanted like $40+ in shipping fees to get them here - no thanks! Well, I guess Farnell “only” wanted £25 in shipping. I guess I’ll wait for my Mouser order this summer. I’ll try to make my 10 on hand stretch out until then.

That Geko looks like a decent ZL clone - except if there’s no moonlight there’s no point cloning ZL (to me anyway)

I’ve been away for a while… nice to see that your work with 1-series is catching on.

Maybe I’m being a stickler, but the 1 series doesn’t need three flashing pads. It’s needs GND and UDPI, and the MCU needs to be powered. If I don’t have the driver powered already I just connect V+ from the Xplained Nano to the battery spring with a crocodile clip.

Another thing… you mentioned shortage of 1616s and you see them on Farnell UK. The US branch newark.com has them in stock (selling fast though), do you still have to pay that much postage if you order through Newark? They do refer to UK stock but you might be able to get around the shipping? I can’t order from Farnell UK directly myself, but in Sweden we have a components shop that allows anyone to order from Farnell UK and only pay local Swedish postage from the Swedish shop. I just got a bunch of 1616s delivered. Perhaps there is a similar service in the US for Newark if you can’t order from them directly?

I think when I tried Newark, it was quoting me outrageous international shipment fees since the stock was going to come from UK.

I agree, you don’t need VCC if the MCU is powered, but what if you want to flash a driver that isn’t installed in a flashlight? Or it’s not able to be powered when you have access to the flashing pads (most flashlights)? In my mind, it’s no more difficult to include all 3 pads and it gives you more flexibility. Just my 2 cents.

Hmm, and here I was wondering if it mattered if the V+ for flashing was connected before or after the LDO, if like, the MCU was powered from a lower voltage (ldo voltage) than the UDPI signal it would cause issues (maybe a stupid question…).

FWIW, when making one of my programming keys, I accidentally put the resistor inline with the VCC line instead of the UPDI line. If I remember right, the computer didn’t even recognize that the MCU was connected. So I just connect the pins directly at the MCU, without anything like LDOs or diodes in the path.

Just as I wrote, I have V+ from the Xplained Nano connected to the battery spring by a crocodile clip. The Xplained Nano powers the MCU. You did write you made the change to make layout easier, I just added this because layout is even easier with two pads instead of three, it works fine for me.

:+1: sorry, I was skimming as I’m working at the moment. I should know better than to try multi-tasking…

Digikey

Is this the right component?

Well I’ll be! They got a batch in earlier than expected. I’m halfway tempted to try and cancel my Mouser order and place one at Digikey.

Aaaaannndd they’re gone

Yeah lol, a few moments after I ordered, I also wanted a buck IC, some 9000 in stock in the morning, then zero in the afternoon when I placed my order, plenty of other ICs have poor availability too.

They’re also gone from Farnell.

I had 2 in my cart along with a few odds and ends and saw this this morning when I finally was ready to checkout.

Gchart, do you have an example hwdef file with TCD ?