[UPDATE:v1.7.1,Q8&1chanOTSM]bistro-HD, bistro your way. OTSM, eswitch(devel), Vcc reads, safe_presses, turbo timeout...

245 posts / 0 new
Last post
KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA
Lexel wrote:
in the solution properties you have to set compile to minimal file size

The -Os in the makefile C_FLAGS overrides the settings in the solution properties screen. It won’t let you change any options in there anyway if you have a makefile selected.

I’m not going to worry about it. Tonight I’m getting started on building 6× 17mm TAv1 drivers for Bistro-HD/OTSM. Once I’ve got a board ready, I’ll try both .hex files (the provided one and the compiled one) and make sure they both work, and then move on to custom reverse and forward modegroups.

LightRider
LightRider's picture
Offline
Last seen: 1 year 4 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA
KFulton wrote:
Lexel wrote:
in the solution properties you have to set compile to minimal file size

The -Os in the makefile C_FLAGS overrides the settings in the solution properties screen. It won’t let you change any options in there anyway if you have a makefile selected.

I’m not going to worry about it. Tonight I’m getting started on building 6× 17mm TAv1 drivers for Bistro-HD/OTSM. Once I’ve got a board ready, I’ll try both .hex files (the provided one and the compiled one) and make sure they both work, and then move on to custom reverse and forward modegroups.

Hey friend, has the necessary component and layout changes require for otsm been illustrated somewhere? I’m not sure how to implement the changes to the ta boards. I’m sure it’s been discussed though, right?

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA
LightRider wrote:
Hey friend, has the necessary component and layout changes require for otsm been illustrated somewhere? I’m not sure how to implement the changes to the ta boards. I’m sure it’s been discussed though, right?

The component changes are in THE_MANUAL.txt inside of the .zip file. I put together a quick cheat-sheet for myself (17mm, 1S, clicky), but have not actually used it yet, so I don’t know if there are any errors:

COMPONENTS

U1: ATTiny25V
U2: SIR800DP

D1: RB751V40T1G
D2: none

C1: 1uF
C2: 47uF – 298D476×0010P2T
OTC: none

7135: AMC7135 (I’m going to use 350ma version)

R1: 1K
R2: 3.3K
R3: 100K
R4: 47
R5: 4.7
BR: none

edit: these values are all correct, I’ve built 6 drivers successfully

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA

So apparently the tantalum capacitor for C2 (298D476×0010P2T) is polarized. As best I can tell, the anode needs to point toward R1/R2 on a 17mm TAv1 board. It seems to be working, but can you please confirm, Flintrock? Apologies if it is in the documentation and I just missed it.

Sorry for the lousy photo.

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

DavidEF wrote:
KFulton wrote:
When I compile this in Atmel Studio, I get a different (slightly larger) filesize from the pre-compiled .hex. Compiling in WinAVR gives yet another (even larger) filesize. Any idea what I might be doing wrong? Or does it even make a difference?
Short answer - Windows sucks. Texas_Ace was the first one I saw mention this, but someone else _may_ have noticed it earlier. Compiling in Linux results in smaller file sizes.

This is funny, I see this over and over. A while back I consistently could compile Bistro in a smaller size under Atmel Studio than what TK could get under Linux. I passed along the compiler switch settings from Studio to TK, and she found an optimized setting in the Atmel Visual Studio setting she didn't know about, added it, then we matched.

I dunno what you guys are doin, but Atmel Studio works fully optimized, and great for me. Using it on a decent Win 10 system with a solid state drive and it's super fast, very easy, nice dev environment, lots of features in the editor, and believe, me, I've used a ton of dev environments.

Like I said, I'm clueless what your problems are with it. I've run it on at least 4 Win computers - no problems whatsoever.

 

Does anyone know the size of the latest v1.3-R2 version with the default config of "TAv1-OTSM-HD" for a ATtiny25?

I got text: 1818, bss: 41, dec: 1859, with a straight Atmel VS 7.0 build (latest version), standard options. Not sure if what's listed in the OP is this latest version.

 

