My simplest "Arduino" circuit

Wow, so many years! And did you know about this?

Early CD versions of the Pink Floyd's album Pulse came with a blinking red LED on the side of the case.

This was designed by EMI contractor Jon Kempner, who was awarded the platinum disc, using the now discontinued LM3909 LED flasher IC. The circuit was powered by a single AA cell; the battery life was stated to be over 6 months. Some versions were also made with 2 AA batteries and later editions of the CD set did not feature the blinking LED.

Nice and simple.
Would it be much more complicated to have Attiny85 sleep for 8 hours, for example? I am looking to have a relay switch on every 8 hours for 10 minutes.

Nice!

(And I wonder how I managed not to see this one when I was building my Cable Locker Intruder Alarm ?)

I'm deeply impressed that it is possible to run for so long on a small battery, simply by "not wasting power when it is not needed".

Ill have to make an LED-throwie in that style!
It would just hang there and blink forever!
(Or at least, it would die of corrosion before running out of power)

Very nice example!

Made me look for a tutorial. :slight_smile:

Nick,
You say, that ATtiny85 will wake on pin change interrupt or watchdog timer. Which instructions enable pin change interrupt? Sorry for stupid questions.

A bit off topic, but related...

If I program a chip like the atTiny using the Uno as ISP (in IDE: File > Examples > ArduinoISP), may I leave the Arduino and the target chip connected once the sketch runs in the atTiny? In real use of course the tiny will be disconnected, but I'm thinking of during code development where it's common to upload many version of code.

I'm assuming the target fires up its sketch when programmed through the Uno as ISP. But with the tiny's i/o pins being the same ones as the are connected for ISP, I'm not sure if it's wise? But my understanding of ISP is that the whole point is to be able to leave the chip in the programming circuit.

Advice please?

It must depend on, what your pins are supposed to do when running.

I guess that the pins on the ISP you are connected to are "low" when not programming, and should that not equal a short to ground if a connected pin on the tiny is "high"?

(In my programming setup I have resistors on the pins, that should at least stop me from drawing too many mA by accident)

Peter_I:
(In my programming setup I have resistors on the pins, that should at least stop me from drawing too many mA by accident)

Good idea... so just series resistors in the wires from the Arduino pins to the target's? What size- couple of hundred Ohms?

I'm sure the whole process must be safe, but I'm just concerned that the instant the code is uploaded to the target it will start running. Should I fit the components on the target's pins before uploading the sketch?

I'm also going by this Instructable, whose steps imply that you connect the atTiny to the Arduino, attach the atTiny's LEDs or whatever for its sketch, then upload the sketch via the Arduino. The Instructable is silent on my concern of the atTiny still being connected to the Arduino when its (the atTiny's that is) sketch fires up.

I'm thinking I should post this question in another thread... this is the wrong place.

EDIT.... I re-posed this question in a new thread here which I think is better. Let's let this thread revert to its original purpose in the gallery. Sorry about that....

This thread looks like it was made to be necro'd. So Nick, is it still blinking?

Jimmy

Yes, it still blinks away, faithfully. :slight_smile:

I just measured the battery voltage: 2.994V. Considering it is a 3V battery, I can't complain.

Similar project here: Simple project - torch-locator

Cool! Thanks for the info!

I'll bet leaving the multimeter connected would drain the battery faster.

I won't do that. :stuck_out_tongue:

change WDTCR to WDTCSR if you get the "'WDTCR' was not declared in this scope" error. see this post.

Is it still going?

Yes it is. I can't recall now if I changed the battery yet. I have a similar one with a light detector which flashes at night to show where a nearby torch is here.

I changed the battery on one of them. Next time I'll make a note of the date of the new battery installation.

Yes, I compiled the code with the IDE. I think you need to add this link to the Additional Board Manager URLs in the Preferences:

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

Then under Tools -> Board -> Board Manager you find the entry for the Attiny group, select it, and click Install.

Hi,

I have really tried to mod the code so it will work with a digistump atiny85 small board and I have it to work great with out LDR (Have one on the torch beside the fusebox). But my problem is to get it to work with the LDR.
This is the board:

Do you have any ideas how to make it work, I have tried this the last time:

Pin 0 (PB0) <-- LDR (GL5539) --> Pin 7 (PB2) (Ain1) <----> 56 k <----> Gnd (Digispark Tiny85)
Pin 6 (PB1) <---- LED ---> 100 R <-----> Gnd (Internal LED Digispark Tiny85)

Best regards,
Lars Hammarström
Sweden