Latest Posts (20 found)
Maurycy 1 weeks ago

The Tadpole galaxy:

North is up (exact, mirrored). 0.53 "/pixel [18.8' x 7.4'] FWHM = 4.2" This galaxy has a massive (and rather bright) tidal tail, but I can't see an obvious companion galaxy. The general consensus is that there's a second galaxy behind it... although a nearby elliptical has a suspiciously similar redshift: Not my finest work due to some patchy clouds, but not terrible. Callibration (dark + flat) Stacking (average w/ outlier rejection) White balance and background subtraction (no gradient removal) Asinh stretch (color preserving) Rotation + crop /astro/arp188/stacked.fits.fz : Raw stacks https://ned.ipac.caltech.edu/level5/Arp/Figures/big_arp188.jpeg : Arp's image

0 views
Maurycy 4 weeks ago

Glassblowing #2: Making a tungsten lamp and (bad) vacuum diode

Now that I have a way to run electrodes through glass , it's time to do something with that. An old school lightbulb is rather simple: just a thin wire that gets hot enough to glow. However, to produce anything approaching white light, the wire must get to around 2500 C. While conductors like tungsten or graphite can survive those temperatures, they all burn on contact with air. To prevent this, I'll be sealing my lamp in glass under vacuum: no air, no problem. Some ceramics start conducting once heated, and being oxides, are completely unaffected by oxygen. Open air "Nernst lamps" did enjoy brief popularity in the 1890-1900s, but because of the added complexity of preheating the filament, they were replaced by filament lamps once vacuum pumps became good enough for commercial production. To start, I bent some some 0.3mm diameter tungsten wire into a "U" shape, and twisted a length of very fine 0.012 mm tungsten wire onto the free ends. I cut one side of the lead frame shorter so that the filament would sit diagonally: allowing it to be reasonably long without looping it around which could result in a short. To make the bulb, I partially inserted the lead frame into a glass tube, heated the end with an oxy-propane torch and pinched the glass onto the wires: Once one end was sealed, I connected the other to a rotary vane vacuum pump, and pumped it down while lightly heating the tube to remove moisture. After a few minutes, I headed the middle of the tube to sale the bulb, and pulled off the excess tubing. After the glass cooled, I cut the middle of the wire "U" to separate the leads: Glowing at 4 volts The finished lamp glows nicely between 200 and 400 mA (3-6 V and 0.5-2.5 W): I didn't stretch the filament tight enough and it ended up touching the glass, which creates a dim spot. The glass is borosilicate, so I'm not too worried about cracking, but it's still not ideal. I've tested the bulb up to 10 volts (~7 W), which is bright to light up a whole room, and the creates white light instead of the orange-ish color seen at low power — but it also gets very hot and won't last very long. In addition to color, the filament's temperature also affects the bulb's efficiency: a low temperature filament emits the vast majority of it's light in the infrared. A hot filament emits more visible light per watt, but tungsten evaporates faster leading to early failure. This tradeoff between lifespan and color/efficiency is why most light bulbs have rather short lifespans... or at least they did until we stopped using filaments. As an experiment , I ran a length of wire through a hole in the glass tube before evacuating it: The idea was to observe thermionic emission: when the filament is white hot, the atom's have enough kinetic energy to knock electrons into the vacuum. If the cold electrode is at a positive voltage, these electrons allow a small current to flow. If it's negative, the free electrons are repelled and nothing happens. While a diode isn't terribly exciting, it's the basis of more interesting devices like triodes, X-ray tubes and CRTs. ... and it's terrible : only conducting 1 uA with 700 V of bias between the filament and anode. Reverse biased, it conducts around 50 nA, mostly from the photoelectric effect. I suspect this is the result of two problems. Tungsten wire contains trapped gasses, which are released when it's heated. To avoid ruining the vacuum, the filament should be run while pumping down the tube, which I forgot to do. Second, the anode area is really small: Its ~6 mm of 0.3 mm wire, several centimeters away from the filament. Most emitted electrons will miss the anode and create a negative charge on the glass, which impedes current flow. Real vacuum diodes surrounding the filament in a metal tube, but I didn't do that because I wanted it to work as a light bulb. Just for fun , here's a photograph of my spool of filament wire, lit by the bulb made using it: https://en.wikipedia.org/wiki/Nernst_lamp : those lamps. https://www.youtube.com/watch?v=-spTvp5-sf0 : Using one. /projects/glass/1/ : Considerations for sealing metal through glass http://www.rhunt.f9.co.uk/Glass_Blowing/Filament_Lamp_A/Filament_Lamp_A_Page1.htm : another homemade incandescent lamp

0 views
Maurycy 1 months ago

Arp 185:

North is left. 0.35"/pixel (7.7' by 20' field). FWHM = 5.5" Arp filled this under "galaxies with narrow filaments", but I don't really see why. It's a barred sprial with irregular arms and a faint extended disk. That being said, the galaxy's bar is slightly misaligned with the core: which would sudgest that it might have experienced some graviational interaction in the past. The main galaxy is at z=0.0045, and the faint background galaxy in the lower left is UGC 10509 at z=0.055. It's actually a spiral with a really intresting structure, but it's too small (and dim) to see in my image. Taken during a night with exceptionally bad seeing, resulting in a FWHM of 5" instead of the usual 3". Not that I ever get good seeing, presumably due to nearby heat sources: My telescope was set up between a asphalt road and asphalt roof. Both of these get super hot during the day and retain that heat all night. Callibration (dark + flat) Stacking (average w/ rejection) White balance and background subtraction Asinh stretch /astro/arp185/stacked.fits.fz : Raw stacks. http://ned.ipac.caltech.edu/level5/Arp/Figures/big_arp185.jpeg : Arp's image.

0 views
Maurycy 1 months ago

Making glass-to-metal seals for homemade vacuum tubes.