mattlward
mattlward's picture
Offline
Last seen: 18 min 16 sec ago
Joined: 06/19/2015 - 09:20
Posts: 2505
Location: Illinois, USA

I would like the Amtel Studio, if I could really understand the workflow and where different types of files should be located.

EDC rotation:
FW3A, LH351D 3500k
FW3A, SST20 4000k
FW3A, Nichia 4000k sw40 r9080 (favorite light!)
Emisar D4V2, SST20 4000k
Zebralight SC62w

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

KFulton wrote:
So apparently the tantalum capacitor for C2 (298D476×0010P2T) is polarized. As best I can tell, the anode needs to point toward R1/R2 on a 17mm TAv1 board. It seems to be working, but can you please confirm, Flintrock? Apologies if it is in the documentation and I just missed it.

Sorry for the lousy photo.

the datasheet of the tantal cap says the anode is marked with a polarity bar

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

mattlward wrote:
I would like the Amtel Studio, if I could really understand the workflow and where different types of files should be located.

Nothing special at all - put the files anywhere you like. I generally keep mine in one common folder since our drivers are so simple - might as well keep it simple smile. Only thing to understand is solution vs. project. A solution can contain one or more projects. Studio will want to create sub folders for each project, but I force them to be in only one common folder. For our use, I've only used one project per solution and name them the same. Our firmware is pretty simple compared to Visual Studio solutions I work on at work.

Even if you created a solution and project with the project in the sub-folder -- no problem, move all the project files in the sub-folder to the parent folder where the .atsln file is (solution file), delete the old project from the solution, add it again from it's new location and it all works fine.

Another important thing is to be sure you change the Solution Configuration from "Debug" to "Release". Debug turns off optimizations totally. All we want to use is "Release" since it's fully optimized. Once you change it to "Release", it's remembered and will default that way next time.

What I like is from right inside Studio, you can rename or delete files, projects, or even the solution. I like keeping all header files in the project since global searches/replaces will work thru the headers as well.

mattlward
mattlward's picture
Offline
Last seen: 18 min 16 sec ago
Joined: 06/19/2015 - 09:20
Posts: 2505
Location: Illinois, USA

Basic Digikey cart with parts minus resistors since we will likely have them around. I am not sure that I have exactly the correct ATtiny25 in the cart…

Cart

EDC rotation:
FW3A, LH351D 3500k
FW3A, SST20 4000k
FW3A, Nichia 4000k sw40 r9080 (favorite light!)
Emisar D4V2, SST20 4000k
Zebralight SC62w

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA
Lexel wrote:
the datasheet of the tantal cap says the anode is marked with a polarity bar

Right, I found the same datasheet, but the board doesn’t say which way to put it. I’m pretty sure I’ve got it right in the photo.

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

Matt - did my post above help clarify anything for you? 

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA

After giving up on trying to fit a 17mm TAv1 into a Convoy S2 (the “shelf” on the pill is wider, so R4 usually gets crushed), I built a BLFA6_EMU hexfile with custom modegroups and flashed it onto a MTN-17DDm with ATTiny25. It flashes OK, but when I power it on, it just randomly cycles through all of the modes.

I’ve checked through fr-tk-attiny.h and the pins look correct. I’m not sure where to look next.

chouster
Offline
Last seen: 4 hours 42 min ago
Joined: 02/20/2014 - 15:05
Posts: 686
Location: germany

Hi Flintrock,

I wanted to take a look at your firmware and see if I can use it for some of my recent builds, but it seems like your links in the OP aren’t working, at least for me!?

EDIT: Well, http://www.tinyupload.com appears to be down right now.

EDIT 2: Downloads are working again now.

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

I tried to contact flintrock over PM

I got a question if 2S OTSM works with zener diode or if the LDO is nessesary

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 9 hours 34 min ago
Joined: 01/12/2013 - 14:40
Posts: 9785
Location: (469219) 2016 HO3
Tom E wrote:
DavidEF wrote:
Short answer – Windows sucks. … Compiling in Linux results in smaller file sizes.

