Relaysbc Relay Computer running Pi calculation to 13 decimal places!

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ต.ค. 2024

ความคิดเห็น • 101

  • @VoidHalo
    @VoidHalo 4 ปีที่แล้ว +192

    There is nothing more soothing than the click of a relay. Except maybe the click of many relays. Well done.

    • @markgreen2170
      @markgreen2170 3 ปีที่แล้ว

      well, you should really like this: th-cam.com/video/suqsJzb7_IA/w-d-xo.html

    • @martinluptak3327
      @martinluptak3327 ปีที่แล้ว +1

      We have some railway signaling based on relay interlocking system. I wish you to hear relays clicking while locking train path in large station. You can hear clicks approaching you from another side of the room 🥰

    • @VoidHalo
      @VoidHalo ปีที่แล้ว

      ​@@martinluptak3327 I've seen videos of old telephone exchanges that used relays and I at least have an idea (as much as you can get from a video) of what that noise must be like. Classic example of too much of a good thing, I guess. Heh.

    • @James_T_Quirk
      @James_T_Quirk ปีที่แล้ว

      Well Fan Noise would not be a issue ...

  • @microdesigns2000
    @microdesigns2000 3 ปีที่แล้ว +83

    The combination of relays and LEDs is very pleasing.

  • @videolabguy
    @videolabguy 3 ปีที่แล้ว +41

    The only thing missing is Scotty saying, "Computer... Calculate Pi to 13 decimal pleases please." and the computer replying, "Working".

    • @orbitingeyes2540
      @orbitingeyes2540 5 หลายเดือนก่อน

      It was Spock, actually, and it was "Calculate Pi to the last digit. This ia a Class-A Priority Compulsory Directive".

  • @kevinbyrne4538
    @kevinbyrne4538 ปีที่แล้ว +7

    OMG The thought and labor and time that this machine must have required. You have my genuine admiration.

  • @hendra_joe_
    @hendra_joe_ ปีที่แล้ว +3

    I love the clicking sound and the blinking LED

  • @HangTimeDeluxe
    @HangTimeDeluxe 3 ปีที่แล้ว +7

    So, I thought about buying one of these, just to hear it run. Thank you for posting this, I'm over it now.

  • @BM-jy6cb
    @BM-jy6cb ปีที่แล้ว +2

    That is VERY cool! I could watch this for hours. Reminds me of that Japanese relay computer, Mitsubishi or NEC if I remember rightly.

  • @-T.K.-
    @-T.K.- 4 ปีที่แล้ว +10

    This is amazing

  • @wisteela
    @wisteela ปีที่แล้ว +1

    That looks and sounds fantastic.

  • @mrblubbernugget4269
    @mrblubbernugget4269 8 หลายเดือนก่อน

    This is straight up magic for medieval people.

  • @A3Kr0n
    @A3Kr0n ปีที่แล้ว

    I can't take it anymore. Those poor relays are going to melt beyond recognition.

  • @mepacrina9291
    @mepacrina9291 3 ปีที่แล้ว +5

    Aaaaa, wait. Where is the ROM memory for the machine code? There are some 90 relays, too few for both code and CPU (ALU, regs, conditional branch and sequencer) .
    Also there are a bunch of ICs on pcb, not just relays. The lower maybe 7 segment decoders, display mux and clk, which is ok, but the rest?

    • @ryan.crosby
      @ryan.crosby  3 ปีที่แล้ว +12

      The idea behind this computer is that only the CPU itself is implemented in relay logic, like the old relay trainer computers. The memory, clock, and keypad/display are implemented in a PIC microcontroller, because they'd be impractically huge if implemented in relays or even core memory. The uC provides 1024 bytes of memory, which makes 256 4 byte words. Each word is one instruction, one read only address, and one writable address (for indirection or self modifying code). So effectively it's more like 768 bytes of ROM and 256 bytes of RAM.
      Everything north of the row of LEDs in the middle is purely 12V analogue relay logic, even that little package in the top right is just a resistor array. It includes a 4 bit relay contact "output" port that values can be written to, eg for activating an external lamp or buzzer. In the middle there are some level shifters that go from 5V logic to 12V and vice versa, and on the bottom is the modern ICs and keypad.
      The CPU minimises relay count by being less memory efficient, since memory is effectively "free" in this design. It avoids the need for an instruction decoder by using wide instructions (16 bits) in which each instruction sets some flag in the CPU/ALU directly. The CPU also has only one register - the Program Counter. The CPU gets fed an input instruction and outputs a write address and value every cycle, and cannot store any values internally.
      This is where things get a little bit magic - the uC effectively implements "triple port" memory - it can read an entire word, lookup an indirect byte from RAM, and write a byte back to RAM all in a single CPU cycle.
      If this were to be implemented "for real", aka in actual pure relays, you'd want to add two things:
      1. Buffers for memory input and write back, with a 4 stage pipeline - Read word, indirect read ram, execute, write back ram. This would be handled in a memory controller and run at 4x the CPU clock.
      2. A reduced instruction set with instruction decoder, to reduce the 16 bit instruction down to more like 6. Not necessary, but reduces word size significantly.
      Apart from those two caveats, the relay CPU is "legit" - it has a PC, ALU with add/ subtract with carry, AND/OR/XOR, jump on gt/gte/lt/lte, left/right bitshift with carry, jump on carry, indirect memory read/write, even "increment and jump if not zero" in a single instruction.
      For more info the creator has a video here:
      th-cam.com/video/k1hJoalcK68/w-d-xo.html

    • @mepacrina9291
      @mepacrina9291 3 ปีที่แล้ว +2

      @@ryan.crosby Thank you for the explanation!

  • @MetallicMedium
    @MetallicMedium หลายเดือนก่อน

    That's awesome!

  • @edgeeffect
    @edgeeffect ปีที่แล้ว +2

    There's just not enough "stuff" here for this to be a real relay computer.

    • @ryan.crosby
      @ryan.crosby  ปีที่แล้ว +6

      The memory (256 x 32 bits) is implemented in a microcontroller. The keypad/display/serial is also implemented in a microcontroller. This is all of the components on the bottom side of the board.
      The entire CPU, which includes instruction handling, ALU [ADD, AND, ROR], conditional jump logic, carry flag, program counter register, and input/output port, is all 100% 12V relay logic. This is the entire top half of the board which is purely relays and passive components.
      So it's not a 100% relay computer, but more of a "trainer" board where the CPU is purely relays but the support hardware is microcontrollers.

    • @ryan.crosby
      @ryan.crosby  ปีที่แล้ว +1

      The memory (256 x 32 bits) is implemented in a microcontroller. The keypad/display/serial is also implemented in a microcontroller. This is all of the components on the bottom side of the board.
      The entire CPU, which includes instruction handling, ALU [ADD, AND, ROR], conditional jump logic, carry flag, program counter register, and input/output port, is all 100% 12V relay logic. This is the entire top half of the board which is purely relays and passive components.
      So it's not a 100% relay computer, but more of a "trainer" board where the CPU is purely relays but the support hardware is microcontrollers.

  • @pauleagle97
    @pauleagle97 ปีที่แล้ว +3

    I am studying computer architecture now, can you explain shortly what is the logic gate equivalent of one relay? Or what do they conceptually represent?

    • @harisuresh2507
      @harisuresh2507 ปีที่แล้ว +1

      Here, this video might help:th-cam.com/video/Kxb8AQVcdac/w-d-xo.html

    • @aydenlokey3641
      @aydenlokey3641 3 หลายเดือนก่อน

      A relay is an electromagnetic switch, so one relay isn't any logic gate in particular, however, you can make any logic gate with 2 relays, and if you wire it right, you can make a half adder with only 4!

  • @Theineluctable_SOME_CANT
    @Theineluctable_SOME_CANT ปีที่แล้ว +2

    I used to work in a relay based metro telephone switching centre....
    The sound was quite loud.

    • @GilmerJohn
      @GilmerJohn ปีที่แล้ว

      The old telephone relays averaged about 10 times the volume for each relay. Bigger relays have more "Swinging" weight and that weight comes crashing to a halt at each operation or release.

  • @BitSmythe
    @BitSmythe ปีที่แล้ว +1

    Put a green filter over the green digits and we’ll all be able to see them better.

  • @PaulasTechStuff
    @PaulasTechStuff 3 ปีที่แล้ว +28

    Awesome work, can you share your code?
    I’d love to try and calculate points on my cpu.

    • @ryan.crosby
      @ryan.crosby  3 ปีที่แล้ว +10

      github.com/crozone/relaysbc-programs
      This is a collection of code for the computer that I've saved from the sourceforge repo. The code running is the "pi" program.
      Good luck with your CPU!

    • @PaulasTechStuff
      @PaulasTechStuff 3 ปีที่แล้ว +2

      @@ryan.crosby Thank you, you're a star :)

  • @dolasundarmurthypalepu3943
    @dolasundarmurthypalepu3943 4 ปีที่แล้ว +6

    Where it can buy this ckt board

  • @lemonjumpsofficial
    @lemonjumpsofficial ปีที่แล้ว

    That's some pretty fast calculation considering how small it is

  • @mheermance
    @mheermance ปีที่แล้ว

    Well done.

  • @MichaelOfRohan
    @MichaelOfRohan ปีที่แล้ว +1

    I know a little bit about rise and fall of a mechanical relay.. im curious, whats the overall clock speed? Sound somewhere around 30hz?

    • @ryan.crosby
      @ryan.crosby  ปีที่แล้ว +2

      About 12Hz. The maximum is 15Hz but it starts to make mistakes.

  • @memadmax69
    @memadmax69 ปีที่แล้ว

    That would make me climb the freakin walls...

  • @Tapajara
    @Tapajara ปีที่แล้ว

    Since you have electronic gates, why would you need mechanical relays? I don't understand what part they would play in the computation.

    • @ryan.crosby
      @ryan.crosby  ปีที่แล้ว

      The CPU is made from relays, the memory is made from semiconductors. The relay CPU performs all of the math operations, conditional logic, and implements the program counter and jump control. As for why use relays at all... it's a novelty :)

  • @paulschreiber9384
    @paulschreiber9384 6 หลายเดือนก่อน

    CUrious what value of R204 (holding resistors) you used. Still 33uf holding caps? Did you have to swap relays around to get the system 'stable'? I'm having a heck of a time getting mine to work properly.

    • @ryan.crosby
      @ryan.crosby  6 หลายเดือนก่อน

      I used all the components from the original v3 BOM, including the recommended axicom relays. I believe R204 is 2K and the caps are still 33uF.
      I did have to swap out a few relays in the PC section to make some of my jumps stable, especially in the lower order bits. The PC definitely seems to be the most critical set of relays, I had trouble with some relays failing to latch high. I swapped them around with the relays from the input/output port since those are not timing critical and eventually it was stable up to clock setting D.

  • @hameh_chiz_az_hameh_jah5728
    @hameh_chiz_az_hameh_jah5728 ปีที่แล้ว

    its beautiful

  • @GlasiaVD23
    @GlasiaVD23 ปีที่แล้ว

    The first calculating of pi digits was using a triangle in and outside of the circle, that both barely touched the circle, then hexagons, then dodecagons, 24-gon, 48, 96, ...

  • @DmitriNesterov
    @DmitriNesterov ปีที่แล้ว +3

    Какая прелесть!

  • @olmostgudinaf8100
    @olmostgudinaf8100 3 ปีที่แล้ว +7

    That was faster than I experienced. Are you sure it isn't sped up? ;)

    • @kaunomedis7926
      @kaunomedis7926 3 ปีที่แล้ว

      Also, the speed must be getting lower with each iteration.

    • @HangTimeDeluxe
      @HangTimeDeluxe 3 ปีที่แล้ว +1

      Did you read the description? It took approximately 40 minutes for the calculation to complete.

    • @olmostgudinaf8100
      @olmostgudinaf8100 3 ปีที่แล้ว +1

      @@HangTimeDeluxe Ahh, thanks. Missed that. My bad.

  • @boson_higgs
    @boson_higgs ปีที่แล้ว

    Very nice!

  • @fluke196c
    @fluke196c ปีที่แล้ว

    Did you build this computer? I want to build one, but I do not know where to start

  • @alex_mc_arrow
    @alex_mc_arrow ปีที่แล้ว

    Awesome!

  • @Brainsmachine1
    @Brainsmachine1 ปีที่แล้ว +1

    Its Badass

  • @supul32
    @supul32 ปีที่แล้ว

    awesome!

  • @MAM-fv8sf
    @MAM-fv8sf ปีที่แล้ว

    A Beauty

  • @sundhararajanganesan9396
    @sundhararajanganesan9396 3 ปีที่แล้ว

    crazy, but the good kind !

  • @EasyElectronics2412
    @EasyElectronics2412 3 ปีที่แล้ว

    Hats off to you man😂👏

  • @randomsam83
    @randomsam83 ปีที่แล้ว

    I need this

  • @GegoXaren
    @GegoXaren 7 หลายเดือนก่อน

    What is/was the IPC of this machine?

    • @ryan.crosby
      @ryan.crosby  7 หลายเดือนก่อน

      The CPU itself is always one instruction per clock. It is fed with data on the rising edge, and the result saved to memory on the falling edge.

    • @GegoXaren
      @GegoXaren 7 หลายเดือนก่อน

      @@ryan.crosby
      That is very clever.
      No need for having execute on one clock cycle and load&store on an other....
      And you don't need pipe-lining...

  • @matteogaditti9900
    @matteogaditti9900 ปีที่แล้ว

    the clock speed is very impressive, are sane for relay?

  • @TimPerfetto
    @TimPerfetto ปีที่แล้ว

    Common lets go Ive been waiting for an uber for 3 hours wtf

  • @nicopuyol4548
    @nicopuyol4548 ปีที่แล้ว

    Why so many relays?

  • @rodsjames9298
    @rodsjames9298 3 ปีที่แล้ว

    awesome

  • @마루-r9x
    @마루-r9x 3 ปีที่แล้ว

    respect

  • @ladronsiman1471
    @ladronsiman1471 3 ปีที่แล้ว +3

    It would be nice to simulate this ... maybe in Proteus or similar ..

  • @gjmxyz
    @gjmxyz 3 ปีที่แล้ว +1

    Who makes this computer?

    • @ryan.crosby
      @ryan.crosby  3 ปีที่แล้ว

      Joe Allen, his project website is here:
      jhallenworld.com/relay.html
      And a detailed video on this computer is here:
      th-cam.com/video/k1hJoalcK68/w-d-xo.html
      Update: You can still purchase the PCBs from Joe directly on Tindie: www.tindie.com/products/jhallen/single-board-relay-computer/

  • @egeismailkosedag6360
    @egeismailkosedag6360 ปีที่แล้ว

    what is clock freq?

    • @ryan.crosby
      @ryan.crosby  ปีที่แล้ว +1

      It's adjustable from 1-15Hz, but I have it running at 12Hz in this demo. 13Hz is about as fast as I can get it to run before it starts to make mistakes due to the relays not settling in time, so I set it to 12Hz to be safe.

    • @egeismailkosedag6360
      @egeismailkosedag6360 ปีที่แล้ว

      @@ryan.crosby oh thanks, you found optimized relay freq for us 😂😂

  • @ahmagrs3581
    @ahmagrs3581 3 ปีที่แล้ว

    Im Getting RelayRolled

  • @rsmrsm2000
    @rsmrsm2000 3 ปีที่แล้ว +2

    uuuuuuuuuuuuuuuuuuuuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaauuuuuuuuuuuuuuuuuu
    Amazing

  • @rommix0
    @rommix0 ปีที่แล้ว

    That is the slowest calculator in the world lol

  • @boris2342
    @boris2342 3 ปีที่แล้ว

    looks like my calculator from jr high

  • @christophermoore6110
    @christophermoore6110 ปีที่แล้ว

    Can someone explain to me why this is impressive?

    • @GilmerJohn
      @GilmerJohn ปีที่แล้ว +1

      It's a LOT of fun. 2.5 generations of EEs "grew up" with digital logic and computers. But before that things like an "originating register" which is connected to your telephone when you dial and "remembers" the number you dialed were made using relay logic. I doubt that many "new" EEs could even start to design such a gadget.

  • @Kamilego960
    @Kamilego960 ปีที่แล้ว

    This sound❤

  • @TheBrilliantChicken
    @TheBrilliantChicken ปีที่แล้ว

    How

  • @BitorBit_
    @BitorBit_ ปีที่แล้ว

    jesus thaat is slow but i really do like the sound

  • @tiagocruz4590
    @tiagocruz4590 ปีที่แล้ว

    Hipnótico

  • @drakethedragon457
    @drakethedragon457 ปีที่แล้ว

    R E L A Y

  • @bountyhunter4885
    @bountyhunter4885 ปีที่แล้ว +1

    Still...I calculate I could finish a pie faster than this amazing machine.

  • @kalpeshwani8520
    @kalpeshwani8520 3 ปีที่แล้ว +1

    What's sound is it....
    not of electronics...

    • @HangTimeDeluxe
      @HangTimeDeluxe 3 ปีที่แล้ว +1

      The sound you are hearing is coming from the state change of the relays.

  • @slckb0y65
    @slckb0y65 ปีที่แล้ว

    mankind isn't ready to yeld such power ... but can it run crysis ??

  • @Chiavaccio
    @Chiavaccio ปีที่แล้ว

    👏👏👍

  • @orbitingeyes2540
    @orbitingeyes2540 5 หลายเดือนก่อน

    Rajek Rajek RAJEK! Aaaahahaha!
    (Star Trek TOS)

  • @MichaelOfRohan
    @MichaelOfRohan ปีที่แล้ว

    Hahaha if those relays are chevy oem, we have a design flaw xD

  • @VicGreenBitcoin
    @VicGreenBitcoin 3 ปีที่แล้ว

    Next task should be a Bitcoin Hash (mine btc)

  • @batboyboy
    @batboyboy ปีที่แล้ว

    why not use TRANSITOR instead of relay?

  • @eckee
    @eckee ปีที่แล้ว

    y tho

  • @1900OP
    @1900OP 3 ปีที่แล้ว +1

    This "sounds" impressive

  • @Elfnetdesigns
    @Elfnetdesigns 3 ปีที่แล้ว +1

    Thats fine and all but the real question is, Can it run DOOM?

    • @rubberduck4966
      @rubberduck4966 3 ปีที่แล้ว

      Is one Frame per Decade (10 Years) enough for you?

  • @stepannovotny4291
    @stepannovotny4291 ปีที่แล้ว

    No.

  • @oldtwinsna8347
    @oldtwinsna8347 3 ปีที่แล้ว

    Ok, but can it mine some cryptocurrency ?

  • @haerfgvbag7050
    @haerfgvbag7050 ปีที่แล้ว

    THE most useless thing ever?

    • @Nordpol
      @Nordpol ปีที่แล้ว

      Not useless as it shows that microcontroller realy do nothing else as to ompare "1 " and "o" (energized or not energized relais)