Roche F6 hacking

Phsinvent, there is also the etsy.com just search your size of copper disk and select the gauge you want.

I use a 1/2" socket and extension to knock the plug out. It's not very tight, it doesn't need to be clamped or anything crazy, just hold the tube in one hand and whack the extension with a screwdriver handle.

Of the two pins here for the LEDs, isn't just one of them able to do a PWM output? That would allow the laptop-style fade in/fade out trick. I currently have the red on PB0 (pin 5), green on PB4 (pin 3), but the circuit for each is identical so those positions can be reversed if needed.

Is the behavior I'm seeing with both status LEDs on dimly whenever battery is connected normal with firmware that doesn't have the stuff in it to control PB0 & PB4? Will that go away once the FW is handling those pins correctly? (edit: I hope it won't require an external pulldown resistor...)

One other thing of note. The status LEDs do get powered up with the programming clip attached, but does not interfere with reflashing. Completes with no errors and everything works afterwards.

PWM remains to be seen. I wouldn’t get too excited about the idea of PWM on either status LED for now. In answer to your other question: I’m not certain, but I think that the behavior you are seeing sounds normal and should go away with a proper firmware. Internal pull-downs are probably not present and should not be required here. Internal pull-ups are probably enabled on those pins with your stock firmware. Try removing this line:

PORTB = (1 << STAR2_PIN) | (1 << STAR3_PIN);

If that doesn’t work, I think that this is the right code to specifically disable the pull-ups (replace that line with this one):

PORTB &= ~(1 << STAR2_PIN) | ~(1 << STAR3_PIN);

Please note that I did not test this code and that I do not have a good handle on bitwise operators. The worst thing that could happen is that it won’t work.

Ha! As soon as the flash completed, both LEDs turned off and no longer come on with either the programmer or battery connected.

Changed

        // Set all ports to input, and turn pull-up resistors on for the inputs we are using
        DDRB = 0x00;
        PORTB = (1 << SWITCH_PIN) | (1 << STAR2_PIN) | (1 << STAR3_PIN);

to

        // Set all ports to input, and turn pull-up resistors on for the inputs we are using
        DDRB = 0x00;
        PORTB = (1 << SWITCH_PIN);

ToyKeeper is working on the actual FW that will make them work, I'm just glad to see that they can be made to work properly.

My comment about using PWM was only as a party trick for the beacon-when-off function, not the battery level part.

Sweet! Turning them [EDIT: fully ] on is just as simple, should be something like this:

PORTB |=  (1 << PINWHATEVER);

Yes, turning the LEDs on/off should be extremely simple. I can’t test it yet, but it’s pretty straightforward. It’s just toggling a single bit.

The off-beacon is probably pretty simple too, though not if it needs to fade in/out. Simply flashing it once every couple seconds should improve visibility a lot without actually impacting battery life much.

Any preference as to which color to use for the beacon, and whether it should be on pin 3 or 5? For the battery monitor part it doesn't matter but might for the beacon thingie.

The two colors are nicely balanced with the 470/1K resistor combo, I think the hardware part is done.

The beacon could always alternate ;-).

Are my target voltages for when the colors change OK (3.6v/3.3v), or should it be something different? I just picked those pretty much at random then never gave it much thought after. Of course it'll be up to the Code Guru up there to work out how to make the code match those voltages, that stuff just makes my head hurt.

I wonder if Helios would do a revision with the smaller lower current IRML2502 vs the larger Vishay 70N02 FET?

Right now my Roche F6 is REAAALY lacking, horrible UI, the H>M>L no strobes long hold for power on/off

I need to get me some 20mm copper round from etsy, I believe I have some 16’s but not 20’s that I can file down to make it fit the tail for better current flow (might even need to upgrade the wires to the emitter and maybe even a copper sinkpad (mine is stock right now)

Depends heavily on drive current I’d say. Since it’s a DD driver and many batteries will immediately dip below 3.6v at higher current, I dunno. With unprotected NCR18650B that might be OK, but with anything else… I’d probably go for much lower voltages. OTOH it’s probably fine. You’re probably shooting for “green when full, orange for the majority of the discharge, and red for the very end”, right? Those voltages sound OK for that to me. Plus blinking red for critical if you want.

Well it will still have the original STAR low voltage strategy I think, a warning blink (hmm, does the momentary version have that, or just the clicky version?) and then stepdown and eventually cutoff. The status LEDs will just be so you can look at any time and get some info about the battery state. The stock drivers only turn on the red LED when the battery is very very low, no info at all about what's going on until it's too late. What good is that?!

-----

Why a tiny FET instead of the big one? It works great as-is. If you want lower current, use an ICR instead of INR.

Fair enough

There's plenty of room for everything, it looks worse than it is. Like I said there's even room for the programming clip with the LED wires still in place. The only tweak I do, which probably isn't necessary, is to trim off the corners of the switch bracket.

For the copper spring plate, I clamp the copper to the plug and chop off the excess with tin snips, then smooth out with a file. The plug is already the same size as the disc needs to be.

Yeah, that makes sense to me. It works better as a status indicator than any kind of warning. As you pointed out, the step down and flashing will handle that.

“For the copper spring plate, I clamp the copper to the plug and chop off the excess with tin snips, then smooth out with a file. The plug is already the same size as the disc needs to be” -Comfychair.

I don’t have an adjustable-voltage power supply, but I think I can still get the voltage levels by using a real battery and a DMM. I also have a small variety of cells to try, including 20R for maximum output and protected regular-amperage cells.

For the beacon, it may be feasible to blink green for > 3.3V and red for < 3.3V. Depends on how much power it costs to check the voltage, and how much code space is available.

Provided that there is enough code space the battery voltage could be checked periodically (using a counter) rather than every time. Approximately once per hour might be sane to allow for ~15min of recovery. To get totally unnecessarily complicated you could do one check ~15min after the MCU goes to sleep using the counter and then set a flag and start doing the check ~daily until the light was turned on again, resetting the flag. Wow that’s a bunch of extra stuff for little benefit though…