This is funny, I see this over and over. A while back I consistently could compile Bistro in a smaller size under Atmel Studio than what TK could get under Linux. I passed along the compiler switch settings from Studio to TK, and she found an optimized setting in the Atmel Visual Studio setting she didn’t know about, added it, then we matched.

Tom is correct. It doesn’t matter what OS you use to compile; it matters what settings are used and which version of gcc.

If a project was developed with one toolchain and compiled with another, that’s where things get messy. For example, if it was developed with a Makefile or shell scripts for building, and then someone else tries to build it in AVR Studio, then the intended settings are lost and must be re-entered manually in the other tools. But the OS itself doesn’t really matter.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 9 hours 34 min ago
Joined: 01/12/2013 - 14:40
Posts: 9785
Location: (469219) 2016 HO3

Anyway, a while back I was going to put Bistro-HD into the main code repository but Flintrock asked me to wait until a few things were fixed. Any idea if it’s ready to be added yet?

I don’t have any relevant hardware to test it on, so I’m hoping someone else has verified it.

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

I am trying to get the OTSM drivers to work,

first
does only get low mode, nothing else

the 2.
gets only low-medium-high
tapping often does not enter config mode
long clicks are not working at all

the 3. only in low mode

4. LDO no response at all

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

I see Flintrock hasn't been on for 3 weeks. Dang, I really want to read up more on this version - sounds like a bunch of nice features. I've been flip flopping around on clicky switch driver - Bistro, my own, Biscotti, etc., so was hoping to standardize on this one. 

Flintrock - congrats on this!! Awesome job!

DavidEF
DavidEF's picture
Offline
Last seen: 6 hours 42 min ago
Joined: 06/05/2014 - 06:00
Posts: 7565
Location: Salisbury, North Carolina, USA

Yeah, his last post Here seems to indicate he’s got stuff going on (Don’t know if good or bad stuff). It would be great if he’d finish this. It really is (or can be) a nice upgrade.

The Cycle of Goodness: “No one prospers without rendering benefit to others”
- The YKK Philosophy

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

I hope i am not sitting on parts for 25 OTSM drivers just to figure out they dont work at all

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

Lexel wrote:
I hope i am not sitting on parts for 25 OTSM drivers just to figure out they don't work at all

I could maybe help here. Dunno enough yet about building them. Do standard TA boards work? Dunno bout that C2 cap - if it fits on standard C2 pads. Dunno bout the diode either - if that's just a standard diode or not.

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

the cap is 0805 but fits on the 0603 pad
the diode is a shottky also used on other drivers

the R1 and R2 are different

I needed to add a Diode to the 2S LDO 17mm now it is working

trying to figure out whats wrong with 1S

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

So you tried three identical 1S boards with the issues as listed above? Weird bout the LDO - never used a diode with one. The LDO replaces the diode on all our other e-switch drivers. Sure you got the correct LDO part? I got burned before by having the wrong type of LDO.

Those R1 and R2 values sure are strange... But I see now - should work fine.

Are you using an "approved" MCU revision?

 

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

I figured it out

I made a stupid mistake populating C1 as usual with 10uF, but OTSM needs 1uF there

I had a bunch of 0805 1uF left, where I should have used almost all of them

Tom E
Tom E's picture
Offline
Last seen: 20 hours 3 min ago
Joined: 08/19/2012 - 08:23
Posts: 12226
Location: LI NY

