Live data from Hacker News

Learning basic electronics by building fireflies

a64.in

71–80 of 85 posts

Re: Learning basic electronics by building fireflies

#71

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…

[deleted]

Re: Learning basic electronics by building fireflies

#72
post #49

> so I searched the web and found tinkercad.com has a circuit simulator where you can drag and drop all the components and see if and how it works. It worked for simple circuits, but for mine, the astable multivibrator, it didn’t for some reason. I tried falstad.com/circuit; the same thing happened. It also didn’t work. I searched the web for the reason, and I’ve noticed that sometimes these simulators don’t work wel…

The naive programmer in me wants to assume, "It can't possibly be that hard to simulate a circuit," and get to work on prototyping my own simulation engine but the fact that this apparently has not ben adequately solved yet gives me pause.

SPICE (simulation program with integrated circuit emphasis) is open-source. As is ngspice, next generation SPICE.

LT-spice is just a graphical front end to make SPICE easier to use.

Yeah, analog is hard.

Re: Learning basic electronics by building fireflies

#73
post #52

Earlier quoted context omitted.

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…

You actually can: The Puya PY32 ranges from about $0.08 on up (well, $0.15 if you only want to buy 5, but the cheapest one is $0.0959 in qty 200 and $0.0676 in qty 5000+). ARM Cortex m0 in a 10-pin ESSOP-10 surface mount package: https://lcsc.com/product-detail/Microcontrollers-MCU-MPU-SOC... Kind of mind-blowing. 24mhz 32-bit computer for under a dime. But you'll learn more about the analog-ish world and not need to…

555s are so much fun. It's bananas how much you can do with that chip and a few dirt-cheap resistors and capacitors.

Make has a really nice little book where they walk you through some simple projects on a breadboard with 555s, transistors, etc. https://www.amazon.com/How-Use-Breadboard-Make-Handbook/dp/1...

Re: Learning basic electronics by building fireflies

#74
post #49

> so I searched the web and found tinkercad.com has a circuit simulator where you can drag and drop all the components and see if and how it works. It worked for simple circuits, but for mine, the astable multivibrator, it didn’t for some reason. I tried falstad.com/circuit; the same thing happened. It also didn’t work. I searched the web for the reason, and I’ve noticed that sometimes these simulators don’t work wel…

The naive programmer in me wants to assume, "It can't possibly be that hard to simulate a circuit," and get to work on prototyping my own simulation engine but the fact that this apparently has not ben adequately solved yet gives me pause.

As a practicing EE and naive programmer, It is pretty hard to build a simulation engine for electronics and even harder to build a performant engine. SPICE does this with huge matrices of differential equations and math tricks.

Theres an interesting article by Mike Engelhardt (author of LTspice) which gives hints on the details of their implementation.

https://www.analog.com/media/en/technical-documentation/tech...

Re: Learning basic electronics by building fireflies

#75
post #62

Earlier quoted context omitted.

I've heard that too. But, from my experience, it's mostly insecticides: people want mosquito-free and flea-free (and ants, roaches etc) yards, and spray/spread poison that kills them. Unfortunately, it kills everything. I cancelled my yard service and noticed that birds started coming back, chasing the food supply. Butterflies cover my lantana, and I see fireflies at night.

I live in Minnesota and the struggle is tough. Either my yard is completely unenjoyable for the family due to mosquitoes and deer flies some years or I kill 50 insects that I don’t want for every one that I do. I put up deer fly traps every year and that helps, but this year in particular has been awful for both them and mosquitoes. Luckily for the bugs my sprayer is broken and I haven’t had time to fix it. I deliber…

You can target mosquitoes more directly with mosquito dunks. It's a block of dehydrated bacteria that produces a toxin believed to only impact the larva of mosquitoes, fungus gnats, and black flies. Basically you make sure all standing water in the area is drained or has a mosquito dunk in it. You can make buckets full of yard debris and water and a mosquito dunk to attract mosquitoes to lay their eggs that then get killed.

You can also try to increase the number of predators. Create habitats for bats, dragonflies, mosquito larva eating fish, etc.

I've found picaridin lotion to be much less annoying than DEET spray but still effective this year.

Re: Learning basic electronics by building fireflies

#76
post #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-…

30 years ago, when I moved to Houston, a 1910s-1920s residential area called the Heights was somewhat famous for its fireflies -- though longtime residents would tell you they were drastically diminished from what they'd been in the 60s or 70s.

By 20 years ago, they were almost entirely gone.

Re: Learning basic electronics by building fireflies

#77

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?

Buy any dev board that includes an LED. Nordic, ST, Espressif... doesn't matter for something like this.

Re: Learning basic electronics by building fireflies

#78
post #59

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 still can't get over the fact that all electronics schematics is actually in reverse and everyone is still fine with that.

Could you explain? Most of what I work with seems non-directional, except in cases like Diodes and transistors.

Re: Learning basic electronics by building fireflies

#79

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.

It's so easy to cheat with your mental model and think in terms of "When I write 0x69 to the GPIO register, LED turns on....
Post reply on HN