STAR Firmware by JonnyC - Source Code and Explanation

1335 posts / 0 new
Last post
Microa
Offline
Last seen: 23 hours 46 min ago
Joined: 06/29/2011 - 21:20
Posts: 251

Thanks for your reply. Smile

Microa
Offline
Last seen: 23 hours 46 min ago
Joined: 06/29/2011 - 21:20
Posts: 251

The turbo_timeout can not be disable only by comment out the line. My build failed with this error.
../STAR_V11.c:205:22: error: ‘TURBO_TIMEOUT’ undeclared (first use in this function)

RMM
RMM's picture
Offline
Last seen: 1 year 9 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

Microa wrote:
The turbo_timeout can not be disable only by comment out the line. My build failed with this error. ../STAR_V11.c:205:22: error: 'TURBO_TIMEOUT' undeclared (first use in this function)

You need to comment out the turbo mode, not the turbo_timeout.  

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Microa, “timeout” is part of the turbo concept. I don’t see why you would want a “turbo” mode if it did not have a timeout. I suspect that you just need a “high” mode.

In order to do that, simply comment out:
#define MODE_TURBO

When MODE_TURBO is not defined the compiler will skip any sections relating to a turbo timeout due to conditional statements (#ifdef MODE_TURBO). Simply set High to your desired maximum brightness, probably 255.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Microa
Offline
Last seen: 23 hours 46 min ago
Joined: 06/29/2011 - 21:20
Posts: 251

Oh! I see. Thanks a lot.

Mike C
Mike C's picture
Offline
Last seen: 1 week 14 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2585
Location: Sweden

I have a few lights with drivers that have STAR firmware and have noticed on one of them I get a small quick flicker about every 4 to 5 seconds. As the interval is constant I’d assume it’s something written in the code? If so, what is it? If not, this is not the right thread for this question and I’ll post it elsewhere.

Note: I haven’t switched the battery or tried the battery in another light (if it has something to do with voltage monitoring). Will test it in other lights with identical driver with same firmware tonight.

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

Mike C wrote:
I have a few lights with drivers that have STAR firmware and have noticed on one of them I get a small quick flicker about every 4 to 5 seconds. As the interval is constant I’d assume it’s something written in the code? If so, what is it? If not, this is not the right thread for this question and I’ll post it elsewhere.

Note: I haven’t switched the battery or tried the battery in another light (if it has something to do with voltage monitoring). Will test it in other lights with identical driver with same firmware tonight.


Ditto…I am beginning to think there might be “problems” with some 7135’s that are being assembled in drivers…one driver same exact firmware…no flash, soldered in, the one right next to it…flickers

Other people have been complaining about that flickering too

We are talking about Chinese IC’s remember, what is to say they didn’t buy a HUGE lot of defects and just start slapping em in.

Google “AMC7135 flickers” about 8 hits on the first page from many different forums

Mike C
Mike C's picture
Offline
Last seen: 1 week 14 hours ago
Joined: 01/22/2014 - 08:03
Posts: 2585
Location: Sweden

Thanks for the tip, I’ll do some research. As it does not appear to be a feature within the code I will discontinue discussing it in this thread.

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

I have a question…I boogered up my SOIC clip, it makes if VERY difficult to program the ATtiny13 on the board

Would it be possible if there was a breakout board (pre wired to the correct pins) to flash the chip BEFORE soldering on the board?

I designed a Nanjg Programmer…is it possible to just set the IC on the pads, gently hold it down with something non shorting, plug into the standard header cord and flash it this way? (I have several loose ATtiny13A’s

I have it on my OSHPark account but not sharing…wanted to know if this was possible and/or if it would work

If it works…they would be $1.60 for a set of 3, just need a bunch of header pins to solder into the thru holes

RMM
RMM's picture
Offline
Last seen: 1 year 9 months ago
Joined: 07/23/2013 - 13:47
Posts: 4006
Location: USA

WarHawk-AVG wrote:
I have a question...I boogered up my SOIC clip, it makes if VERY difficult to program the ATtiny13 on the board Would it be possible if there was a breakout board (pre wired to the correct pins) to flash the chip BEFORE soldering on the board? I designed a Nanjg Programmer...is it possible to just set the IC on the pads, gently hold it down with something non shorting, plug into the standard header cord and flash it this way? (I have several loose ATtiny13A's I have it on my OSHPark account but not sharing...wanted to know if this was possible and/or if it would work !{width:20%}http://s25.postimg.org/mhqtuq40v/top.png! !{width:20%}http://s25.postimg.org/6uzkhcq8v/bottom.png![/quote]

Yes, it will work.  My first SOIC clip came with a breakout board similar to that and I have done it before.  The SOIC clips seem to wear out pretty fast...I can usually get around 300-500 flashes before the plastic starts to get funny.  I can usually clean them up and get a little more life out of them but I always keep a spare programmer and clip around.  

You can also stick the chip in the clip before reflowing; even the buggered up SOIC clips usually work well for that. 

Mountain Electronics : batteries, Noctigon, and much more! What's new? 

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

Cool…well in that case

http://oshpark.com/shared_projects/nhVgC8ay

Hopefully this will help someone

P.S. This is the first board I made 100% by myself…yeah…ultra stupid simple…but I’m learning Smile

And thanks for the tip RMM, I will have to pull some of the ATtinys on my boards I can’t seem to get flashed and flash them with my bum SOIC clip until either these come in or a new clip from Digikey arrives
(I might be able to sneak $1.60 past the wife vs $10~ she put the kabosh on my flashlight spending Sad )

ImA4Wheelr
Offline
Last seen: 2 months 3 weeks ago
Joined: 02/03/2013 - 14:51
Posts: 7935
Location: SC

Great idea. Thanks WarHawk. Ordered a set.

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 11 months ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio

Dude cause of what I mentioned in that PM last night my flashlight spending is pretty much unquestioned by the wife right now, if you didn’t already order them don’t. I’m ordering a set, I’ll get 6 and send you three, I’m ordering now so if you didn’t already don’t.

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

Tom E
Tom E's picture
Offline
Last seen: 1 hour 4 min ago
Joined: 08/19/2012 - 08:23
Posts: 14971
Location: LI NY

Interesting board and idea WarHawk! Thanx! If the press-hold method is not so reliable (dunno), you could use that pencil thingy on the contacts, maybe? Maybe conductive grease?

This is a great alternative to the clip problem... I know my first eBay clip was problems - the metal tabs between the plastic fingers are retracting - they are loose and work their way up (retract), so now I have to push them down manually every couple of times I use it.

arekm
Offline
Last seen: 1 year 6 months ago
Joined: 03/31/2014 - 05:13
Posts: 203
Location: Poland

Someone does temperature measurement using pure ATtiny13 (frequency vs temperature relation)
http://www.elektronik-labor.de/AVR/T13contest/Temperatur.html
https://www.youtube.com/watch?v=NppARTy1Ga8

Could be nice addition – thermal protection for flashlight.

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

WarHawk-AVG wrote:
I have a question…I boogered up my SOIC clip, it makes if VERY difficult to program the ATtiny13 on the board

Would it be possible if there was a breakout board (pre wired to the correct pins) to flash the chip BEFORE soldering on the board?

I designed a Nanjg Programmer…is it possible to just set the IC on the pads, gently hold it down with something non shorting, plug into the standard header cord and flash it this way? (I have several loose ATtiny13A’s

I have it on my OSHPark account but not sharing…wanted to know if this was possible and/or if it would work
[snip]
If it works…they would be $1.60 for a set of 3, just need a bunch of header pins to solder into the thru holes

Good work. The boards like this I normally see are actually ment to be soldered to, they are known as breakout boards and meant for prototyping. They are available for all popular SMD package sizes and pin counts, you use them to hookup hard to work with parts for easy hand wiring or breadboarding. I don’t see a problem using them in the way you describe though, + RMM already said it works ;-).

Another option for this type of flashing is a SOIC ZIF socket such as this one at Adafruit. That might be good for those who have unsteady hands as well.

I’ve actually been thinking about making a board similar to yours, but setup for pogo pins such as these. It would be for in-place programming w/out a clip.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Helios-
Helios-'s picture
Offline
Last seen: 2 years 5 days ago
Joined: 01/18/2012 - 21:12
Posts: 2099

I’ve used a pogo pin programming adapter with the attiny. Pins aligned to press onto the top shoulders of the attiny leads.


Counterfeit 18650s, 2,<a href=“http://

Cereal_killer
Cereal_killer's picture
Offline
Last seen: 1 year 11 months ago
Joined: 07/22/2013 - 13:10
Posts: 4005
Location: Ohio
comfychair wrote:

1uF/0805/X7R/5%, 100 for $4.99: http://www.ebay.com/itm/181283883536 Shocked

Question about these off-time cap’s… If I was planning to run a Zener modded BLF driver off 3 cells (with 3s emitters) would it be better to get 16V cap’s or is that not needed cause with the Zener diode it’ll never see over 4.5V?

 RIP  SPC Joey Riley, KIA 11/24/14. Now I am become death, the destroyer of worlds.

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

It will not see over the zener voltage. EDIT: so the ones comfychair recommended are fine of course.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

Microa
Offline
Last seen: 23 hours 46 min ago
Joined: 06/29/2011 - 21:20
Posts: 251

I am testing whether the 2mm pin header are durable for in circuit programming.

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Nice!

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

wight wrote:
WarHawk-AVG wrote:
I have a question…I boogered up my SOIC clip, it makes if VERY difficult to program the ATtiny13 on the board

Would it be possible if there was a breakout board (pre wired to the correct pins) to flash the chip BEFORE soldering on the board?

I designed a Nanjg Programmer…is it possible to just set the IC on the pads, gently hold it down with something non shorting, plug into the standard header cord and flash it this way? (I have several loose ATtiny13A’s

I have it on my OSHPark account but not sharing…wanted to know if this was possible and/or if it would work
[snip]
If it works…they would be $1.60 for a set of 3, just need a bunch of header pins to solder into the thru holes

Good work. The boards like this I normally see are actually ment to be soldered to, they are known as breakout boards and meant for prototyping. They are available for all popular SMD package sizes and pin counts, you use them to hookup hard to work with parts for easy hand wiring or breadboarding. I don’t see a problem using them in the way you describe though, + RMM already said it works ;-).

Another option for this type of flashing is a SOIC ZIF socket such as this one at Adafruit. That might be good for those who have unsteady hands as well.

I’ve actually been thinking about making a board similar to yours, but setup for pogo pins such as these. It would be for in-place programming w/out a clip.

What is the part # from mouser/digikey on that SOIC ZIF and the Eagle .lbr file…and I will whip up a nanjg board with that ZIF socket. $15.95 ain’t bad…but why do that when you can DIY right Wink

Well only place to get that module is adafruit…so might have to go that route…but too ‘spensive for my blood at this time…

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Maybe try looking up Yamaichi on mouser/digikey, I’ll try and take a look myself later.

What does nanjg have to do with this though?

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

Helios- wrote:
I’ve used a pogo pin programming adapter with the attiny. Pins aligned to press onto the top shoulders of the attiny leads.

Speaking of which…most cool
http://www.ebay.com/itm/SOIC-8-Spring-Loaded-Pogo-Pin-Adapter-Jtag-/2504...

All I know is I’m down for the count…it’s so hard manually holding the SOIC clip and having to have my kid hit the enter key to flash the chips…then if they slip not sure if shorting and possibly frying the ATtiny Sad

This one is $5.95 much better price and is 150mil which is the SSU footprint!
http://www.ebay.com/itm/2pcs-SOIC8-SOP8-DIP8-EZ-Programmer-Adapter-Socke...

This price can’t be right (oh nm…it’s bid only..bleh)
http://www.ebay.com/itm/SOP8-SOIC8-to-DIP8-EZ-Programmer-Adapter-Socket-...

wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

Mouser only seems to carry the 16-pin version. The 8pin version is of course a 16 with 8 pins blocked off. The 16 pin Yamaichi on Mouser costs as much as an 8 pin random-brand already mounted on a PCB costs on eBay.

EDIT: closest product I can find on Digikey is this 3M Textool socket. It costs $25 but looks even easier to operate for those with limited dexterity!

EDIT2: if you are absolutely determined to make a PCB for something, here is the cheapest I see the cheap SOIC-8 socket for – $7.18. I’m not sure why they called it OTS-16-1.27-03 in the listing, maybe they are just reading the marking on the device. The actual part # of the device in their pics is OTS-8(16)-1.27-03 according to the datasheet.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

wight wrote:
Maybe try looking up Yamaichi on mouser/digikey, I’ll try and take a look myself later.

What does nanjg have to do with this though?

our boards are based off the Nanjg design (more or less) so that’s what I put on the board…just something to put on the tDocu layer so OSHPark would render it
wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

So you want to build a driver board and put a giant 20×18×17mm socket on it?

I see you beat me to the punch with that 2x socket auction. Looks like a good deal, those sockets have the same markings as the enplas sockets I was referring to [OTS-8(16)-1.27-03]. I’m tempted!

Edit: I’ll see your cheap auction and raise you one. The markings on that socket do not seem to be the same as the others however.

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

WarHawk-AVG
WarHawk-AVG's picture
Offline
Last seen: 1 year 6 months ago
Joined: 01/04/2014 - 06:47
Posts: 5071
Location: H-Town

wight wrote:
So you want to build a driver board and put a giant 20×18×17mm socket on it?

I see you beat me to the punch with that 2x socket auction. Looks like a good deal, those sockets have the same markings as the enplas sockets I was referring to [OTS-8(16)-1.27-03]. I’m tempted!

Edit: I’ll see your cheap auction and raise you one. The markings on that socket do not seem to be the same as the others however.

Oh nice!!!
(I think I can sneak that one Wink )
wight
Offline
Last seen: 1 year 8 months ago
Joined: 11/27/2013 - 16:40
Posts: 4969
Location: Virginia, USA

WarHawk-AVG wrote:
Oh nice!!!
(I think I can sneak that one Wink )
I broke down and “snuck one” myself just now. I ordered mine from here since the listing I linked to before is done. Good luck to both of us with this cheapest of programming sockets… Wink

Still fine, still on a break. One day I’ll catch up with you folks! previous wight catchup Wink
list of my drivers & variants (A17DD, FET+1 stuff, WIP stuff, etc)

comfychair
comfychair's picture
Offline
Last seen: 5 years 7 months ago
Joined: 01/12/2013 - 05:39
Posts: 6198

Tom E wrote:

Interesting board and idea WarHawk! Thanx! If the press-hold method is not so reliable (dunno), you could use that pencil thingy on the contacts, maybe? Maybe conductive grease?

This is a great alternative to the clip problem... I know my first eBay clip was problems - the metal tabs between the plastic fingers are retracting - they are loose and work their way up (retract), so now I have to push them down manually every couple of times I use it.

The cheaper Pomona clip works much better than the 3M, the pins are fixed and don't try to slide out at the worst possible moment. $11.xx from Digikey. Also the Pomona's inline row of pins means you can use 1x4 connectors, much less trouble than using four 1x1 connectors in the typical jumper wires.

 

Cereal_killer wrote:
comfychair wrote:

http://75.65.123.78/driverhacks/Dsc07907.jpg

That's a lot of crap on a tiny little board, but it works! Used levels of 4-20-90-255, fast PWM, no memory. Moon could probably be a little lower, but it has pretty good spacing (plus, to reflash it again I have to remove the jumper wires, I think this one will stay as-is).

How does the fast PWM work with the baby FET?

Works fine. I have one (shown in that pic above) using a fast-PWM version of luxdrv (for the battery monitor), and another using fast-PWM STAR off-time with memory disabled, H-L order & moon by default with no jumpers added. 130 ohm gate & 12k pulldown resistors. Both are in little toy Solarforce Z1's, one with triple 219Bs, the other with triple XPG2 4Cs.

Pages