Roche F6 hacking

Comfychair, that is really nice! I have what I fear is another impossible fantasy; I would like to put a slow, slightly dim beacon light in a small build. I see the light on my laptop when the computer is in standby mode or something. I don’t remember how to reduce quality and then imbed a YouTube video but here is a link to a 7 second video
http://youtube.com/watch?v=http://youtu.be/wO0Sfldm2Cg Hopefully this is not too big a file.

Do you think it is possible to put a tiny Blue SMD LED in that slot or somewhere on the face of a small triple or quad?

Also have you thought about a little RGB like This for your battery level indicator.

The problem with a continuous beacon/locator thingie, is that the MCU can't run it if the MCU is asleep, and if the MCU isn't asleep the parasitic drain when switched off is too high. But, I don't know squat about what can be done with the code, there may be some other possibility.

I suppose you could always connect the beacon LED with just a simple resistor straight to the battery, current draw can be very very small and still run the little LEDs at a respectable brightness. Of course that would just be a constant on, not flashing, unless you added another component like a 555 timer or something that would be able to do the same things (I'm sure there are more modern alternatives to the 555 by now that are many times smaller and more efficient).

This only needs 3 colors, which you can get with two LEDs. Green for 4.2-3.6v, red+green=yellow for 3.6-3.3v, red for 3.3-3v. At least that's the plan, if I can make them balance correctly. And to control them it doesn't need any variable or PWM output from the MCU pins, they're just on or off. Only one of the available pins is capable of doing a PWM output anyway, but they'll both do simple on/off up to 50mA each which is enough to fry these little LEDs. The total output for all pins combined has a max of 200mA but these indicators with the right resistors should be bright enough at 5mA or less.

  1. I’ve been meaning to point out that a 3mm through-hole bicolor LED might be a good option for putting the indicator wherever you want and making sure that the majority of light makes it out through the pipe/window.
  2. You can sleep an ATtiny and use the watchdog timer to wake it up. attiny sleep timer - Google Search

Changed resistors again, 1K/green & 470/red is still more than bright enough for this. Red could probably go up to the next one in my assortment, 680 ohm, red is a little brighter than the green with 1K/470. 8)

Like wight said… watchdog timer. Sleep 99.9% of the time, wake up for a little blip every second or so, then go back to sleep. It’s already listening for interrupts anyway so it can detect button presses, and the WDT doesn’t add much to its regular sleep mode. Chances are that the standby time will still have to be measured in years, even with the beacon on.

How did you knock the rear stainless plug out without damaging the light? I’m thinking of just adding copper braid to the tail spring.

Very easy to knock the rear plug out (I just did it)

Get one of those removable multiple screwdriver heads take out the screw driver insert (flat tip)

Insert in battery tube…bang battery tube and screwdriver on something flat and solid…doink out comes the plug

Go find the daggum spring that went flying off somewhere else, retrieve the plug that is somewhere else but not as far as the spring

Thanks bud. I want to go the comfychair route and make a copper plate but i’m being lazy. I wonder if soldering copper braid on will do me any good.

THANKS phsinvent and WarHawk-AVG!

Just did the simple mod with a copper braid and the internal resistance seems much better now. :)

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 ;-).