Posts

Showing posts from March, 2021

Broke a pin off my ATmega328-PU. Should I buy one with bootloader pre-burnt?

You might not get the latest boot loader that way. You can buy a replacement ATmega328PU with or without the Arduino bootloader preinstalled. Adding the bootloader roughly doubles the price for single quantities by mail. I suggest a third option. Buy an Arduino Nano clone (cheapest Arduino) and a blank ATmega328-PU (28-pin DIP). Look at  how to use the Arduino As ISP sketch . It's in the Examples sketches. Use the Nano, six jumper wires, and your empty Uno board to program a blank 328 with a new bootloader. (There are nine million tutorials. Pick a few, and notice they all have mistakes or missing steps, but you can get the procedure by doing the things they all agree on.) Save your 328-PU with the missing pin. When you get good at soldering, you can repair it or solder it onto a carrier. And now you know how to update its bootloader. Here are three links I posted with this on FB. Microchip formerly known as Atmel ATmega328-PU  probably not counterfeit at Digi-key.     ATmega328-PU

RAID1 array for our home theater. LVM + md + ZFS or XFS

 We built an 11 TB RAID1 array on an Archlinux system with five big hard drives.   We used btrfs.   It was easy to add drives when the file system was empty.   But when it was 80% full, it couldn't add drives any more.   This seems to be a bug with btrfs that nobody wants to talk about. I will build a replacement array on Debian Buster or Bullseye, using the traditional Linux software RAID which is known to scale successfully to dozens of drives.   We will back up the 9 TB of content and wipe the old drives.   Or at least the first 1GB.   We will build the new array on the old drives ZFS   snapshots The new array will use pairs of partitions configured RAID1 for fault tolerant physical volumes.   All the physical volumes will be combined in one volume group.    A single ZFS file system will be built on that volume group.    That's enough new stuff that I want to practice on spare drives first.   The functions we need to know how to do are:   construct a physical volume RAID1 pa

Could the Motorola MC68000 run Linux or Windows?

 (Asked in the Arduino group) man that's so great does this devices work with an operating system like unix linux windows dos bsd ? The Zilog Z-80 (an improved intel8080) and Motorola MC68000 had no "memory management" hardware (MMU). The unix-like operating systems (including Windows-95, NT, and later) protect users and processes from each other with that hardware. They also use it to implement demand paged virtual memory , which is one of the most important architectural improvements in the history of computers. So you can't run Linux or Windows on them without adding a board full of external hardware logic. I believe that was the critical marketing mistake by Motorola. Their next generation of 68000 (68020) added an on-chip cache but no MMU. Meanwhile, Intel added a primitive MMU in the i80286. A stock IBM PC AT could run a primitive unix, but an MC68020 could not. They added an MMU in the MC68040 but it was three years too late.   Which is a bloody shame because t

Wet floor siren

Image
We fill buckets of water for the fish tank and it takes a long time so I leave the water running and do something else.   There's always a risk of water on the floor.   I built a simple alarm to detect that.   The "sensor" is basically two wires laying on the floor, and it detects a few microamps of current between them.  Dry floors don't conduct.   Wet floor (our hard water)  conducts a little. My first attempt was a failure.  I used an aspirin tablet clamped between two thumbtacks, connected to a buzzer.   It worked, but you have to replace the aspirin every time and it's not as water soluble as I had hoped.   And when the buzzer was drawing current, the chemical reaction destroyed the thumbtacks amazingly fast.   Clearly, a system with no consumable parts was needed. Design requirements, completely arbitrary: Use parts on hand only. It's a one-off, for fun, not a consumer product. Loud, distinctive alarm, you can hear it over the TV or stereo. Very low idle