6 ms·
Now you're thinking with relays
- dekhn 3y agolcamtuf, or as I like to call him "imposter syndrome as a service" (that's not totally fair; I've caught up to him in many ways over the past few years). Now that I know what a relay is, I can't unhear it. When I plug in my EV for charging, I hear the solid click of a (probably quite large) relay. When my coffee maker cycles on or off, I hear a relay. I don't particularly like it.
- 082349872349872 3y agoWhen I was small, my parents got me a Fischertechnik kit that included relays. I still remember the day I discovered that by hooking the output of a relay to its input, one could either produce stable or instable (cf the Y combinator?) behaviour, and the latter produced a relay clicking like mad, as fast as its time constants allowed it...
- jacquesm 3y agoBonus points for mechanically tuning the relay to give you the highest frequency possible. A little screw set into the top of the relay casing that pushes down on the arm can make the relay substantially quicker (at the price of some more contact bounce but that's fine).
- eichin 3y agoOooh, flashback to early TRS-80 days - there was an on-motherboard relay to control the tapedeck (pause/continue transport, you still had to have the buttons pushed down.) You could instead drive it fast enough to make (very grating) tones, probably damaging it over time (your limiting factor was "everyone in earshot trying to make you stop", by "grating" I mean "small metal box full of bees" :-)
- actionfromafar 3y agoMSX had the same thing. I played with it a bit but worried I might break it :-)
- frabert 3y agoWhat you're hearing when your coffee maker cycles on and off may actually be a bimetallic strip used as temperature control so technically not a relay
- byhemechi 3y agoBimetallic strips are pretty slow, I can't imagine them being audible. I'd guess what you're hearing is almost certainly a relay, very likely driven by the bimetallic strip edit: Replies have pointed out that they sometimes do "snap", so i guess i'm wrong there. I'm still pretty sure anything in a kettle/coffee pot/toaster etc would be a relay to avoid arcing edit 2: i'm just going to shut up now
- frabert 3y agoIt's totally possible to shape a bimetallic strip in a way that makes it bistable, thus clicking between the two states, just like an electrical switch which uses springs inside which are normally not noisy either.
- HeyLaughingBoy 3y agoThis is actually the only type that I've ever seen.
- bagels 3y agoThey used to use a coiled strip with a mercury switch on the end of it.
- HeyLaughingBoy 3y agoRight!!! In the old thermostats. I forgot about those.
- aidenn0 3y agoOne construction I've seen is with a permanent magnet for hysteresis; the strip jumps to the magnet when it gets close, and then requires extra tension to release. The thermostat in my first apartment worked this way (and it looked to me like the strip was actually carrying the current to operate the gas heater; presumably a NC valve).
- bqmjjx0kac 3y agoI follow lcamtuf on Mastodon and I am convinced he's made of different stuff than I am. A full-time job is enough for me, I can't imagine starting (and completing) so many cool side projects. To that point, right before this relay madness, he wrote up an article in a playable embedded Tetris clone: <https://lcamtuf.substack.com/p/mcu-land-part-10-blocks-all-the-way https://lcamtuf.substack.com/p/mcu-land-part-10-blocks-all-t...>.
- dragontamer 3y agoThat PCB mildly triggers me for some reason. No small 100nF capacitors. Only a bulk 1uF and 10uF capacitor inches away. Very inefficient layout. Is that just a 10 Ohm resistor connected to a physical switch to control the backlight? DC-DC module? He's got a PCB on there already, it shouldn't be that much harder to slap down a Buck converter himself. What size components are those? Far larger than 0805, they might actually be like 2012 (inch) components. Good grief. I guess Microchip / Atmel chips are legendary for this reason: they always were considered braindead easy to boot. But this is the higher-end Cortex-M7 series chips, I'd imagine that you'd need at least a _bit_ more care with regards to decoupling and power-delivery to achieve reliability than what he did here! No seriously. A 300MHz processor with _NO_ local decoupling capacitors? Is he mad? ------------ But then again, I guess there's something to be said about making a board "easier" and through less effort. I guess there's no reason to be a masochist with 0603 (or smaller) parts when prototyping.
- dekhn 3y agoHe explains all his decisions for PCB design (https://lcamtuf.substack.com/p/designing-your-own-pcbs https://lcamtuf.substack.com/p/designing-your-own-pcbs) and note this is a small-run device mainly intended for pedagogical reasons. Also the device worked even when it was on a breadboard, suggesting he made reasonable technical decisions regarding placebo capacitors.
- dragontamer 3y agoAVR DB is a 24MHz computer though. This other post (https://lcamtuf.substack.com/p/mcu-land-part-3-baby-steps-with-cortex https://lcamtuf.substack.com/p/mcu-land-part-3-baby-steps-wi...) has more information with his experiments with SAMS70, suggesting experimentation with a breakout board. So same same overall but... He's upgraded to the SAMS70 which is 300MHz. Its a totally different class of processor. > Also the device worked even when it was on a breadboard, suggesting he made reasonable technical decisions regarding placebo capacitors. I dunno. PDN (power-delivery network) issues are really complex. You solve a lot of headaches with a 1-penny 100nF capacitor here and there. I'm very curious what the SAMS70's onboard capacitance is. I'm wondering if Microchip/Atmel goes overboard on onboard capacitance or something. In any case: the documentation from Microchip is clear about this. 100nF capacitors on every input pin. I don't see any reason to stray from this, its not like 100nF capacitors are expensive, or even difficult to solder.
- Pathogen-David 3y agoIn an EV charger, it's more likely to be a contactor, which is similar to a relay but can better deal with high amounts of current. (Technology Connections has a video on the differences https://youtu.be/VsNHrAzx5_w https://youtu.be/VsNHrAzx5_w) If you want more household relays to notice, it's common to find them in digital thermostats for central HVAC control signaling. I've also found them inside of ovens, and cars also have lots of them for things like the starter and headlights (although maybe not the latter in newer cars.)
- dekhn 3y agoI hadn't heard of contactor but that looks like it's just a subtype of relay? And I notice that it says contactors are used where relays start to top out, around 15A. Which is interesting because the max current I can configure my RAV4 Prime to is ... 14A. Either way I'm not opening up the little portable box that makes this noise. It's clear there's something physical clacking in there, not solid state.
- HeyLaughingBoy 3y agoYes, the big deal with contactors is that they're designed to switch high-current inductive loads. Smaller relays may have problems with the arcing caused by a load like a motor welding the contacts together. So, they have bigger contacts to handle the current and strong springs and a powerful solenoid to open/close the contacts quickly and extinguish an arc before it has time to melt anything. The noise you're hearing is from the contacts opening and closing.
- throttlebody 3y agoRelays and contractors are the same. It's a coil physically movin some contacts together to allow current to flow. I got no idea why, where or how the naming came about or who decides. But i guess its the same as creeks and rivers, when does a creek become a river
- userbinator 3y agoThe term contactor came from industrial machinery, while relay came from telecoms.
- scrlk 3y agoRelay computing taking to the max: 1958 FACOM 128B Japanese Relay Computer - https://www.youtube.com/watch?v=_j544ELauus https://www.youtube.com/watch?v=_j544ELauus
- ge96 3y agoNice, Curious Marc has some really good videos like the Apollo guidance computer getting taken apart. The sound of that relay computer churning away dang
- artemonster 3y agoI have an 8bit relay cpu with 4k word code memory and 256 register file with banking, this thing clocks at about 20 hz and my main problem is looking (and not finding) for interesting stuff what I can code on this thing. Even a simple snake game with 8x8 dot display is painfully slow, tetris will be unplayable. What else? Calculator? A 16bit multiplication runs longer that I can count in my head :/
- Aardwolf 3y agoSounds interesting, got more info on this cpu? Can one buy it or are schematics available? I wonder if optical or solid state relays can speed it up, at least if normally closed ones exist
- 4gotunameagain 3y agoIf you go that way (the non clicky way), might as well use transistors :)
- artemonster 3y agoThe point of using relays was for the sound. Reed relays dont make loud enough clack and going solid state is pointless, you can go directly with transistors then. Regarding more info I am very lazy at doing writups and schematics are all hand drawn, so its highly unlikely I will ever publish anything about it. It has 280 relays, based off two clocks with 4 phases (typical latch design from 80s), 12 bit PC, 8 bit ACC, zero and carry flags, immediate, direct and indirect adressing modes. Loud, noisy and totally useless. Memory interface is emulated via attached MCU
- gus_massa 3y agoPosting about this looks like easy karma. I understand that writing about the projects takes a lot of time, but if you ever have time to do it, my guess is that it will be well received here. (Remember to include a video. The first thing I did in the current post was to play the video the heard the clicks.)
- deleted 3y ago[deleted]
- ryukoposting 3y agoWhen I was in college, I interned with a great German industrial automation company. I specifically remember that the programming environment we sold to customers included support for "condition-coil" logic, AKA "ladder logic." Basically just simulated relays. For controls guys who had dealt with relays for most of their professional lives, that relay-oriented logic flow made sense. A typical computer science student's idea of boolean logic gates and procedural control flow just wasn't part of their lexicon. We also offered a graphical, procedural programming language (imagine Scratch except it controls part of a factory). You could teach it to them, and they'd understand it, but many of them never used it. They just wanted relays.
- Tomte 3y ago> I specifically remember that the programming environment we sold to customers included support for "condition-coil" logic, AKA "ladder logic." Yes, the IEC 61131 languages. AWL is a crippled assembler language, ST is a crippled Pascal. Industrial automation is for masochists. The usual explanation is that the PLCs need to be programmed by electricians without any college degree, but (a) are electricians not stupid and (b) would better languages not need to be more complicated.
- contingencies 3y agoLiterally trawling through patents related to electrical cabinets right now...
- ryukoposting 3y ago61131! I haven't thought about that number in years. Couldn't agree with your evaluation more. The sad thing about ST is that it was probably the least shitty of the IEC 61131 languages. Despite the masochism, it was a fun field to work in for a time. Since the industry demands these shitty esoteric programming languages, you end up with all these small companies writing their own compilers and runtimes. It's a unique opportunity to do real-life compiler development from the ground up.
- 3y ago
- shizcakes 3y agoTechnology Connections very recently put out a walkthrough of relay-based logic as it applied to a pinball machine: https://youtu.be/ue-1JoJQaEg?si=0iAPDzg5ZHes7Lg4 https://youtu.be/ue-1JoJQaEg?si=0iAPDzg5ZHes7Lg4
- andrepd 3y agoAmazing channel!
- jacquesm 3y agoThis is the real thing: https://www.youtube.com/watch?v=n3wPBcmSb2U https://www.youtube.com/watch?v=n3wPBcmSb2U
- Pathogen-David 3y agoThis is dangerous project inspiration... Also just so nobody misses it in the description, there's a whole page with many photos and an additional 1 hour video going into more details than the video on YouTube: http://web.cecs.pdx.edu/~harry/Relay/index.html http://web.cecs.pdx.edu/~harry/Relay/index.html
- Scene_Cast2 3y agoSlightly off topic, but would anyone know how to make PCB routing look smooth and curved like that? The screenshot looks like it's the 3D KiCad viz, but KiCad doesn't have that functionality by default.
- thousandknives 3y agohttps://github.com/mitxela/kicad-round-tracks https://github.com/mitxela/kicad-round-tracks
- PumpkinSpice 3y agoI would add: don't do that in KiCad. Although they added the functionality, it's clear that they never really QA'd it. It's profoundly broken. Many simple shapes are impossible to achieve, adjustments are painful and often require redrawing the entire track, selection boxes are not calculated correctly so you end up accidentally selecting curved tracks that are inches away... If you want to design boards with curved traces, paying several hundred bucks for DipTrace is almost certainly a better route.
- Workaccount2 3y agoWow, I essentially did this same project a number of years ago, but never finished it. My ship ran aground debugging division since it becomes long and convoluted to do it, especially when also dealing with negative numbers and decimals. I also added an LED board that was an array of LEDs, one LED per relay, attached to it's coil. This way you could see the states of the calculator flash by as it computed, akin to those old blinking button boards of retro sci-fi. Really neat project!
- zug_zug 3y agoIf you think this is fun you might enjoy MHRD - a game about building a gradually building up to functioning CPU using only logic gates (i.e. transistors/relays). You can have all the puzzley fun of it without any soldering etc.
- Graziano_M 3y agoAlso nandgame.com which is basically a game version of the excellent nand2tetris game.
- mikewarot 3y ago4PDT relays might seem exotic now, but they are quite common when you're working on old radios, etc. As for carrying through complementary signals, that's a good hack. There is a type of logic using Micromachined Silicon cantilever switches, operated by static voltages, capable of operation for sustained periods. They don't seem to have achieved fully non-volatile operation, but you can spend a lot of money to have a relay of this type, if you want.[1] At one point I was hopeful this would replace relay logic, and be even lower power than CMOS. [1] https://www.qorvo.com/products/p/CMD235C4 https://www.qorvo.com/products/p/CMD235C4
- xw3090 3y agoThey're still in use. i.e. https://www.digikey.com/en/products/filter/signal-relays-up-to-2-amps/189 https://www.digikey.com/en/products/filter/signal-relays-up-... has 811 hits. According to the datasheets: Typical applications Industrial sewing/stitching machines, fitness, elevators, pumps, robotics, solar panels
- HeyLaughingBoy 3y agoI was in my mid 20's when I was sent by my company to give a short training course to a civilian group that worked for the US Army Signal Corps at Fort Gordon. These guys built simulators of the big field radios that the signalmen carried around and everything was done with relay logic. This was the mid 90's and it blew my mind: I'd heard of relay logic in some EE course or the other, but I'd never actually seen it in operation. It's one thing to understand what's theoretically possible; quite another to actually see combinatorial and timing logic executed by loudly clacking relays. But it worked! They used relay logic because it's what they knew: some of them had backgrounds in industrial control. The small company I worked for sold single board computers and the group leader knew that there had to be a better, more modern method of building their simulators, so they asked to have someone sent down to educate them. That someone was me. I probably did a piss-poor job of it (no experience or aptitude for training at the time) but I hope it at least set them on the right path.
- chrisdhoover 3y agoI had the good fortune to go inside a Pac Bell switch. Inside was an entire floor of 2-post relay racks housing… wait for it… relays. The click clacking was music to my ears. Phone system switching predated transistors and computers. Weren’t early MIT based SWE also model railroaders? I think there is some connection there between model railroad switching, relays and logic.
- eichin 3y agohttp://tmrc.mit.edu/history/ http://tmrc.mit.edu/history/ has model trains, relays, and PDP-11s :-)
- pugworthy 3y agoI love that sound. It makes me think of mechanical keyboards and "hacking" terminals in the Fallout games.
- nielsbot 3y agoI should find my schematics-- When I was younger straight out of college I designed a digital clock that was relay-based. I made a 0-16 counter circuit on one board and a 10-reset circuit on another board. I didn't have 4 pole relays, just 2 pole, but I did try to make use of a mix of normally open (N.O.) and normally closed (N.C.) to keep the parts count low. The binary-to-7 segment logic was to be implemented using a diode ROM. I had the same idea about using clear relays--so you could see the parts working, but I couldn't find those at the local electrics shop, so I instead just took the plastic housings off of standard relays.
- auggierose 3y agoThat would be a good article, if it explained what a relay actually does. But it doesn't, and then what is its point?
- diydsp 3y agoMy friend Joe Allen made a rather sizeable relay computer which features a pot you can turn to change the speed in real time: https://hackaday.com/2017/09/18/single-board-relay-computer/ https://hackaday.com/2017/09/18/single-board-relay-computer/ I especially like that it has some relay outputs so you can short basically any electrical item, possibly even an AC mains cable :) and it has numerous inputs and LED display of the internal program counter. I even spent a few hours making a simple drum machine in it once!