Live data from Hacker News

Learning basic electronics by building fireflies

a64.in

21–30 of 85 posts

Re: Learning basic electronics by building fireflies

#21

The juxtaposition between the cleanliness of the software and the absolute travesty of a schematic is jarring. But it still works! I applaud the author for wading into analog electronics. Pretty much everyone nowadays would just put a timer on a micro and be done in 2 minutes. No fun in that. There is something to be said about the minimal elegance of purely analog designs, and a special rewarding feeling for wrangli…

I haven't touch anything like this in a good while, how cheap could I get a simple Arduino style chip with a few gpio to drive a yellow LED in 2025?

I have a bag of attiny13a that cost me $0.20 per chip. It is fully self contained. Just add a very small capacitor, give it from 2.8V to 5V. And then you program it the way you want. You can even program and debug it via a single pin if you wish.

At this cost for a hobbyist it's just hard to beat. It can be anything you want it to be in a few lines of code.

I personally write Rust for it, not Arduino C++, but it would work just the same.

Re: Learning basic electronics by building fireflies

#22
post #8

I was programming well before I was learned anything about analog electronic circuits. I had the Radio Shack 160-in-one like anyone else and I could follow the directions but I didn't understand what was happening because I was thinking of it as an orderly pipeline, almost like a conveyor belt, where each component was doing a task. It wasn't until college when we studied LRC circuits in physics that it finally click…

Do you happen to know of any good modern alternatives to those vintage Radio Shack kits?

I cannot say enough good things about this store. I've been a customer for many years and have never been disappointed. You can find things cheaper online, but for a kid without a credit card these guys are great. They even have a brick and mortar store for local pickup.

https://www.electronics123.com/

https://www.electronics123.com/contactus

Re: Learning basic electronics by building fireflies

#23
post #17

Only tangentially related to the enthusiastic circuit hacking: the reason the author stopped seeing living fireflies may be the drastic, worldwide decline in insect populations, with biomass declining in the range of 2-10%/year[0]. https://en.m.wikipedia.org/wiki/Decline_in_insect_population...

jesus christ

Re: Learning basic electronics by building fireflies

#24

The juxtaposition between the cleanliness of the software and the absolute travesty of a schematic is jarring. But it still works! I applaud the author for wading into analog electronics. Pretty much everyone nowadays would just put a timer on a micro and be done in 2 minutes. No fun in that. There is something to be said about the minimal elegance of purely analog designs, and a special rewarding feeling for wrangli…

I haven't touch anything like this in a good while, how cheap could I get a simple Arduino style chip with a few gpio to drive a yellow LED in 2025?

For an "official" answer (programmable from Arduino IDE, genuine new chips) you can get an ATTINY202 from DigiKey or Mouser for $0.50 in qty. 1.

Re: Learning basic electronics by building fireflies

#25

I hold a BSc in electrical engineering and even I still don't fully understand how circuits work, especially the ones that involve transistors. I tried various mental models to think about the "flow" of current/electrons, but nothing works 100% of the time. Maybe that's just how my brain works: I like algorithmic thinking (A → B → C) as opposed to holding the entire circuit in my mind and solving for V or I.

I suppose the BEng in Electronic Engineering I did is more in line with this sort of thing. I did Electrical Engineering (BEng) too but that was more power and control, motors, etc, it didn't really crossover much into this territory.

Re: Learning basic electronics by building fireflies

#26
post #14

How small could you make this? Could you (maybe not with diy tools) make it the size of a firefly?

The size of a button cell if you have the patience to solder SMT parts, or make PCBs (at home or ordered). You can also purchase breakout board PCBs designed to adapt SMT (surface mount) chips to DIP (legged parts). You can quite easily use them to solder SMTs on it, cutting traces and bridging others with solder to make your own circuit.

Re: Learning basic electronics by building fireflies

#28

The juxtaposition between the cleanliness of the software and the absolute travesty of a schematic is jarring. But it still works! I applaud the author for wading into analog electronics. Pretty much everyone nowadays would just put a timer on a micro and be done in 2 minutes. No fun in that. There is something to be said about the minimal elegance of purely analog designs, and a special rewarding feeling for wrangli…

I haven't touch anything like this in a good while, how cheap could I get a simple Arduino style chip with a few gpio to drive a yellow LED in 2025?

If you just need it to blink at some interval, get a NE555 for a dime.

Granted, you can almost get a microcontroller for that price…

Re: Learning basic electronics by building fireflies

#29
> I love fireflies. But in recent years, they stopped coming for reasons I don’t know. No tiny, glowing dots in the dark like they used to. I miss them more than I expected.

Light pollution, and even more: pesticides.

Population of all insects fall dramatically.

"Three-quarters of flying insects in nature reserves across Germany have vanished in 25 years" - https://www.theguardian.com/environment/2017/oct/18/warning-...

Re: Learning basic electronics by building fireflies

#30
post #21

Earlier quoted context omitted.

I haven't touch anything like this in a good while, how cheap could I get a simple Arduino style chip with a few gpio to drive a yellow LED in 2025?

I have a bag of attiny13a that cost me $0.20 per chip. It is fully self contained. Just add a very small capacitor, give it from 2.8V to 5V. And then you program it the way you want. You can even program and debug it via a single pin if you wish. At this cost for a hobbyist it's just hard to beat. It can be anything you want it to be in a few lines of code. I personally write Rust for it, not Arduino C++, but it woul…

What toolchain do you use to compile Rust for it? I have about had enough of undebuggable random Arduino segfaults.
Post reply on HN