Ahh! Yea, noticed that in the manual (and post #94). Didn't notice it at first glancing at the parts list.

Lexel
Lexel's picture
Offline
Last seen: 1 hour 21 min ago
Joined: 11/01/2016 - 08:00
Posts: 5243
Location: Germany

I loaded Bistro HD OTSM in Amtel Studio

Now I tried to compile a hex with a custom modegroup

But when I flash it its totally messed up, the driver has only 3 modes, does not accept long clicks
when entering config it bliks 6 times then buzz and thats it

P.S. I did a new project in Amtel studio and now it seems to work

also I am puzzled how to change the LVP to another value
the fr-calibration.h has still the stuff from Bistro using 19.1/4.7k resistors to define voltage

also still searching where to adjust moonmode to get it a bit brighter, now its more a firefly mode

LightRider
LightRider's picture
Offline
Last seen: 1 year 4 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

@KFulton: nice to hear you have some drivers working!

When I saw that flintrock had been absent I was bummed a bit as I purchased parts with tight tolerances and the parts were not cheap. So, I hope you can share with us some more? What has been your experience? Learn anything that may be helpful?

@Flintrock: please come back. You’ve done some great work. Your intelligence causes you to have some conversations with yourself sometime but it is still nice to listen in and it documents some priceless information:) hope all is well

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA
Lexel wrote:
also still searching where to adjust moonmode to get it a bit brighter, now its more a firefly mode

You could try changing the modegroup header file from:

#define RAMP_PWM2 4,7,20,35,55,100,160,255,255,255,255,255,255,255,255,255,255,255,255,0

to:

#define RAMP_PWM2 +*7*+,7,20,35,55,100,160,255,255,255,255,255,255,255,255,255,255,255,255,0

but I don’t know if that will work. The moonlight might be hard-coded somewhere (I can’t find it either).

KFulton
Offline
Last seen: 2 months 3 weeks ago
Joined: 04/12/2017 - 12:31
Posts: 27
Location: Rochester, NY USA

LightRider wrote:
@KFulton: nice to hear you have some drivers working!

When I saw that flintrock had been absent I was bummed a bit as I purchased parts with tight tolerances and the parts were not cheap. So, I hope you can share with us some more? What has been your experience? Learn anything that may be helpful?

Well, since you asked, a few random observations, some of which were already posted elsewhere, in no particular order -

1. Here is the final parts list that I used for 17mm 1S:

U1: ATTiny25V
U2: SIR800DP

D1: RB751V40T1G
D2: none

C1: 1uF (0805)
C2: 47uF (0805) 298D476×0010P2T
OTC: none

7135: 350ma

R1: 1K (0603)
R2: 3.3K (0603)
R3: 100K (0603)
R4: 47 (0603)
R5: 4.7 (0603)
BR: none

There are cheaper/better options for C2, but I don’t know what is the best option there.

2. Moonlight is crazy low, more like a firefly/sub-lumen mode. I changed my modegroups around to use ramp level 2 instead of moonlight.

3. The tantalum capacitor is polarized. I posted a picture of the working orientation in a previous post.

4. No bleeder resistor is needed for lighted tailcap builds (at least on 17mm 1S). All of my Convoy S2/S2+/S3 builds have them.

5. There is some occasional odd behavior with short presses. If you haven’t turned the light on in a while, and immediately tap forward rapidly a few times, some of the forward taps will behave as medium-presses. This clears up within a few seconds and won’t come back again for a long time (several days? Need more time to figure this one out).

6. I managed to destroy a bunch of 7135s by soldering them by hand with an iron. I discovered this when doing tail measurements with a multimeter. Apparently the little things can’t handle an iron at 650F. I replaced all of them with fresh 7135s and reflowed them using solder paste and hot air, and everything was fine after that.

7. Since I was doing a bunch of projects at the same time, I used the electric skillet method for the side with the tiny components. Works great! I usually use hot air for SMD, though, especially after the 7135 incident.

8. Convoy S2 and S2+ pills do not work very well with 17mm TAv1 drivers. You need to either file the retaining ring way down or solder the drivers in place. I tried to solder one to a S2 pill and the heavier components on the other side of the board fell off. I have read that some people have had success with using a blowtorch to pre-heat the pill, but I haven’t tried that. The Convoy S3 has a wider retaining ring and works without any fuss.

LightRider
LightRider's picture
Offline
Last seen: 1 year 4 months ago
Joined: 08/05/2015 - 09:52
Posts: 2007
Location: U.P. MI, USA

Thanks for the feedback! I was just wondering how people did what you describe in #6.

I wonder if there is a place to buy the convoy s3 retaining rings?

Pages