When making vacuum tubes, the glass is actually the easy part: premade tube stock of almost any size is easily available. Heating the end of such a tube softens the glass and allows surface tension to close it off. I used a rotary vane pump to remove all the air from the tube and heated the middle, which the atmosphere crushed to create a sealed-off ampule. Because glass is practically impermeable, it will retain that vacuum for a very long time, which can be shown by bringing it close to high-voltage AC (like a tesla coil): This glow is due to residual air being ionized, but the fuzzy appearance indicates that the vacuum is good enough to work in a triode or similar device. For those, the capacitive coupling trick won't work: I'll need to make electrodes that pass through the glass without letting air in. This is a lot harder than it might appear. Copper's red oxide bonds very well to glass . In fact, the bond is stronger than the bulk glass: when it breaks, there's always a thin layer of glass left stuck to the metal. Along with it's excellent electrical properties, it's seems like an ideal electrode material. I tried sealing off the end of the tube like before, but this time with a .75mm wire inside: The red color indicates a good contact ... and it leaks. Look under a microscope, the glass around the joint cracked as it cooled. The culprit is thermal expansion : After the glass solidifies at below around 800 °C, it contracts by around 3 μm/m for each degree. During that same degree of cooling, the copper contracts by 17 μm/m. Once it's down to room temperature, the metal is around 1% smaller than the glass around it. Since both the metal and glass are incompressible, the resulting stress builds up until something breaks. There are some metals that are well matched to borosilicate glass , like tungsten (4.5) or molybdenum (5), but they are all rather exotic. Steel wire is common, and while it's not really matched (CTE is around 11 μm/[m*K]), it's an improvement over copper. However, the carbon content of the metal produces carbon monoxide on contact with hot glass: ... but there's no reason the bulk metal has to be in contact with the glass. I had no luck plating the steel out of a copper sulfate solution: because the reaction is spontaneous, it always happens very fast and creates a fine metal power: Fe (s) + CuSO 4 (Aq) → Cu (s) + FeSO 4 (Aq) However, electroplating copper works fine in the presence of ammonia. The copper can dissolve as a tetra-amine complex, but the iron is completely insoluble under these conditions. To create a plating, the copper has to be forced with electricity: I connected the negative lead of my power supply to the iron and the positive to a piece of sacrificial copper. At 20 mA, this produced a nice coating in a few seconds: The wire should be sanded clean before plating Sealing this in glass created a bubble free seal (if it was done quickly), but it still failed during cooling: This photo was taken through two layers of glass Steel differs by ~7 μm/[m*K], and that's enough to break the glass. However, this plated wire can work in soda lime glass, which has a CTE of around 10 . This is the most common (and cheapest) type of glass, but I haven't been using it because of it's tendency to crack while cooling: Large pieces need to annealed in a furnace over several hours. ... but I did adding a bead around the wire: Instead of the wire breaking away from the glass, the two glass types broke apart. This actually made the problem worse because the bead is a lot bigger than the wire, so it expands and contracts more. Ok, I lied about tungsten wire being exotic . Filament wire is quite common, and I happen to have some. The snag is that it's 10 μm thick. I'd say it's hair thin, but that would be an understatement by almost an order of magnitude (most of my hair is around 70 μm) That's a standard 2.45 mm header. For the seal, this is a good thing: less metal means less expansion... but this size is nearly impossible to handle. I kept loosing bits of it until I started attaching bright-orange tape to the ends. Like many metals, tungsten is flammable. At this size, my oxy-propane torch is able to burn through it in under a second. This made glassworking a rather frustrating experience. I initially attempted to make something similar to a neon indicator by passing two wires through a single pinch... but invisible wire leads to invisible short circuits. Sealing a single wire in each end worked fine: ... but I had to add glass tee-joint to attach the vacuum. While the operating voltage is well above a thousand volts for a tube this size (filled with air), it does glow nicely: Neon-free neon sign. In addition to the plasma, the leads are glowing white hot. They don't have any air to cool them, are very thin and have poor thermal conductivity. Tungsten is one of the few metals that can handle this, so I accidentally got a 2-in-1 lamp. While it is an option, but I'd really rather avoid using this. Thermal expansion is a factor of size, so the smaller the conductor the less of of a problem it will be . 10 μm wire is rare, but 10 μm foil is common: you probably have some in your kitchen. I rolled out some wire into some thin (30 μm-ish) foil and tried sealing it glass: The seal looks excellent, but it leaked horribly. This technique supposedly works in soda-lime glass, where the CTE difference is smaller and the softening temperature is lower, but it's no good for borosilicate. (... interestingly, the crack formed around the edge of the ribbon, not along the surface. I'll come back to this later.) One of the weirder glass-to-metal seals is the houskeeper seal : attaching an thin walled copper tube inside a glass tube: A tube seal used on a high-voltage capacitor The hollow metal can easily stretch to release any stress from thermal expansion. However, manufacturing such a tube is difficult without a precision lathe. A thin copper disk sealed to the end of a tube should also work because it's thickness is unconstrained: the disk can increase it's radius by stretching thinner. Both are rotationally symmetrical For a long wire sealed inside a pinch, the metal's only options are to decrease it's density (very hard) or for it to pull more in from outside the glass (also very hard)... so stress builds up until the seal breaks. Producing such foil is easy with a small rolling mill although a hammer would also work. It's important to periodically heat the copper to a red heat for a few seconds. This reforms the metal crystals and allows it be worked without cracking. Looks ugly, but it's vacuum tight! Once sealed, a hole can be punched in the foil, and a wire soldered through it. Because there's no limit on the size of that wire, such a feed-through could be made to handle thousands of amps. It's also notable because it doesn't require anything fancy: just normal copper and a blowtorch. It also works with any type of glass because the coefficient-of-thermal-expansion doesn't matter. ... however, it's very frustrating to make. There isn't much margin between the temperature at which the glass will wet the copper and when the copper melts. Since the glass doesn't wick onto the metal it must be pressed on while providing even heat. There's also no way to pass multiple wires into the same tube, which complicates the glassblowing. Knife edge seals : borrowing another idea from houskeeper's work, the copper ribbon always breaks around the edges... so what they are ground down to a sharp point? On paper, this makes it much easier for the glass to contract around the ribbon: Not shown: lengthwise compression of the glass The glass around square corners must contract lengthwise along the seal, across the width of the ribbon and along its thickness. Since glass is incompressible, this can't happen and it breaks. With tapered edges, there's much less stress across the width and the glass can slightly squish to accommodate the metal. ... but it it's not enough and the seal still breaks at the edge: grumble grumble grumble Back to the tungsten : Large diameter wire is quite exotic, but not unobtainable. I was able to find some for an only slightly unreasonable price. Even .65 mm diameter tungsten has no problem being sealed through glass (after a quick sanding at 600 grit): Only 8 $/m! Under a microscope, the seal shows some small bubbles, but no separation or cracking. Unlike the filament wire, this stuff can be easy be handled, bent and welded (even tungsten is no match for an electric arc) TLDR; Tungsten wire (up to .7 mm) or copper disc seals work in borosilicate. Tungsten wire is expensive and hard to find, but is easy to seal. Copper seals use common materials but are much harder. On the topic of cheating : Put mercury or gallium into already cooled glass. Gallium expands when it freezes, which is enough to break glass. Some alloys (gallium-indium-tin) stay liquid until almost -20 C which would be a much better choice. Mercury stays liquid until -40, so this is very unlikely to happen Both of these can form a vacuum tight seal to glass, but must be prevented from flowing into the tube or evaporating. I can't think of a good way to do this, but I'm sure it's possible. Just glue it : no heat, no problem. ... but plastics aren't vacuum-tight. Molecules of gas can squeeze inbetween the polymer chains and slowly seep in. This effect is why helium balloons will slowly deflate over time, and how strongly smelling chemicals (like ammonia) escape their bottles. A glue sealed tube would work if constantly connected to a pump, but wouldn't be very practical. Lots of sources recommend treating copper with either sodium borate (borax) or boric acid prior to bonding. As a test, I used some 250 μm copper foil. I heated the metal to pre-oxidized it: ... and applied a saturated solution of sodium borate in water once it cooled: After using more heat to evaporate the solution, I sanded one side down to bare metal. ... and melted on two similar sized bits of scrap glass, making sure to push the glass down onto the copper. The foil was allowed to cool in a tray of aluminum oxide and once it was down to room temperature, I pried off both blobs: Both left a layer of glass on the metal, which indicates that the bond was stronger than the surrounding glass. The borated side was significantly harder to break off, which could indicate less internal stress? ... but that could just be because it's hard to perfectly repeat a bond made using a torch and a randomly shaped bit of glass. However, the low viscosity liquid borax should help get a bond started , making it easier to do disk seals. A low melting point borosilicate-glass paste made by adding extra borax to crushed glass should also work. Such a "solder glass" would avoid the risk of leaving a water-soluble layer inside the seal. Also , the borax side seems to have more bubbles. This is probably because I didn't get it hot enough to fully dehydrate before adding the glass. Leak testing : The capacitive glow discharge trick is handy for testing seals. Hook the unfinished tube up to a vacuum pump and spray a gas over the suspect area: If it leaks, a small amount will be pulled into the tube and change the color. As for the gas, I find the fluorinated refrigerant from a spray duster works well. Even a tiny amount will alter the color and intensity of the glow. ... but be careful: It's flammable and the fumes are awful . Only try this with good ventilation and away from highly flammable materials. (and watch for arcing around the high voltage source) Also, thanks to hugo.coredump.cx for letting me borrow their nice macro lens. DOI 10.1109/JoAIEE.1923.6593372 : Houskeeper's paper on CTE-mismatched seals. DOI 10.1088/0950-7671/7/9/304 : A paper discussing tube-style borosilicate to copper seals. http://www.rhunt.f9.co.uk/Glass_Blowing/Glass_Blowing_Menu.htm : More tube making, in soda-lime glass.

0 views
Maurycy 1 months ago

Arp 297:

Center left : NGC 5754 (z=0.015) and 5752 (z=0.015), a pair of gravitationally interacting spiral galaxies. Only the spiral pattern of NGC 5752 is visible. There is a tidal tail extending upwards, but it's too dim to see in this image. Center right : NGC 5755 (z=0.033), an irregular barred spiral galaxy. Right : NGC 5753 (z=0.032), a flocculant spiral (not elliptical) Another pair of interacting galaxies, but at a completely different redshift than Arp 297. Cool. There's actually a third member of this group (z=0.032) behind NGC 5752... although it looks like a bright blob in one of the arms: Top left : LEDA 2133199 (z=0.014) and LEDA 2132969. Not much is known about these, and I can't see much either. Callibration (dark + flat) Stacking (average w/ rejection) White balance and background subtraction Asinh stretch arp279.fits.fz : Raw stacks.

0 views
Maurycy 1 months ago

Please don't mess with links:

A link is just a button that takes you somewhere when you click it right? 100% legit link Except that's a pale, shallow imitation of a link. A real link can be: Opened in a new tab. (ctrl) ... or a fresh window. (shift) ... or saved as a file (alt). Copied as a URL (right click) Used with the keyboard (tab + enter) Seen by tools like search engines and screen readers. Hovered over to see the URL. ... none of which work with a button. Another common offense is to use a real link, but hook the click event to open a popup. However, with a real <a target="_blank"> link, I can: See the loading progress... ... or/and cancel it. ... see descriptive error pages and retry if needed. Open multiple at once. Read the original page while it loads. Use my browser's tabs or/and window manager to organize them. Bookmark the page. Copy the URL and send it to a friend. ... and above all, they are consistent: I've long lost count of how many times I've accidentally closed the whole site while trying to close a popup that was a little too convincing. It's also extremely common to click a link with a slow connection, only to be greeted with perpetual spinner. I have no idea if anything is actually happening or how long it will take. Worse, it usually covers up the original page so I can't even read that! Browsers are good at links and loading pages: It's the whole point. Don't use javascript buttons as links. Don't build your own loading animations. Link previews should open and close on hover, not on click. Don't open links in javascript popups: Use target="_blank" instead. Infinite scrolling breaks ctrl-f, bookmarks, the home/end keys and often the back button. You can have a 100k of text on a page: Browsers will render partially downloaded HTML and the user won't even notice. Using a 5 MB javascript framework just do a worse job of downloading text is dumb. To optimize speed, it's best to minimize the total number of round trips. Just putting everything in a single TCP connection will always be better than breaking it up because of TCP's slow start algorithm. Don't reimplement <details> which will break search tools and screen readers. ... but using fancy CSS to make it look nice is fine. Don't roll your own date picker (or any other built-in form inputs) This will always used the user's preferred date format, covert it to the standard yyyy-mm-dd, and works with the keyboard... also, it's one line of code that works with dark mode by default. Real links! Opened in a new tab. (ctrl) ... or a fresh window. (shift) ... or saved as a file (alt). Copied as a URL (right click) Used with the keyboard (tab + enter) Seen by tools like search engines and screen readers. Hovered over to see the URL. See the loading progress... ... or/and cancel it. ... see descriptive error pages and retry if needed. Open multiple at once. Read the original page while it loads. Use my browser's tabs or/and window manager to organize them. Bookmark the page. Copy the URL and send it to a friend. Don't use javascript buttons as links. Don't build your own loading animations. Link previews should open and close on hover, not on click. Don't open links in javascript popups: Use target="_blank" instead. https://susam.net/do-not-roll-your-own.html : Don't Roll Your Own ... /misc/13kb/ : Why using a single big page can actually improve performance.

0 views
Maurycy 1 months ago

Arp 114:

This one has two entries in the Altas of Peculiar Galaxies : Once as Arp 25 under "one heavy arm" and again as Arp 114 under "ellipticals close to and perturbing spirals". The spiral structure of NGC 2276 is somewhat unusual looking, although it's not an obvious case of tidal interaction. Hubble data suggests it's actually moving quite fast (950 km/sec) through space, which causes the lob-sided arms as it interacts with sparse gas clouds. If this is correct, the galaxy is not actually head-on as seen from earth: It tilts toward us on the eastern (top) side and away on the western (bottom) edge. This would require the galaxy to be stretched by the gravity of NGC 2300, so it's still an interacting galaxy, but in a different way. The origin of spiral structures in galaxies is somewhat debated because the arms are unstable : The inner regions of the galaxy orbit the core faster, which should mix them together into a uniform disk. It's generally believed that — instead of being physical structures — the arms are density waves traveling through interstellar gas and triggering rapid star formation, making those regions much brighter. The galaxy at the top (NGC 2300) doesn't have very much gas so it's glow is mostly composed of long-lived red stars. Elliptical galaxies like this are the majority in the universe, but are quite rare in our part of it: this is the first time I've intentionally imaged one instead of having it sneak into the background. ... although spiral galaxies have an elliptical-style halo around them. It's usually much dimmer than the spiral arms, but it is there. As for imaging, both are less than 5 degrees from the north pole , so it's one of the few galaxies that could work well with untracked photography: using a normal tripod and telephoto lens. Some of my data came from a night with really poor transparency and the rest was taken during the full moon. This was not ideal for the low surface brightness of the elliptical galaxy. The spiral galaxy is around 100 arcseconds wide (~2 jupiters) so it's not really a good match for my perpetually bad seeing: the image FWHM is around 4 arcseconds. ... but I'm not convinced clear nights with no moon or/and good seeing even exist at my place. Callibration (dark + flats) Stacking (average w/ rejection) White balance and background subtraction Asinh stretch Light denoising stack.fits.fz: 32-bit compressed FITs image https://esahubble.org/images/heic2106a/ : High-resolution hubble image. https://arxiv.org/pdf/2512.17486 : Ram pressure write up.

0 views
Maurycy 1 months ago

Notes on optimizing battery life:

Ok, so you have something with a battery, and you want it to run for a long time. I'll be using the classic CR2023 non-rechargeable lithium "coin cell" as an example, but everything here applies to other types of battery. (except the exact voltage and capacity numbers) First off, it helps to measure power draw in current and charge in well, charge. It is tempting to convert everything into power and energy, but don't. Most circuit's power draw is much closer to constant current than constant power: a single clock cycle on a microcontroller involves charging or discharging some number of MOSFET gates. That requires some number of coulombs, not some number of joules. Linear regulators turn any circuit into a perfect current sink: no matter what potential is supplied, the device sees a constant voltage and will always draw the same current. Even if you don't use any, most chips will use a few to generate internal voltages. This is the "typical" current draw of an AVR32DD32 microcontroller over voltage from the datasheet : Black: 25 °C. Yellow: 125 °C. Also, battery capacity is nearly-universally specified as charge, usually in milliamp hours: a 100 mAh battery can support 1 mA of current for 100 hours before it's "dead". (more on what this means later) Non-ideal batteries : This battery has 3 volts stamped right on it... but that's kinda of a lie: Measuring the battery with a meter, the voltage is actually 3.3 volts. However, checking the datasheet, getting the manufacturer's claimed 235 mAh capacity requires operating down to 2 volts: From the datasheet (yes, these have one) With these "CR" Li/MnO 2 cells, the discharge curve is fairly flat: a device that only works down to 85% of nominal (2.6 volts) can still use a good 90% of the capacity. However, an "Alkaline" Zn/MnO 2 1.5 volt cell falls below 80% of nominal with a quarter of it's charge remaining. The manufacturer considers them dead at 0.8 volts — around half the original voltage. In a typical circuit, two batteries will be connected in series to produce a 3 V-ish supply. To get the advertised capacity, the device must be able to run down to 1.6 volts: the same as a (fresh) single cell! Think of supply voltage like a budget : If your battery will drop down to 2 volts and the MCU needs 1.8 V, any other components involved in supplying power must not drop more than 200 mV. It's not that the same MCU won't work on two AA batteries, but it won't be able to use the last 10% or so of capacity because it requires at least 1.8 / 2 = 0.9 volt per cell. Ok, so design for half the nominal supply voltage ? Batteries have non-trivial internal resistance, which causes a voltage drop when any current is drawn: a coin cell is usually around 10 ohms, while large AA cells sit around 0.1 ohms. To understand what causes this, let's look at how a coin cell works: On the negative electrode, a piece of lithium metal looses it's electron and dissolves into the electrolyte. Li → Li + + e - The resulting ions travel over to positive electrode and steal oxygen from the manganese dioxide: 2 MnO 2 + 2 Li + + e - → Li 2 O + Mn 2 O 3 This reaction releases a lot of energy because lithium is an alkali metal the manganese doesn't really care. That released energy is actually what powers the connected circuit. Crucially, the whole thing depends on positive lithium ions reaching and reacting with the positive electrode: moving against the electric field produced by the battery. The open circuit voltage, 3.3 volts, is enough to completly stop the reaction. This is why batteries only discharge once a circuit drains some of the accumulated electrons... but for the reaction to proceed at a reasonable rate, the voltage must drop quite a bit below the measured open-circuit voltage. If you've done any chemistry, it should come as no surprise that this is affected by temperature : As a rule-of-thumb, to operate down to -40 C, plan for ten times the internal resistance at room temp. If you see the voltage rail dropping by 50 mV at 20 C, make sure there's still enough voltage to go around if it drops 500 mV. Another thing that impacts reaction rate is the amount of reagents present , or in other words, the charge left in the battery: resistance increases as the battery is drained. As a test, I discharged an Alkaline battery at 400 mA: Orange: open circuit, blue: under load With a fresh cell, pulling almost half an amp only results in 100 mV of drop, or 0.25 ohms. By the time the battery is half empty, the resistance doubled to around half an ohm. At 60% discharge, the under-load voltage has dropped below the 0.8 V "dead" threshold. Reducing the voltage requirement won't help here: shortly afterwards, the resistance increased so much my test rig needed to supply power to force those 400 mA through. The smaller CR2032 cells start at around 10 ohms, and reach several hundred ohms by the time the open-circuit voltage falls to 2 V. It follows that any circuit that draws a lot of current can not use the full rated capacity. For pulsed loads, large capacitors can help, but they have their own problems which I'll discuss later. Also, batteries get worse as they age . Electrolytes can evaporate/leak and side-reactions can form layers that impede current. There's a good chance you've experienced this: a battery that tests fine on a meter but refuses to actually power anything. What's happened is that it developed a huge internal resistance (many killohms). In series with a high-impedance multimeter, it doesn't create any noticeable voltage drop. When connected to an actual device, the voltage drops to almost nothing. This is why you should be skeptical of any claims of 20 year, 30 year, 50 year battery life. Sure, that might be what you get by dividing nominal capacity by average current draw, but there's no telling how well the battery will work after all that time: I doubt even the manufacture really knows what happens past a decade or two. There's also self discharge , where leakage currents drain the battery, even when it's sitting on a shelf: This is usually given by the manufacturer as percent of capacity per year. Because the cell's voltage doesn't change all that much during discharge, — and the current is quite small — it's a fraction of the original capacity, not of what's remaining. This alone is enough to kill a AA battery in only 5 years depending on temperature (hotter is worse)... but again, this is not the only mechanism at play: Just because self-discharge might suggest a hundred year shelf-life, doesn't mean it will actually work in a hundred years. Another "fun" effect is voltage droop : Drawing current can deplete the chemicals around the electrode, causing a temporary increase in resistance. Applying a 400 mA current pulse to a half-empty ZnMnO 2 500 mAh cell caused the internal resistance to triple over the course 40 seconds: Yellow: cell voltage. Blue: Current Eventually, the battery does recover, but it took a good minute or so: Actually a trace of a different pulse, so the starting voltage is higher. What's interesting is that even though no current is being drawn, the battery circuit voltage is still not back to where it should be. This is where the "resistance" model starts to break down. It's more accurate to say that the pulse temporarily pushed the cell down it's discharge curve: increasing the resistance and decreasing the open circuit voltage. This gets worse when the battery is nearly empty: I applied a similar 10 second pulse to an 80% drained cell, it took around 5 minutes minutes to for it's open circuit voltage rise back above 0.8 volts. This effect highly variable depending on temperature (colder is worse) and state of charge, so it's good to include a wide voltage margin when designing a circuit that will draw sustained current. In short , internal resistance increases when... ... it's cold ... the battery is close to being empty ... the battery is used ... you do nothing at all Plan for a much worse voltage drop than what you see on your workbench: it's possible to loose as much as a volt per each mA drawn with a mostly empty coin cell on a cold night. With that in mind , it's time to look at those capacity numbers. As already discussed, aiming for longer than a decade or so is largely pointless because of battery aging. These CR2023 batters have quoted shelf life of 10 years, so it's going to be my target: From a CR2032 (~230 mAh), a device can draw an average of 2.6 uA if it runs down to 2 volts. From a AA (~3000 mAh) AA battery, a device can draw 34 uA if it runs down to 0.8 volts per cell. ... so we have a voltage budget and a target current. Keep in mind that internal resistance will cut into the voltage if when draw pulses in excess of a few microamps. Measurement techniques: These small currents present a problem: most multimeters don't really do well below a microamp. Benchtop models that can measure down to the nanoamps exist but are quite expensive. On paper, measuring current is easy: Insert a known resistor into the circuit and measure the voltage drop across it... except this either requires adding a large resistance or measuring a tiny voltage. A better way is to use an op-amp to hide the voltage drop from the device under test: The amplifier tries to keep its two inputs at the same voltage, which requires it to exactly match the device's current through the feedback resistor. This results in exactly the same voltage as if it was used as a shunt, except with zero burden voltage. Since most chips have two opamps, I use the other to create a VDD/2 supply rail which is used as the ground. This allows the chip to have access to voltages both above and below it. Most modern chips are "rail-to-rail", meaning they are designed to operate close to one of the supply rails... but this doesn't work too well: Consider what happens when the input current drops to zero. The amplifier has to pull the output (with a non-trivial amount of capacitance) down to zero. If the best the amplifier could do is connect the output to the negative rail, the voltage would exponentially decay, approaching zero but never reaching it. Would this be a huge problem? Probably not. Is it a good idea to make the chip's job as easy as possible? Yes. As a bonus, this allows the device to measure currents in both directions. Using the 100 pA/mV range, the circuit has an offset of ~10 pA, so it's not quite a picoammeter, but it's close. This makes it good for testing the leakage of MOSFETs, diodes, capacitors and the such. However, this design has one huge snag: It's zero burden voltage up to a fairly modest point. Once the output maxes out (100 nA - 100 uA depending on the range), the device will can see the full shunt resistance. This is a non-issue for testing component leakage, but it becomes a problem when measuring the current drawn by a microcontroller. For measuring sleep current, it's best to build a firmware image that never wakes up, and short the meter's input or connect a second power source during startup. Another option is to use a tiny feedback resistor: connecting a 1 kohm resistor between the input and output yields a 1 uA/mV range with a maximum of 1 mA. Once the microcontroller boots, the resistor can be removed to measure it's sleep current. (and if you are drawing more than this, you probably shouldn't) This is also a good trick to avoid crashing MCUs when switching ranges, which can cause a momentary disconnection depending on the geometry of your selector switch. Shielding is not optional : 100 picoamps is a kind of current that floats around on the air. It's best to put the whole setup inside a metal box connected to the meter's ground. Running coax to a scope or meter is fine because the wire's sheath is connected to the rest of the shield: this isn't RF stuff. If you don't have a box, wrapping the whole thing in aluminum foil works almost as well. (make sure it's not touching anything!) Also, it's a little silly to carefully screen out interference only to reintroduce it with a power supply, so it's best to run everything with batteries: Two 1.5 volt alkaline cells provides 3 volts and four is close enough to 5 volts. Also, be careful with what's touching the meter or part under test: a post-it note can easily conduct a whole nanoamp at 5 volts. Wood and fabric are similarly problematic. If in doubt as to if something is a problem, test it. When measuring capacitors, there's a really annoying property to be aware of : The dielectric material can slowly absorb or release charge over multiple hours. This effect is mostly known for recharging high-voltage capacitors after they've been removed from circuit — with unpleasant results — but it can also result in a deceptively high leakage current that goes away if the capacitor is used in a real circuit. Unless you have fancy polypropylene capacitors, you'll have to leave them in the test rig for several hours before taking a reading. Circuit testing : Of course, it's not enough to test individual components. The whole system has to work correctly with an imperfect power supply: A device running on a coin cell should be able to tolerate the full 1k with a two volt supply. ... also, it's a good idea to simulate a dead battery: an empty battery shouldn't result in hardware damage or data loss. Temperature can greatly effect leakage currents. If you expect the components to get up to 80 C, grab a heat gun and see how it performs at those temperatures. Practical advice: Before considering any components, does to circuit board itself consume any power? There's lots of people on forums saying you shouldn't use a soldermask, or that flux on the board causes leakage... For testing, I used a nothing special JLCPCB, green, FR4, 2-layer board. It had two quarter millimeter traces 30 mm long and separated by 2.7 mm. For the measurements, I used a 9 volt bias, which should represent worst case results: Clean : Testing the board as it came from the factory Humid : Breathing on it for a few seconds (99% RH, no visible condensation) Fingers : Touching it to get skin oils on the board Rosin : Spread some RMA flux and burned it with a soldering iron. Board condition and soldermask Current Soldermask, clean < 5 pA Soldermask, fingers < 5 pA Soldermask, humid < 5 pA Soldermask, rosin < 5 pA No soldermask, clean < 5 pA No soldermask, fingers 10 pA No soldermask, humid 30,000 pA No soldermask, rosin 20 pA The main troublemaker is humidity. If you are designing a circuit that needs to work outside, underwater or underground, it would be a good idea to include some desiccants: most plastic will allow water vapor to permeate inside. The soldermask prevented any significant leakage between traces, but problems could still happen between component pins. Conformal coatings will protect against short exposures, but will suffer from the permation problem. Soldering residue or skin oils aren't a problem unless you are doing picoamp metrology. Capacitors : Electrolytic or tantalum capacitors can leak multiple microamps at just a few volts: A jellybean 100 uF 16V electrolytic pulled 26 uA at nine volts, which is ten times the entire current budget for a CR2032! That cap alone could discharge the battery just a year or two. Ceramic capacitors a lot better: I grabbed a random 1 uF capacitor from my parts bin initially pulled several hundred nanoamps, but it dropped down to 920 pA @9 volts after two hours. Even a hundred of these would only draw 92 nA, which is only 3% of the budget. TLDR ; Don't use electrolytic or tantalums. Ceramic capacitors are fine in reasonable quantities and when run well below their rated voltage. Diodes are very commonly used for reverse polarity protection, but there are two possible configurations: A series diode uses a forward biased diode to prevent reverse current from getting to the device. A parallel diode adds a reverse biased diode to clamp the reverse voltage before the device is damaged. In the series configuration, voltage drop is very important : Real diodes are quite different from the idealized model. The voltage drop of a 1N4148 is only 0.6 V at 1 mA of draw and at 25 C. The relationship between current and voltage drop is roughly exponential: For a silicon PN diode, passing 10 times the current requires an extra 100 mV. This also works in the other direction: A circuit that only needs 10 uA (peak) will only see around 0.4 volts of drop across that diode. Temperature affects this: The threshold will rise ~2 mV for each degree the diode is cooled. At -40, expect 130 mV of extra voltage drop compared at room temperature. A Schottky diode has a much lower threshold voltage: 1 mA of current only needs 0.25 V. This can be a huge improvement to your voltage budget, although it's still a non-trivial amount. In the parallel configuration, reverse leakage matters . Because it's highly dependent on voltage, I measured a few diodes at 5 volts, which is closer to normal operating conditions: 2N4148 [PN] @5V: 2.3 nA BAT46 [Schottky] @5V: 2.4 uA In this test, the schottky doesn't do so well: It's three orders of magnitude worse than a similar PN diode. So, use a PN diode right? Well, if the battery can supply 50 mA into a short (fresh coin cell), there might be around a volt across the device. That can be enough to cause damage. So, what's a good reverse polarity protection circuit? An n-channel low-side switching version is also possible A MOSFET can act as a near ideal diode: If the gate (connected to the negative rail) is in fact, the lowest voltage, it's switched on. If the battery is inserted backwards, the gate now has the highest voltage in the circuit and the transistor stays off. However, it's still important to consult the datasheet or conduct experiments: the battery voltage might not be enough to fully turn on the FET, and even a properly "on" MOSFET still has a voltage drop. The final option is nothing: Battery clips that physically prevent a user from inserting a battery backward exist. These have no electrical penalties except for the contact resistance (which is negligible when compared to the battery's). Schottky leakage also poses a problem for dual power supply circuits. A microamp of backfeed into the backup battery can actually be enough to damage it. In these cases, you may be forced to use a PN diode or use a variation of the MOSFET trick: connect the gate to the primary supply rail. This will, at a minimum, perform as well as a silicon diode because of the transistor's intrinsic body diode. Once the power rail drops down to zero, the MOSFET's gate will be negative and it will turn on. However, it's performance won't be perfect if the main rail takes more than a millisecond or so to loose voltage. It's best to plan for a PN diode drop and consider any extra voltage as be a nice bonus. Computers : In theory, CMOS logic doesn't draw any power when sitting idle. In practice, it absolutely does. An 8-bit AVR128DD28 microcontroller draws 1.5 uA during sleep mode. Connecting a 32KHz crystal and using the integrated RTC to provide wake ups bring it up to 1.8 uA. This leaves just 700 uA of average current to work with. Ok, but at some point, the processor has to do something. Each clock cycle has a fixed cost: For the AVR, I measured it at ~0.28 nanoamp seconds, meaning that the battery has enough power for 3,000 billion cycles. Individual clock cycles on an AVR128DA28 running at 32 kHz. However, it's almost always a good idea to use a slow clock: The chip will draw an extra 277 uA of current draw per MHz. At the default four MHz clock speed, that's just over a milliamp. There's no guarantee the battery will be able to supply that kind of power. Decoupling caps aren't going to save you here: 1 mA is enough to drain a rather big 1 uF capacitor at 1 volt per millisecond. (remember, no electrolytics allowed.) Since the MCU has a minimum voltage of 1.8 volts, and the batteries can go as low as two, it's only safe to run like this for 200 microseconds / 800 cycles! However, running at 32 kHz only draws an average of 10 microamps. There are still current pulses from each clock cycle, but there are small enough to that they only drop a 1 uF capacitor by 0.27 millivolts. The processor does draw more a bit more quiescent current while running then in sleep mode. This is why some people suggest you should run at the maximum clock speed to save power... but while it is more efficient on paper, it simply doesn't work with real batteries. This also lets us calculate how long it can run for: 10 microamps is 14 times the remaining 700 nanoamp budget, so the processor can be running 7% of the time. Also, on this particular MCU, wakeups cause a big current pulse: Because of stray capacitance, applying power to the processor costs a whole 2.62 nanoamp seconds. With a 1 uF capacitor, this would drain it by 2.62 mV. However, with smaller caps like 6.8 nF, it could would discharge them a whole 385 mV. Stuff like this is why I'd recommend using around a microfarad: A decent 1 uF (MLCC) ceramic rated at a few times the supply voltage will leak almost nothing. To be fair, the datasheet does recommend this value, but plenty of people are in the habit of using smaller ones: When you have a 5 volt supply, loosing a third of a volt is not a big deal. Using a 3-but-actually-2 volt battery, it's enough to drop below the chip's minimum operating voltage. Some parts claim a much lower sleep current (in the nanoamps), but that's without retaining memory: Most applications can't use these modes. Consider a data-logger. Because flash consumes the same amount of power when writing a few bytes or a kilobyte, being able to buffer readings actually saves power. ... although there are some applications where a feature like this does make sense: This is something you have to consider before taking sleep current specs at face value. ... it's cold ... the battery is close to being empty ... the battery is used ... you do nothing at all Clean : Testing the board as it came from the factory Humid : Breathing on it for a few seconds (99% RH, no visible condensation) Fingers : Touching it to get skin oils on the board Rosin : Spread some RMA flux and burned it with a soldering iron. https://ww1.microchip.com/downloads/en/DeviceDoc/AVR128DA28-32-48-64-DataSheet-DS40002183B.pdf : The discussed microcontroller. https://data.energizer.com/pdfs/cr2032.pdf : Example battery datasheet https://lcamtuf.substack.com/p/real-mlccs-and-inductors-have-curves : Another footgun with capacitors

0 views
Maurycy 2 months ago

Search engine results are truly terrible

A few months ago, I had the displeasure of trying to use the modern web without an ad-blocker. Even though it's is ubiquitous among computer nerds, ad blocking is quite rare even in other technical fields. This got me wondering how search engines perform without all the tricks people do to get better results. As a test, I wrote a few queries for... common software: ... obscure, but easy to find information: What is the lowest K-alpha emission energy of Molybdenum? ... and few normal(-ish) questions: What photodiode circuit should I use? How do airplane wings work? Why are brushed motors most efficient at high speeds? Asking a search engine questions is almost never the best way to find good information, but it's what I've seen a lot of people do. To replicate the experience of a normie/victim I made sure to include the AI summary, sponsored results and info boxes: TLDR ; No tool produced consistently good results. This isn't a matter of my standards being to high: good results for all these queries exist on the web, but they all failed to find them. They had a real problem with returning vaugely related blogspam. Having a good result in the top 3 was fifty-fifty. For the ad blocker and molybdenum, ChatGPT was able to produce a good answer, but it's responses were deeply flawed or outright incorrect for the other three questions... largely because it was rephrasing the same spam that tripped up all the others. Marginalia generally did very poorly, but it was the only one to perform decently on the motor question: All the others returned surface-level AI slop, while it found a nice writeup on motors that answered the question. Grading scale: Good : First result is correct and not spam. For the questions, I'm not looking for a text book: a single sentence explanation is perfectly fine provided that it explains the right thing and holds water. Ok : Some spam/incorrect/incomplete/irrelevant pages, but a good result can be found in the first three links. Just to be clear, this is not a good outcome: it means the top result was wrong or spam. Bad : Same as ok, but using the first five links. Crap : First five results are all wrong, spam or spammy scams. Five might not sound like a lot, but given the amount of junk in a modern search engine interface, it's really quite rare for people to scroll pass those first five results. ChatGPT isn't a search engine , so I ranked it on correctness of the answer: Good = Correct and well explained. Ok = Correct, but not very good. Bad = Incomplete. Crap = Wrong or incomplete to the point of being harmful. Detailed results: ad blocker For ad blockers, I'll only accept uBlock Origin or DNS based solutions. In order to work, an ad-blocking extension needs a huge amount of access to your browser: it's not a good idea to take chances. uBlock Origin is free, open source (so you can see what it's doing) and very effective: Paying a difficult to cancel subscription for a inferior product is not a good idea. A lot of those shady extensions also have identical pricing plans, which make me think they are slop-ware pumped out by one guy. I don't have proof that they are scams in the strict sense, but it is rather suspicious. " Ad block - [...] - Chrome web store ": Charges a $40/year subscription, allows "non-intrusive" advertising and collects data. " AdBlock Plus ": Same deal. Infobox linking to https://getadblock[.]com/ : The usual. " Get AdBlock ": ditto. " uBlock Origin ": Finally, a good result. Just in time to save google from the "crap" tier, but I doubt it's early enough to stop someone from being scammed. Verdict: bad. " Adblock Plus ": Same as google's #2. Infobox with " https://www.windowscentral[.]com/how-block-ads-and-trackers-xbox ": an ad-filled blog-spam site. It does provide reasonable instructions, but good luck reading it without an ad blocker. A second infobox linking to " Adblock vs Adblock Plus - PC Guide ": an ad-laden blog-spam comparing two sub-par extensions. (both allow "acceptable ads") " uBlock Origin ": Good, but why is it so far down? " AdBlock — block ads across the web ": The usual scammy adblocker extension. Very similar to google's top four results. Verdict: bad. " Adblock Plus " same as google's #2 " Ad block - [...] - Chrome web store ": same as google's #1 " Adblock Plus ": Yet another shady adblocker with a $40/year subscription " The Ethical Ad Blocker " (infobox): A blog post describing an ad-blocker that blocks access to any websites that have ads, which prevents any accusations of piracy. Funny and probably real, but not what users are looking for. " AdGuard Ad blocker ": Yet another of those nearly identical sketchy adblockers. Kagi is the first search engine to not include uBlock in the first five results, but it does link me to someones's rather cool blog... however, I still had to scroll past quite a bit of junk to find it. Verdict: crap. DuckDuckGo : " Adblock Plus ": same as google #2. " AdBlock — block ads across the web ": same as google #1 " uBlock Origin ": Finally, in the top 3! " getadblock[.]com ": More junk. " AdBlock — block ads across the web ": Same as #2, but on Microsoft's extension store instead of googles. Verdict: ok. Marginalia : " Ghostery Ad Blocker ": Yet another blocker that doesn't actually block ads, and has been caught selling data to advertisers. " Ad blockers are not allowed on YouTube " A blog post with a half-baked list of ways to get around youtube's ad-blocker detection. Indirectly recommends uBlock, but also a lot of stuff that won't work. Not great. " Vivaldi ": Chrome with a built in adblocker. Not a scam, but you don't need to install a new browser to block ads. " EasyList is in trouble and so are many ad blockers ": Corporate blog post about hosting problems. " Ad Blockers - Contains Moderate Peril ": A blog post about ad-blockers, recommends "AdBlocker Ultimate". Not a spam, but not the best recommendation. Verdict: Crap. Marginalia's results are quite different from all the other search engines: It's pulled out two real blog posts alongside the usual spam. (Note: I modified the prompt to "Recomend me an ad blocker.") The LLM recommended [1] uBlock Origin Lite, which is a variant of uBlock for modern chrome, by the same author. The Lite version is technically more limited than the original, but still works works very well. It also suggested [2] "AdGuard AdBlocker", but only as a fallback. Verdict: Good. ... Molybdenum : "What is the lowest K-alpha emission energy of Molybdenum?" Despite this being a straightforward table lookup, all the LLM-summaries got it wrong: The lowest energy line is Kα 2 (17,374 eV), not Kα 1 (17,479 eV). The reason for this is that X-ray lines were first observed using diffraction, and measured by wavelength, which is inversely proportional to energy: Kα 1 is has a shorter wavelength, but higher energy. Incorrect AI overview citing a paper. The paper lists both K-alpha lines, but the LLM used the wrong one. Table from Lawrence Berkeley National Lab : lists the correct value. Another table , this time from an equipment manufacturer. Lists the correct value. A paper characterizing the X-ray fluorescence spectrum of molybdenum. "Characteristic X-ray - Wikipedia": an overview of X-ray emission lines, but it does not give any specific energy values. Not a relevant result. Verdict: ok. Wrong AI overview citing google's #2: It made the same mistake with Kα 2 and Kα 1 . " Molybdenum ": A nice little page from LBL listing some technical properties of molybdenum. This is the most relevant result so far. " 12.1: Fundamental Principles ": an article that happens to use molybdenum as an example, but lists wavelengths instead of photon energy. " Experimental K-alpha x ray energies ": a table of emission lines. The same paper as google's #4. Verdict: ok. A very wrong AI overview giving "0.709 eV": off by four orders of magnitude! I suspect it took the number from Bing's #3, but instead of actually converting the wavelengths to energy, it just slapped an "eV" on. Same table as google's #2. A good result. Same as google's #3. A good result. A page about the theoretical calculation of X-ray lines. Does not provide an energy for molybdenum. A list of chemical properties of molybdenum. Does not mention X-rays. This nicely demonstrates the problem with LLMs: A chatbox usually gets things (mostly) right, but will occasionally be very, very wrong. Verdict: ok. DuckDuckGo : Incorrect AI overview referencing a NIST publication . Same as bing #2. A good result. Same as bing #3: not relevant to the question. Same as google #4. A good result. Some data table : a perfectly fine result. No surprises here: It's a few good sources and a slightly wrong LLM summary. Verdict: ok. Marginalia : "Plasma catalytic non-oxidative conversion of methane into hydrogen and light hydrocarbons": A preprint paper that used X-ray equipment and mentioned molybdenum in passing. "XRF Technologies for Measuring Trace Elements in Soil and Sediment": Similar to #1. A paper that used X-ray equipment and mentions molybdenum, but does not answer the question. Marginalia doesn't try to be a comprehensive index, so it's unsurprising that it did badly on this one: only two results were returned, and none of them included the requested number. Verdict: crap. Chat gave 17.37 keV, which is the correct value. Good job on being the only LLM to answer a simple question correctly. ... Photodiodes : "What photodiode circuit should I use?" Photodiodes are excellent light sensors, but their output is a small and difficult to measure current. Generally, the best way to fix this is with a transimpedance amplifier: an op-amp circuit that converts the current into an output voltage while keeping the sensor's bias constant. This provides a fast and exceedingly linear response. An ideal result would also mention techniques like bootstrapping (to increase bandwidth of large sensors) and logarithmic converters (to measure a wide range of light levels). AI overview citing #4, recommending a transimpedance amplifier, but it provides a schematic of a different configuration. "Photodiode – A Beginner’s Guide": A blog-style website with circuits that don't work, are missing important details and have poor explanations. "Photodiode Basics": Ad-ridden page which does include the rough layout of a transimpedance circuit, but with no mention of feedback capacitors. These are often needed to prevent oscillation. "What are the pros and cons for the various photodiode circuit arrangements?": A forum thread that mentions transimpedance amplifiers, but doesn't give any specifics. "Photodiode Component Basics [...] - Youtube": Video with a demonstration of a photodiode working, but without any amplification or readout circuits. Verdict: Crap. AI overview citing #2, but it recommends a bad configuration with a resistor in parallel with the diode. The output is non-linear, high-Z and, difficult to use. "Photodiode – A Beginner’s Guide": Same as google #2. A bad result. "Photo Diode (Symbol, [...] Pros & Cons) Explained - Youtube": Another super generic video. "Fire Detection Circuit Using Photodiode": Content farm video with no schematic and no explanation. "Photodiode Construction and Working - Youtube": Another extremely generic explanation video. Does not include any circuits or even discuss the problem. Verdict: Crap. "Photodiode – A Beginner’s Guide": Same bad article as google's #2. "Photodiode Basics": The same as google's #3: incomplete circuits on an ad-ridden page. "What are the pros and cons for the various photodiode circuit arrangements?": Same as google #4, an unhelpful forum thread. "PHOTODIODE OPERATION MODES AND CIRCUITS": Provides an example of a transimpedance amplifier, but has no example values or instructions on selecting them. " Technical notes / Si Photodiodes ": A PDF from a photodiode manufacturer, which provides practical circuits and a description of photodiode properties. This is the first results that provides enough information to actually build a working sensor. Verdict: Bad. DuckDuckGo : "Photodiode – A Beginner’s Guide": The same as google's #2, meh explanations and some of the circuits don't work. "Photodiode Basics": Same as google's #3: Incomplete circuits on an ad-ridden page. "PHOTODIODE OPERATION MODES AND CIRCUITS": Same as kagi #4. Not good enough to build a working circuit. "A Practical Guide to Photodiode Amplifier Circuit Design [...]": A marketing piece for a equipment manufacturer. Unlike the Hamamatsu appnote, this doesn't have any useful information. " Technical notes / Si Photodiodes ": Same application note as Kagi #5. A good result. Verdict: Bad. Marginalia : "PIN Photodiode gamma detection amplifier circuit - rectangular wave output": Forum post with a broken circuit. Not something you want to copy. "Circuit Diagram": An unrelated forum post about an XKCD comic. "Short Circuit Limiter": Unrelated blog post. "NES Cartridge Chaos: [...]": Unrelated blog post. "How can i increase the range of values that a light sensor gives?" Forum post showing an ok configuration, but with no explanation or information on how values should be selected. Verdict: Crap. Chat gave a very wall of text boiling down to "use a transimpedance amplifier", but with no explanation of what that is or why it's good for light detection. It also drew a nonsensical "schematic" which would be of no use to anyone trying to build one circuit: Hidden in the "citations", it did link to a reference designs from texas-instruments... and an AI generated blog-spam post. I'll bin it under "Bad". ... Wings : "How do airplane wings work?" The simplest reasonably correct answer is that wings are angled to push down on the air, which lifts the plane up. The fluid mechanics happening around the wing are very complicated, but I'll accept a good one sentence explanation. Of course, more rigorous and detailed explanations are fine, but they must actually be rigorous: many explanations add complexity in a way that results in more gaps. Also, there's a very common wrong answer (equal-transit) which asserts that the air takes the same amount of time to travel over the top and bottom of a wing. Therefore, since the top surface is curved, the air must move faster. By Bernoulli's principle, a higher flow velocity creates low pressure, and that low pressure region that pulls the wing up. This is wrong for multiple reasons: It violates the conservation of momentum, because the wing doesn't impart any momentum to the air. Obviously, fans work. Airplanes can fly upside down... which shouldn't be possible if lift is some special property of the wing's shape. Paper or balsa-wood planes with flat airfoils work fine. Other explanations go "something something Bernoulli", which is not technically wrong, but is deeply incomplete: Bernoulli's principle does come into play around a wing, but using it as an explanation requires showing that air speeds up as it travels over the top surface — something which can only happen because of a pre-existing low pressure region. These explanations does not hold water on it's own. Would a proper analysis of the airflow over a wing be a good result? Of course. Is it enough to point at a tiny fragment of that and handwave it as an explanation? No. I'll consider this as a bad result, because it's neither a good explanation, nor a useful model: Wrong models can useful if the truth is complicated, but this is quite the opposite. "Planes stay up because they push the air down" is simple, correct and builds intution. For example, it predicts that the pressure on the ground should increase as a plane flies over it... and it does. "Planes stay up because of Bernoulli" doesn't explain anything if you think about it for two seconds. All it does is bring in some math that isn't relevent until you read the rest of the textbook. AI summary citing a TikTok video which contains the "something something Bernoulli" argument. Not entirely wrong, but needlessly complicated and incomplete. How wings really work : A professor debunking "equal transit" with an experiment... nice, but a debunk is not an explanation. " How Airplane Wings REALLY Generate Lift ": A youtube video with the correct explanation. A good result. "ELI5: how does a wing work? - Reddit": Reddit thread, most comments are correct, but many are repeating the incorrect explanation. " How Wings Work ": A page with a mostly correct animation, but no explanation of what's happening. Verdict: Ok. AI summary stating the incorrect equal-transit explanation. Seems to be referring an an old Glenn Research page with the incomplete explanation. " Airplanes ": A correct article which calls out the incorrect bernoulli argument. A good result. The same correct video from Google #3. "How Airplanes Work: A Simple Explanation for Beginners": A youtube video giving the incomplete explanation. "How Wings Work": Same as google's #5. Verdict: Ok "How Does A Wing Work? - Science Through Time": AI slop video with an bad answer. I can't tell if this it is the "equal transit" model or the incomplete one, because it doesn't include anything resembling detail or logic. " How Does A Wing Actually Work? ": A Veritasium video on youtube, with the correct explanation. A good result. " How airplane wings work ": A cool video showing airflow over a wing, during normal flight and a stall... but it's not an explanation. " How Does A Plane Wing Work? ": Correct explanation and demo. "How do airplane wings work?": Explains the structural components of a wing, but not why it's able to create lift. Verdict: Ok "Learn How Airplanes Work": A page that lists the parts of a plane, and gives the incorrect "equal-transit" explanation. How planes work : An article with a brief, but correct explanation. Dynamics of Flight An old article from Glen Research with the "something something Bernoulli" explanation. "How airplane wings actually work - Today Plane crash": AI Slop article, wrong answer. "How wings work": an animation of airflow, but does not have an explanation Verdict: Ok "How do I explain what makes an airplane fly to a non-technical person?": Forum thread of people asking the same question. A few answers are correct, but a lot aren't. I'll bin it as a bad result. "How do the Americas Cup Yachts sails work?": Forum thread about sailing. "How do I keep my futuristic racing hovercraft from becoming airplanes?": Forum thread about fantasy hovercraft. "How is the fatigue life of an airplane wing flexing during turbulence determined? How do they keep track of it?" Forum thread on accelerated life testing and maintenance of aircraft. "How do you scale a svg img to fit container?" A CSS question that just happens be about an image of an airplane. Verdict: Crap. Says that wings create lift, and then states that this is because the shape speeds up the airflow faster over the top surface (why?) therefore, by Bernoulli’s principle, the pressure is lower on the top surface. This is the second category of bad explanations. Verdict: Crap ... Motors : "Why are brushed motors most efficient at high speeds?" Electric motors work by passing a current through coils, which creates a magnetic field. These magnetic field pushes against permanent magnets to create torque. To create continuous rotation, the direction of current and field must be constantly reversed to prevent the motor from locking up after half a turn. This is either done using mechanical switches (brushed motors), transistors (BLDC/stepper), or by running the device from AC power (synchronous motors). Either way, the the strength the magnetic field inside a motor determines it's torque, but the mechanical power is torque times rotational speed. However, resistive losses in the coil windings don't care about how fast the motor turns and are proportional to current. Therefore, at low speeds, more losses are incurred during each rotation, and the motor is less efficient. This is why motors are almost always geared down : Even if they can produce enough torque, it's a bad idea to run them anywhere except right below their unloaded speed. (efficency aside, the heat produced can damage them) Incorrect AI summary citing the AI slop in #2. "Comparing Energy Efficiency of Brushless vs. Brushed Motors": Slop blog that claims the high speeds reduce losses in the motor's commutator, which simply isn't true. Commutator losses (arcing) generally increase with rotational speed. "Brushless Vs Brushed DC Motors: When and Why to Choose One Over the Other": AI slop advert. Does not answer the question. "What’s the difference between a brushed and brushless motor, and is one better than the other?": Reddit thread that states that brushed motors are less efficient, but gives no explanation. (also, that's not what the question asked...) "The Advantages of Brushed Motors: Powering the World with Efficiency and Simplicity - Magmotor": AI slop, doesn't answer the question. "Brushed vs Brushless Motor: Key Differences, Performance, and How to Choose": AI slop, doesn't answer question. This is the first time I got 5 obvious AI slop results. It's not a good sign for the rest... Verdict: Crap. AI summary citing #2. "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop that doesn't answer the question. It also states that motors produce more power at high speeds, which is true, but doesn't explain the question. At any given voltage, a motor has a torque at which it stalls and a maximum speed that's reached under no load. As you would expect, the motor makes the most power at roughly the half-way point between these two... but the efficiency is best at the extreme end of the speed range. "Comparing the Efficiency of Different Electric Motor Types": AI slop, doesn't answer the question. "Are Brushed DC Motors Still Relevant? Efficiency, Smart Control, and New Applications Explained": More AI slop. Doesn't answer the question. "Brushed vs Brushless Motors: Comparing Efficiency, Lifespan, and Performance Metrics": AI Slop. Doesn't answer question. Verdict: Crap. DuckDuckGo : AI summary citing "Brushed Motors vs. Brushless Motors": Neither answer the question. "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop. "Comparing the Efficiency of Different Electric Motor Types": AI slop. "Brushed vs Brushless Motors: Comparing Efficiency, Lifespan, and Performance Metrics": AI slop. "Are Brushed DC Motors Still Relevant? Efficiency, Smart Control, and New Applications Explained": AI slop. Verdict: Crap. AI summary citing "Brushed DC Motor Theory": A page on a wiki run by Northwestern University. Talks about efficiency being zero under stall — which it is — but that's not what I asked about. "Brushless Vs Brushed DC Motors: When and Why to Choose One Over the Other": Probably human written, but doesn't answer the question, instead comparing two motor designs. (The efficiency curve is similar for both.) "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop. "What’s the difference between a brushed and brushless motor, and is one better than the other?": Forum thread that isn't about the question and doesn't answer it. "Comparing the Efficiency of Different Electric Motor Types": AI Slop. Verdict: Crap. Marginalia : "Why does a Tesla car use an AC motor instead of a DC one?": A Forum thread that doesn't answer the question. Hobby CNC machining and resin casting : Lcamtuf is really good... but this isn't a page about electronics. It does mention motors, but gives no explanation for why there efficiency curve peaks at very high RPMs. CSC 297 Robot Construction: Driving Motors : A long and detailed website, that actually answers the question! The first actually relevant result. "Stepper motor - Wikipedia": Wiki page on a different type of motor. "Brushless vs. Brushed Motors [New for 2026]": AI slop. Verdict: Ok A win for marginalia! Only a single AI slop page was returned, and two of the results were detailed write-ups on motors and robotics: not LLM generated, not surface level blogspam, but actual resources that you can use for learning. Age is best indicator of a quality website: If it was written decades ago, and it's still up, someone decided it was worth keeping around for all these years. While the #3 result doesn't have a date, but it uses handwritten HTML which is quite rare nowadays. I'd guess it was written somewhere between 1990 and 2010... and this one's has been maintained as late as 2017, so they take some pride in what they wrote. This is what we loose when google promotes new content: well written pages by real people who actually care instead of a 5 minute rundown for hackernews. Chat provided a generally correct explanation, but it seems to have confused the questions with: "why do motors draw less current when when spinning quickly?". After some waffling about Back-EMF, it handwave that because the current decreased, the losses decreased — ok — and efficiency must be better... but that simply isn't true: Efficiency is the ratio of output power and input power. Under no-load conditions, the motor is drawing the minimum possible current, but it's also not producing any usable mechanical power, so it's efficiency is zero. Not only does the LLM's logic not hold water, it's much more complicated then the truth. Verdict: Crap. What is the lowest K-alpha emission energy of Molybdenum? What photodiode circuit should I use? How do airplane wings work? Why are brushed motors most efficient at high speeds? https://www.cs.rochester.edu/users/faculty/nelson/courses/csc_robocon/robot_manual/motor_drivers.html : That write up. " Ad block - [...] - Chrome web store ": Charges a $40/year subscription, allows "non-intrusive" advertising and collects data. " AdBlock Plus ": Same deal. Infobox linking to https://getadblock[.]com/ : The usual. " Get AdBlock ": ditto. " uBlock Origin ": Finally, a good result. Just in time to save google from the "crap" tier, but I doubt it's early enough to stop someone from being scammed. " Adblock Plus ": Same as google's #2. Infobox with " https://www.windowscentral[.]com/how-block-ads-and-trackers-xbox ": an ad-filled blog-spam site. It does provide reasonable instructions, but good luck reading it without an ad blocker. A second infobox linking to " Adblock vs Adblock Plus - PC Guide ": an ad-laden blog-spam comparing two sub-par extensions. (both allow "acceptable ads") " uBlock Origin ": Good, but why is it so far down? " AdBlock — block ads across the web ": The usual scammy adblocker extension. Very similar to google's top four results. " Adblock Plus " same as google's #2 " Ad block - [...] - Chrome web store ": same as google's #1 " Adblock Plus ": Yet another shady adblocker with a $40/year subscription " The Ethical Ad Blocker " (infobox): A blog post describing an ad-blocker that blocks access to any websites that have ads, which prevents any accusations of piracy. Funny and probably real, but not what users are looking for. " AdGuard Ad blocker ": Yet another of those nearly identical sketchy adblockers. " Adblock Plus ": same as google #2. " AdBlock — block ads across the web ": same as google #1 " uBlock Origin ": Finally, in the top 3! " getadblock[.]com ": More junk. " AdBlock — block ads across the web ": Same as #2, but on Microsoft's extension store instead of googles. " Ghostery Ad Blocker ": Yet another blocker that doesn't actually block ads, and has been caught selling data to advertisers. " Ad blockers are not allowed on YouTube " A blog post with a half-baked list of ways to get around youtube's ad-blocker detection. Indirectly recommends uBlock, but also a lot of stuff that won't work. Not great. " Vivaldi ": Chrome with a built in adblocker. Not a scam, but you don't need to install a new browser to block ads. " EasyList is in trouble and so are many ad blockers ": Corporate blog post about hosting problems. " Ad Blockers - Contains Moderate Peril ": A blog post about ad-blockers, recommends "AdBlocker Ultimate". Not a spam, but not the best recommendation. Incorrect AI overview citing a paper. The paper lists both K-alpha lines, but the LLM used the wrong one. Table from Lawrence Berkeley National Lab : lists the correct value. Another table , this time from an equipment manufacturer. Lists the correct value. A paper characterizing the X-ray fluorescence spectrum of molybdenum. "Characteristic X-ray - Wikipedia": an overview of X-ray emission lines, but it does not give any specific energy values. Not a relevant result. Wrong AI overview citing google's #2: It made the same mistake with Kα 2 and Kα 1 . " Molybdenum ": A nice little page from LBL listing some technical properties of molybdenum. This is the most relevant result so far. " 12.1: Fundamental Principles ": an article that happens to use molybdenum as an example, but lists wavelengths instead of photon energy. " Experimental K-alpha x ray energies ": a table of emission lines. The same paper as google's #4. A very wrong AI overview giving "0.709 eV": off by four orders of magnitude! I suspect it took the number from Bing's #3, but instead of actually converting the wavelengths to energy, it just slapped an "eV" on. Same table as google's #2. A good result. Same as google's #3. A good result. A page about the theoretical calculation of X-ray lines. Does not provide an energy for molybdenum. A list of chemical properties of molybdenum. Does not mention X-rays. Incorrect AI overview referencing a NIST publication . Same as bing #2. A good result. Same as bing #3: not relevant to the question. Same as google #4. A good result. Some data table : a perfectly fine result. No surprises here: It's a few good sources and a slightly wrong LLM summary. Verdict: ok. Marginalia : "Plasma catalytic non-oxidative conversion of methane into hydrogen and light hydrocarbons": A preprint paper that used X-ray equipment and mentioned molybdenum in passing. "XRF Technologies for Measuring Trace Elements in Soil and Sediment": Similar to #1. A paper that used X-ray equipment and mentions molybdenum, but does not answer the question. lcamtuf on Photodiodes AI overview citing #4, recommending a transimpedance amplifier, but it provides a schematic of a different configuration. "Photodiode – A Beginner’s Guide": A blog-style website with circuits that don't work, are missing important details and have poor explanations. "Photodiode Basics": Ad-ridden page which does include the rough layout of a transimpedance circuit, but with no mention of feedback capacitors. These are often needed to prevent oscillation. "What are the pros and cons for the various photodiode circuit arrangements?": A forum thread that mentions transimpedance amplifiers, but doesn't give any specifics. "Photodiode Component Basics [...] - Youtube": Video with a demonstration of a photodiode working, but without any amplification or readout circuits. AI overview citing #2, but it recommends a bad configuration with a resistor in parallel with the diode. The output is non-linear, high-Z and, difficult to use. "Photodiode – A Beginner’s Guide": Same as google #2. A bad result. "Photo Diode (Symbol, [...] Pros & Cons) Explained - Youtube": Another super generic video. "Fire Detection Circuit Using Photodiode": Content farm video with no schematic and no explanation. "Photodiode Construction and Working - Youtube": Another extremely generic explanation video. Does not include any circuits or even discuss the problem. "Photodiode – A Beginner’s Guide": Same bad article as google's #2. "Photodiode Basics": The same as google's #3: incomplete circuits on an ad-ridden page. "What are the pros and cons for the various photodiode circuit arrangements?": Same as google #4, an unhelpful forum thread. "PHOTODIODE OPERATION MODES AND CIRCUITS": Provides an example of a transimpedance amplifier, but has no example values or instructions on selecting them. " Technical notes / Si Photodiodes ": A PDF from a photodiode manufacturer, which provides practical circuits and a description of photodiode properties. This is the first results that provides enough information to actually build a working sensor. "Photodiode – A Beginner’s Guide": The same as google's #2, meh explanations and some of the circuits don't work. "Photodiode Basics": Same as google's #3: Incomplete circuits on an ad-ridden page. "PHOTODIODE OPERATION MODES AND CIRCUITS": Same as kagi #4. Not good enough to build a working circuit. "A Practical Guide to Photodiode Amplifier Circuit Design [...]": A marketing piece for a equipment manufacturer. Unlike the Hamamatsu appnote, this doesn't have any useful information. " Technical notes / Si Photodiodes ": Same application note as Kagi #5. A good result. "PIN Photodiode gamma detection amplifier circuit - rectangular wave output": Forum post with a broken circuit. Not something you want to copy. "Circuit Diagram": An unrelated forum post about an XKCD comic. "Short Circuit Limiter": Unrelated blog post. "NES Cartridge Chaos: [...]": Unrelated blog post. "How can i increase the range of values that a light sensor gives?" Forum post showing an ok configuration, but with no explanation or information on how values should be selected. It violates the conservation of momentum, because the wing doesn't impart any momentum to the air. Obviously, fans work. Airplanes can fly upside down... which shouldn't be possible if lift is some special property of the wing's shape. Paper or balsa-wood planes with flat airfoils work fine. https://www.youtube.com/watch?v=hnvtstq3ztI : Weighing an airplane as it's flying. AI summary citing a TikTok video which contains the "something something Bernoulli" argument. Not entirely wrong, but needlessly complicated and incomplete. How wings really work : A professor debunking "equal transit" with an experiment... nice, but a debunk is not an explanation. " How Airplane Wings REALLY Generate Lift ": A youtube video with the correct explanation. A good result. "ELI5: how does a wing work? - Reddit": Reddit thread, most comments are correct, but many are repeating the incorrect explanation. " How Wings Work ": A page with a mostly correct animation, but no explanation of what's happening. AI summary stating the incorrect equal-transit explanation. Seems to be referring an an old Glenn Research page with the incomplete explanation. " Airplanes ": A correct article which calls out the incorrect bernoulli argument. A good result. The same correct video from Google #3. "How Airplanes Work: A Simple Explanation for Beginners": A youtube video giving the incomplete explanation. "How Wings Work": Same as google's #5. "How Does A Wing Work? - Science Through Time": AI slop video with an bad answer. I can't tell if this it is the "equal transit" model or the incomplete one, because it doesn't include anything resembling detail or logic. " How Does A Wing Actually Work? ": A Veritasium video on youtube, with the correct explanation. A good result. " How airplane wings work ": A cool video showing airflow over a wing, during normal flight and a stall... but it's not an explanation. " How Does A Plane Wing Work? ": Correct explanation and demo. "How do airplane wings work?": Explains the structural components of a wing, but not why it's able to create lift. "Learn How Airplanes Work": A page that lists the parts of a plane, and gives the incorrect "equal-transit" explanation. How planes work : An article with a brief, but correct explanation. Dynamics of Flight An old article from Glen Research with the "something something Bernoulli" explanation. "How airplane wings actually work - Today Plane crash": AI Slop article, wrong answer. "How wings work": an animation of airflow, but does not have an explanation "How do I explain what makes an airplane fly to a non-technical person?": Forum thread of people asking the same question. A few answers are correct, but a lot aren't. I'll bin it as a bad result. "How do the Americas Cup Yachts sails work?": Forum thread about sailing. "How do I keep my futuristic racing hovercraft from becoming airplanes?": Forum thread about fantasy hovercraft. "How is the fatigue life of an airplane wing flexing during turbulence determined? How do they keep track of it?" Forum thread on accelerated life testing and maintenance of aircraft. "How do you scale a svg img to fit container?" A CSS question that just happens be about an image of an airplane. Incorrect AI summary citing the AI slop in #2. "Comparing Energy Efficiency of Brushless vs. Brushed Motors": Slop blog that claims the high speeds reduce losses in the motor's commutator, which simply isn't true. Commutator losses (arcing) generally increase with rotational speed. "Brushless Vs Brushed DC Motors: When and Why to Choose One Over the Other": AI slop advert. Does not answer the question. "What’s the difference between a brushed and brushless motor, and is one better than the other?": Reddit thread that states that brushed motors are less efficient, but gives no explanation. (also, that's not what the question asked...) "The Advantages of Brushed Motors: Powering the World with Efficiency and Simplicity - Magmotor": AI slop, doesn't answer the question. "Brushed vs Brushless Motor: Key Differences, Performance, and How to Choose": AI slop, doesn't answer question. AI summary citing #2. "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop that doesn't answer the question. It also states that motors produce more power at high speeds, which is true, but doesn't explain the question. At any given voltage, a motor has a torque at which it stalls and a maximum speed that's reached under no load. As you would expect, the motor makes the most power at roughly the half-way point between these two... but the efficiency is best at the extreme end of the speed range. "Comparing the Efficiency of Different Electric Motor Types": AI slop, doesn't answer the question. "Are Brushed DC Motors Still Relevant? Efficiency, Smart Control, and New Applications Explained": More AI slop. Doesn't answer the question. "Brushed vs Brushless Motors: Comparing Efficiency, Lifespan, and Performance Metrics": AI Slop. Doesn't answer question. AI summary citing "Brushed Motors vs. Brushless Motors": Neither answer the question. "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop. "Comparing the Efficiency of Different Electric Motor Types": AI slop. "Brushed vs Brushless Motors: Comparing Efficiency, Lifespan, and Performance Metrics": AI slop. "Are Brushed DC Motors Still Relevant? Efficiency, Smart Control, and New Applications Explained": AI slop. AI summary citing "Brushed DC Motor Theory": A page on a wiki run by Northwestern University. Talks about efficiency being zero under stall — which it is — but that's not what I asked about. "Brushless Vs Brushed DC Motors: When and Why to Choose One Over the Other": Probably human written, but doesn't answer the question, instead comparing two motor designs. (The efficiency curve is similar for both.) "Brushed vs Brushless: Unraveling the Mystery of Motor Efficiency": AI slop. "What’s the difference between a brushed and brushless motor, and is one better than the other?": Forum thread that isn't about the question and doesn't answer it. "Comparing the Efficiency of Different Electric Motor Types": AI Slop. "Why does a Tesla car use an AC motor instead of a DC one?": A Forum thread that doesn't answer the question. Hobby CNC machining and resin casting : Lcamtuf is really good... but this isn't a page about electronics. It does mention motors, but gives no explanation for why there efficiency curve peaks at very high RPMs. CSC 297 Robot Construction: Driving Motors : A long and detailed website, that actually answers the question! The first actually relevant result. "Stepper motor - Wikipedia": Wiki page on a different type of motor. "Brushless vs. Brushed Motors [New for 2026]": AI slop.

0 views
Maurycy 2 months ago

Hosting a website on an 8-bit microcontroller.

In today's episode of "dumb things to do with an AVR microcontroller": MCU website demo (may go down if this gets posted to HN) My victim is the AVR64DD32 which is quite similar to the Atmega328 of Arduino fame. Compared to the older Atmega, these are cheaper for the same memory, use a single programming pin and have nicer peripherals: So that's the computer (and a rather spacious one at that) but it'll need an internet connection to host a website. The obvious choice is Ethernet , but even the slowest version (10BASE-T) still runs at 10 megabits/second. Worse, it uses Manchester encoding: a zero is sent as "10" and a one as "01", so 10 megabits of data is actually 20 megabits at the wire. This is simply too fast for the AVR to generate. While it's processor can run at 24 MHz, but all the peripherals and IO pins max out at 12 MHz. (although some other 8-bit chips can manage it) The proper solution is to buy a dedicated ethernet chip from DigiKey, but then I'd be waiting weeks to finish this project. ... and ethernet is far from the only option: Serial Line Internet Protocol (RFC 1055) is a very old and very simple standard for running networks over serial: Before sending a packet, wrap it in 0xC0 bytes. If the packet contains any 0xC0 bytes, replace them with 0xDB 0xDC. To avoid ambiguity, any pre-existing 0xDB bytes are replaced with 0xDB 0xDD. This scheme was widely used for connecting to the internet over modems: A old-school dial up modem just runs a serial link over a phone line, and it's up the the computer to do anything with it. ... which is why SLIP is still supported by modern Linux: The hardware on the microcontroller's end is trivial: It does work with no external components, but I wanted some blinkenlights, and an idiot-proofing diode for when I inevitably connect the power backwards. Because it only draws a few milliwatts, it's perfectly fine to run the server of the serial adapter's 5 volt rail: it's really nice to only have one cable to deal with. Now it has an internet connection , but that's hardly a server. In order for my web page to get to your computer, it needs to pass through dozens of different networks. To do this, each packet has an IP header: 40 bytes that contain the address of the source and destination computers, and some other stuff I don't really care about. The protocol used to be a lot more complex, with features like packet fragmentation that require a lot of memory to handle correctly, but I don't have to: every modern operating system disables fragmentation and IPv6 removed it entirely. This makes implementing it very easy: Just swap around the source and destination of a recieved packet to generate the header for the response. (and reset the TTL counter) The other protocol, TCP is a lot harder : Implementing it requires the microcontroller to track connection states, periodically retransmit lost packets and handle a huge number edge cases. It took several days to get my custom implementation working well enough, and it's still got a few bugs. As for implementing HTTP, I didn't: The server always sends a hardcoded "response" back to the client. This works fine as long as there's only a single URL on the site. [Video of the page loading. See web or files directory: loading.mp4] Ok great , but what if I want to share it with friends? Unfortunately, to do that, it needs a publically routable IPv4 address. Not only are these expensive (there's a limited number) but it's impossible to get a good internet connection at my place. (no, Starlink is not good) I do have a machine with a publically routable address, but it's at a datacenter near Helsinki: I'd need a very long serial cable... Another cool thing Linux supports is wireguard, which creates a virtual network link over the internet. This works even if one of the machines is behind (CG)NAT or other annoyances. Problem solved: have the Linux router box connect to the VPS to get a proper internet connection? ... except the MCU still doesn't have it's own IP address: I could forward everything from my VPS's address to it, but that would break my normal website. Instead, I setup the server to proxy any requests under to the server using a local address block. This means that visitors aren't directly connecting to the MCU's TCP/IP stack... but hey, it's the same setup that the Vape Server uses and no one complained. (It also makes it slightly harder to break by sending SYN packets, but it's not exactly hard to DDoS a server connected over what's effectively dial-up) /mcu : The page hosted from the microcontroller. http://ewaste.fka.wtf/ : The Vape Server, a website hosted off a 32-bit MCU pulled from the trash.

0 views
Maurycy 3 months ago

GopherTree

While gopher is usually seen as a proto-web, it's really closer to FTP. It has no markup format, no links and no URLs. Files are arranged in a hierarchically, and can be in any format. This rigid structure allows clients to get creative with how it's displayed ... which is why I'm extremely disappointed that everyone renders gopher menus like shitty websites: You see all that text mixed into the menu? Those are informational selectors: a non-standard feature that's often used to recreate hypertext. I know this "limited web" aesthetic appeals to certain circles, but it removes the things that make the protocol interesting. It would be nice to display gopher menus like what they are, a directory tree : This makes it easy to browse collections of files, and help avoid the Wikipedia problem: Absentmindedly clicking links until you realize it's 3 AM and you have a thousand tabs open... and that you never finished what you wanted to read in the first place. I've made the decision to hide informational selectors by default . These have two main uses: creating faux hypertext and adding ASCII art banners. ASCII art banners are simply annoying: Having one in each menu looks cute in a web browser, but having 50 copies cluttering up the directory tree is... not great. Hypertext doesn't work well. In the strict sense, looking ugly is better then not working at all — but almost everyone who does this also hosts on the web, so it's not a huge loss. The client also has a built in text viewer , with pagination and proper word-wrap. It supports both UTF-8 and Latin-1 text encodings, but this has to be selected manually: gopher has no mechanism to indicate encoding. (but most text looks the same in both) Bookmarks work by writing items to a locally stored gopher menu, which also serves as a "homepage" of sorts. Because it's just a file, I didn't bother implementing any advanced editing features: any text editor works fine for that. The bookmark code is UNIX/Linux specific, but porting should be possible. All this fits within a thousand lines of C code , the same as my ultra-minimal web browser. While arguably a browser, it was practically unusable: lacking basic features like a back button or pagination. The gopher version of the same size is complete enough to replace Lynx as my preferred client. Usage instructions can be found at the top of the source file. /projects/gopher/gophertree.c : Source and instructions /projects/tinyweb/ : 1000 line web browser https://datatracker.ietf.org/doc/html/rfc1436 : Gopher RFC

0 views
Maurycy 3 months ago

My ramblings are available over gopher

It has recently come to my attention that people need a thousand lines of C code to read my website. This is unacceptable. For simpler clients, my server supports gopher: The response is just a text file: it has no markup, no links and no embedded content. For navigation, gopher uses specially formatted directory-style menus: The first character on a line indicates the type of the linked resource: The type is followed by a tab-separated list containing a display name, file path, hostname and port. Lines beginning with an "i" are purely informational and do not link to anything. (This is non-standard, but widely used) Storing metadata in links is weird to modern sensibilities , but it keeps the protocol simple. Menus are the only thing that the client has to understand: there's no URLs, no headers, no mime types — the only thing sent to the server is the selector (file path), and the only thing received is the file. ... as a bonus, this one liner can download files: That's quite clunky , but there are lots of programs that support it. If you have Lynx installed, you should be able to just point it at this URL: ... although you will want to put in because it's not 1991 anymore [Citation Needed] I could use informational lines to replicate the webs navigation by making everything a menu — but that would be against the spirit of the thing: gopher is document retrieval protocol, not a hypertext format. Instead, I converted all my blog posts in plain text and set up some directory-style navigation. I've actually been moving away from using inline links anyways because they have two opposing design goals: While reading, links must be normal text. When you're done, links must be distinct clickable elements. I've never been able to find a good compromise: Links are always either distracting to the reader, annoying to find/click, or both. Also, to preempt all the emails : ... what about Gemini? (The protocol, not the autocomplete from google.) Gemini is the popular option for non-web publishing... but honestly, it feels like someone took HTTP and slapped markdown on top of it. This is a Gemini request... ... and this is an HTTP request: For both protocols, the server responds with metadata followed by hypertext. It's true that HTTP is more verbose, but 16 extra bytes doesn't create a noticeable difference. Unlike gopher, which has a unique navigation model and is of historical interest , Gemini is just the web but with limited features... so what's the point? I can already write websites that don't have ads or autoplaying videos, and you can already use browsers that don't support features you don't like. After stripping away all the fluff (CSS, JS, etc) the web is quite simple: a functional browser can be put together in a weekend. ... and unlike gemini, doing so won't throw out 35 years of compatibility: Someone with Chrome can read a barebones website, and someone with Lynx can read normal sites. Gemini is a technical solution to an emotional problem . Most people have a bad taste for HTTP due to the experience of visiting a commercial website. Gemini is the obvious choice for someone looking for "the web but without VC types". It doesn't make any sense when I'm looking for an interesting (and humor­ously outdated) protocol. /projects/tinyweb/ : A browser in 1000 lines of C ... /about.html#links : ... and thoughts on links for navigation. https://www.rfc-editor.org/rfc/rfc1436.html : Gopher RFC https://lynx.invisible-island.net/ : Feature complete text-based web browser

0 views
Maurycy 4 months ago

Remove annoying banners

This is a small javascript snippet that removes most annoying website elements: It's really simple: removing anything that doesn't scroll with the page, and enabling scrolling if it's been disabled. This gets rid of cookie popups/banners, recommend­ation sidebars, those annoying headers that follow you down the page, etc, etc. If you don't want to mess around with the JS console , you can drag this link into your bookmark bar, and run it by clicking the bookmark: Cleanup Site If you need to manually create the bookmark, here's the URL: (On mobile chrome, you will have to click the bookmark from the address bar instead of the menu.) This is a typical website before the script : ... and after: One click to get all your screen space back. It even works on very complex sites like social media — great for when you want to read a longer post without constant distractions. As a bonus, I made these to fix bad color schemes: Force dark mode ... and ... Force light mode

0 views
Maurycy 4 months ago

Be careful with LLM "Agents"

I get it: Large Language Models are interesting... but you should not give "Agentic AI" access to your computer, accounts or wallet. To do away with the hype: "AI Agents" are just LLMs with shell access, and at it's core an LLM is a weighted random number generator. You have no idea what it will do It could post your credit card number on social media. This isn't a theoretical concern. There are multiple cases of LLMs wiping people's computers [1] [2] , cloud accounts [3] , and even causing infrastructure outages [4] . What's worse, LLMs have a nasty habit of lying about what they did. What should a good assistant say when asked if it did the thing? "Yes", and did it delete the data­base? "Of course not." They don't have to be hacked to ruin your day. "... but I tested it!" you say. You rolled a die in testing, and rolled it again in production. It might work fine the first time — or the first hundred times — but that doesn't mean it won't misbehave in the future. If you want to try these tools out , run them in a virtual machine. Don't give them access to any accounts that you wouldn't want to lose. Read generated code to make sure it didn't do anything stupid like forgetting to check passwords: (These are real comments from Cloudflare's vibe coded chat server ) ... and keep an eye on them to make sure they aren't being assholes on your behalf .

0 views
Maurycy 6 months ago

How to write your own website:

I recently wrote an essay on why you should set up a personal website rather then using social media. Doing so lets you own your space on the internet, customize it and free your readers from constant advertising and algorithmic feeds designed to keep you stuck doomscrolling all day. However, despite how much time we spend using it, creating something for the intenet is seen as arcane wizardy by most people. This is a fairly accessable guide to getting started. You’ll need a text editor (any will do) and a browser (you already have one). All pages are written in HTML, which is a simple text-based format. To start with, this is a perfectly valid HTML document: To try this, just create a text file with a ".html" extension, and open it in your favorite browser. Do this now : experimenting is the best way to learn how everything works. This is what it should look like: Plain text is boring, so let’s add some formatting: The angle bracket things are tags: "<b>" is an opening tag, and "</b>" is the matching closing tag. The word surrounded by brackets ("b") is the tag name, which tells the browser what to do: In this case, b olding the enclosed text. The other formatting tags are <em> em phasis , <u> u nderline , <sub> sub scipt , <sup> sup erscript , <small> small text , <mark> highlight and <del> del eted . You don’t have to memorize this list, but go and try a few out. There’s also <br/> ( br eak), which adds a line break. It’s special because there’s no closing tag: It always immediately closed and can’t contain any text. I like to add a slash after the tag name to indicate this A big wall of text can get quite ugly, so it’s good to break it up with <p> ( p aragraph) tags. Each paragraph will be visually separated from other content on the page: Check out my new site: I have many epic things here. Together, the maching tags and their contents form an an element . Elements can contain other elements, but it’s important that they are closed in the correct order: This is wrong: … but this is fine: Browsers will attempt to render invalid HTML, but the results may not be what you intended: It’s best to make it easy for them. On that topic, it’s good practice to put all your content inside a <body> element which is itself inside a <html> element: Check out my new site: I have many epic things here. This isn’t mandatory, but helps browsers render your page correctly: In the case of an old browser, you don’t want metadata (we’ll add some later) getting confused for page content. Ok, back to text-wall-avoidance: the <ul> and <ol> ( u nordered/ o rdered l ist) tags create, well, lists. Each item should be wraped in <li> tags ( l ist i tem) About this site (unordered): It has epic things ... and is handwritten HTML It uses these tags: (ordered) <html> <body> <p> <ul> and <ol> <li> You can add angle brackets to a page with &gt; (>), &lt; (<) and &amp; (&). These entities will render as the corresponding charater, but won’t form tags. Headings use <h1> ( h eading 1 ) through <h5> ( h eading 5 ), with larger numbers using smaller font sizes: This site has epic things and I wrote it myself. To do: Figure out how to add links. About that. Links are just <a> ( a nchor) tags, but they have something new: an attribute after the tag name but before the bracket. The "href= " attribute sets where the link points to. A lot of other tags can also have attributes: For example, ordered lists with "reverse=true" count backwards. The URL in "href=" can be relative: If linking up multiple pages on the same site, instead of this: … just write this: Images work similarly to links, except that they are self-closing elements like <br/>: Check out this picture of a nebula I took! (If you don’t have a URL for your image, skip to the hosting section to set one up) That’s all the essentials, but there’s a lot of other useful tags. For example <details> creates a dropdown that works with ctrl-f: This is a dropdown with just HTML. It works well with browser features (ctrl-f, fragment identifiers, screen readers, etc) by default. (better usability than 99% of commercial sites!) …but I can’t cover everything without writing a whole book. (The Mozzila docs are a fantastic reference) At this point, you should have something like this: I made this site to write about things I do. More updates soon™ . Here's my picture of the Dumbbell Nebula: Let’s start by giving the page a machine-readable title: Like with <body>, the <head> tag isn’t required, but it is good to include it: Otherwise, any metadata that the browser doesn’t understand might be mistaken for content. The page still looks kinda bad: Text extending the edges of the page isn’t exactly easy to read. It’s not too bad when crammed into my blog, but longer paragraphs will look terrible on large monitors. To fix this, we need to add some style and layout information using the <style> tag: Unlike other tags, the contents of <style> isn’t HTML, but CSS: a whole other langauge embedded within the file. CSS is compoosed of blocks, each begining with a selector to control what gets effected. Here, this is just the name of a tag: "head" The selector is followed by a series of declarations wraped in curly braces. My example only has one: "max-width: 30em;" This caps the width of the element at 30 times the font size: I made this site to write about things I do. More updates soon™ . Here's my picture of the Dumbbell Nebula: The page is looking rather asymetrical, so let’s center the column. For fixed-width elements, this can be done using the "margin" property: I made this site to write about things I do. More updates soon™ . Here's my picture of the Dumbbell Nebula: (For varable width elements, use flexbox for centering and other fancy layouts. A single line of text can be centered with "text-align=center") Personally, I like dark themed sites, so lets change some of the colors: I made this site to write about things I do. More updates soon™ . Here's my picture of the Dumbbell Nebula: The "color" style will carry over to every element inside of the styled tag, so there’s no need to individually change the text-color of every element. However, the links do need to be changed because they override the color by default. That’s it. Everything you need to replicate my blog, minus a few small bits like the sans-serif font, nagivation box, etc. Of course, your website can and should be different: It’s yours . I highly recomend you read some documenation and play around with CSS. There’s also way more to it then I can possbly cover here. Every website you see was created with it, and it even supports animations and basic interactivity . … also, check out your browser’s devtools (ctrl-shift-i): It will have a nice GUI for editing which shows you the result in real time and shows you what’s going on under the hood. If you ever run out of tags, you can just make up your own and style them as needed. As long as the name includes a hypen, it’s guaranteed not to be included in any future version of HTML. The specification even lists <math-α> and <emotion-😍> as allowed custom elements names. I’ve used this heavily on this page: All the example websites aren’t screenshots, they are <fake-frame> elements styled up to look like a browser window. Custom tags are also very handy for styling text: At this point you should have a reasonably nice page ready to put up on the internet. The easiest way to do this is to use a static file hosting service like Github Pages or Cloudflare Pages . Both of these have generous free tiers that should last a very long time. If you don’t like big companies, there are plenty of similar, smaller services. These can be more limited: The popular Neocities charges $5/mo to use a custom domain. Another option is to rent a server ($3-$5/mo) or, if you have good internet, run one yourself. This is by far the most fiddly option: I would not recommend it unless you like playing with computers. All off these (except a server) will give you a subdomain by default. For example, Github Pages will give you your-username .github.io However, I do recommend setting up a custom domain: This will let you switch providers seamlessly should anything happen. All of these will work in a similar way: Upload a file with some name, and it will given a URL with that same name. The one exception is that files called "index.html" will be viewable at the root of the folder they are in. You should put an index.html in the root of your site to serve as the homepage, but apart from that, the organization is up to you. It has epic things ... and is handwritten HTML <html> <body> <ul> and <ol> Ken Shirriff's blog Ken Shirriff's blog Ken Shirriff's blog Ken Shirriff's blog

0 views
Maurycy 6 months ago

Mineral Moon:

Just a normal moon photo, but with the saturation cranked up to show slight differences in rock composition. Some color is visible through the eyepiece, although it gets lost in most images… although I’ve hugely overcompensated in this one. The colors are caused by the Fe/Ti ratio: Titanium make the rock slightly bluish, and iron makes it yellowish. (The moon looks best in person. Color aside, there simply isn’t enough dynamic range available properly show it on a screen. If you have a chance, I highly recommend taking a look at a partial moon through a large aperture scope: It’s an amazing view) Raw stacks: TIF Color: 30 seconds (1 millisecond frames) Equipment: C9.25, ASI533 MC (IMX533 OSC), EQ6-R mount.

0 views
Maurycy 7 months ago

A sea of sparks: Seeing atoms decay

Atoms are very small Citation Needed , and even with the help of a microscope, it takes trillions of atoms to be visible. However, there is one atomic process that is violent enough to be directly observed: Radioactive decay. The alpha particle (helium nucleus) ejected when at atom decays carries around a picojoule of kinetic energy, which isn’t much, but is enough to produce a just about perceivable amount of light. For my alpha source, I used a 37 kBq amerercium source from a smoke detector (glued to a stick for easier handling). Other options are old radium paint or pieces of uranium ore with surface mineralization. My scintillator is a square of plastic coated in ZnS(Ag) that came out of a broken alpha scintillation probe. The white coating is zinc sulfide, which glows when hit by high-energy particles. There’s no power source: All the energy comes from the radiation itself. If you don’t have one sitting around, similar zinc sulfide screens can be bought new on eBay. (search for “spinthariscope”) The magnifying glass helps by directing more light into the eye, which is important as each alpha particle will only produce a couple thousand photons. To see the scintillation, I put the alpha source few millimeters away from the screen, and turned off the lights. Because the light is very faint, I had to let my eyes adapt to perfect darkness for several minutes. After a while, I was able to see a dim glow around the alpha source. With the magnifying glass, this glow resolved into thousands of brief flashes of light, like a roiling sea of sparks. Each of the “sparks” is light carrying the energy released from the decay of a single atom. Unfortunately, this effect is absolutely impossible to photograph: If you want to see it, you’ll have to do the experiment yourself. If you don’t want to mess around with three different things in a perfectly dark room, you can by a pre-assembled spinthariscope for around $60.

1 views
Maurycy 7 months ago

More uranium ore:

In many places, natural minerals aren’t even regulated as radioactive material (10 CFR § 40.13 b) … but you should check your local laws before collecting any. Radiacode 102: 180 CPS [4 uSv/h]. Ludlum 44-9: 20 kCPM. Carnonite from the Mc Cormic mine near Mi Vida in Utah, USA. It’s quite dusty, I’ll have to put this one in a display case. The biggest hazard isn’t the radiation, but uranium’s chemical toxicity. (similar to lead) Radiacode 102: 1700 CPS [40 uSv/h]. Ludlum 44-9: 70 kCPM. Uraninite in sandstone from around the Mi Vida mine in Utah, USA. This one is quite spicy, the Radiacode measures 50 CPS [1 uSv/h] at 15 cm distance. My prospecting detector detects it from a meter away. Based on gamma dose constants, I estimate a uranium content of 10-20 grams, but take that number with a (large) grain of salt. Radiacode 102: 2 CPS [0.1 uSv/h]. Ludlum 44-9: 350 CPM. Unknown U(IV) mineral (perhaps natrozippeite?) from Yellow Cat (Parco claims) Unlike the Carnonite, these glow the classic “nuclear waste” green under 365 nm: For the record: spent fuel doesn’t glow this color outside of Hollywood. However, many uranium minerals and uranium containing glass will glow green under ultraviolet light. Radiacode 102: background. Ludlum 44-9: background. Jasper from Yellow Cat . Not radioactive, but it looks cool: it’s what most people go to the area for. Radiacode 102: background. Ludlum 44-9: background. Petrified wood from near the McCormic mines. (close to Mi Vida ) Not significantly radioactive despite being close to the uranium deposit.

0 views
Maurycy 8 months ago

You already have a git server:

If you have a git repository on a server with ssh access, you can just clone it: You can then work on it locally and push your changes back to the origin server. By default, git won’t let you push to the branch that is currently checked out, but this is easy to change: This is a great way to sync code between multiple computers or to work on server-side files without laggy typing or manual copying. If you want to publish your code, just point your web server at the git repo: … although you will have to run this command server-side to make it cloneable: That’s a lot of work, so let’s set up a hook to do that automatically: Git hooks are just shell scripts, so they can do things like running a static site generator: This is how I’ve been doing this blog for a while now: It’s very nice to be able to type up posts locally (no network lag), and then push them to the server and have the rest handled automatically. It’s also backed up by default: If the server breaks, I’ve still got the copy on my laptop, and if my laptop breaks, I can download everything from the server. Git’s version tracking also prevents accidental deletions, and if something breaks, it’s easy to figure out what caused it.

0 views
Maurycy 8 months ago

Some hot rocks:

I recently went on a rock collecting trip, but apart from the usual — quartz, K feldspar crystals, garnet, etc — I found some slightly radioactive rocks: All of these were found using my prospecting scintillator , but I took measurements with a Radiacode 102 — a very common hobbyist detector — so that other people can compare readings. Despite being small, it is still a gamma scintillator, so the count rates are much higher then any G-M tube. None of these are crazy hot, but they were all collected off the surface: I didn’t bring any good digging equipment on the trip. (Really should have considering how my detector is able to pick up deeply buried specimens) The biggest hazard with my rocks is dropping them on your toes. Even if you were to grind them up and inhale the dust, the host rock is much more of a danger then the radioactivity. I’ve personally been in multiple residential and office buildings that are more radioactive then my specimens because of the stone that was used to construct them. Also, if you have any “Anti-Radiation” or “Bio Energy” or “Quantum Energy” wellness products: they are quite the opposite. (and many are spicier then my rocks.) … or how about some nice decorative glass ? It glows

0 views