1. If you're looking for help-related things (for example, the key rebinding tutorial), please check the FAQ and Q&A forum! A lot of the stickies from this forum have been moved there to clean up space.
    Dismiss Notice

Need some simple wiring help

Discussion in 'Starbound Discussion' started by pmbonomi, Jan 18, 2014.

  1. pmbonomi

    pmbonomi Void-Bound Voyager

    Hi folks, I've seen some real geniuses here, so I'm hoping someone can help.

    I have a hatch that, after activating, auto-closes pretty quickly. I'd like to use a small wall button to open it, and it needs to stay open just a bit longer (2 seconds or so), before auto closing.

    Help? :)
     
  2. OobleckTheGreen

    OobleckTheGreen Space Kumquat

  3. GewaltSam

    GewaltSam Big Damn Hero

    I am no pro with the wiring system, but try this:
    Connect it with a timer with 6 or 8 NOT gates in a row. The output should be 1 around 2 seconds later. It's not very elegant, but it works. There is another solution, but it is much more complicated. Look up the "advanced wiring guide" here in the forums.
    This is just out of my head, forgive me if I am wrong.
     
  4. Eonwulf

    Eonwulf Scruffy Nerf-Herder

    Here is an example of how to create a continuous delay as well as extending the delay further.

    Firstly the mechanisms you will need for a basic continuous delay.
    1x Button 1x Lever 1x OR Gate 1x AND Gate
    2x XOR Gate 1x NOT Gate 2x Timer

    [​IMG]

    Secondly the wiring behind it. Hopefully I spaced it out enough for you to see what goes where.

    [​IMG]

    Now to extend upon you need only add 1x NOT Gate, 1x XOR Gate and 1x Timer as shown. If you want longer and longer delays just keep extending and make sure that the last timer connects back to the AND gate.

    [​IMG]

    Here is a example of it in action.

    [​IMG]

    If you need any more wiring help, I have a basic wiring tutorial on youtube. It's not great but whatevs.


    If you have anymore requests, let me know.
     
    TheFloranChef, SeaJay and GewaltSam like this.
  5. SeaJay

    SeaJay Space Kumquat

    This method doesn't use a button, instead it uses small wall switches, but that isn't too important, right?

    I used a 3-bit binary counter that starts at 011 and counts downwards. The 0 digit (the leftmost switch) is connected to the door and also to the Timer that powers the counter.

    Activating the leftmost switch opens the door and starts the counter. The counter will count downwards until it reaches 011 again. When it reaches 011, the timer freezes and the door closes.

    3 bits means about 8 seconds. I used 3 to demonstrate the pattern. You can change the number of bits to adjust delay length:

    1 bit: ~2 seconds (starts at 0)
    2 bits: ~4 seconds (starts at 01)
    3 bits: ~8 seconds (starts at 011)
    4 bits: ~16 seconds (starts at 0111)

    [​IMG]

    Here's a video of a 2-bit version.

     
  6. Eonwulf

    Eonwulf Scruffy Nerf-Herder

    Good job much better than mine. You could just wire up a button to do the initial lever flip and hide it all somewhere though.
    You so smart though, SeaJay. Maybe I could be that smart one day.

    Edit: Nevermind I just realized that you can't use a button because the initial lever is continually receiving a signal so it wouldn't be able to take in the button's signal. Dang.
     
    Last edited: Jan 21, 2014
  7. SeaJay

    SeaJay Space Kumquat

    Aww, I'm flattered.

    Yeah, if you absolutely must have a button, you'll need edge detection between the two leftmost bits. This is a true pulse extender circuit, so it's actually a lot more useful in other applications too.

    [​IMG]
     
    Last edited: Jan 21, 2014
  8. Eonwulf

    Eonwulf Scruffy Nerf-Herder

    I tried this out but it didn't work. I saw the AND come on for a split second but it wasn't long enough for the initial switch to flip.

    Edit: I did find a way to make a button guaranteed work though.
    [​IMG]

    2nd Edit: On a side note this system makes it impossible to flip the lever making it so only the button can start the system.
     
    Last edited: Jan 21, 2014
    FormalRiceFarmr and GewaltSam like this.
  9. SeaJay

    SeaJay Space Kumquat

    Yeah, SWSs don't always respond to one-tick pulses for some reason. It worked great for me yesterday 5 times in a row, but it's not working today even once. Ugh. If you chain a repeater (OR gate) onto the edge detector's NOT gate, it works because it creates a slightly longer pulse, but y'know, hardware overhead. Not worth it.

    That way is definitely better. It uses fewer gates, is more reliable, and extends to more bits without extra overhead. That's going to be my standard pulse extender circuit from now on. Going to add it to the guide today sometime and credit you for your work.
     
    Last edited: Jan 22, 2014
  10. saik0

    saik0 Space Spelunker

    Here's my revision of what you guys have. Resets at 0000. Right most NOT is the output. Input is ignored while the timer is running.
    [​IMG]
    [​IMG]
    [​IMG]
    Compacts nicely.
     
    GewaltSam and Eonwulf like this.
  11. SeaJay

    SeaJay Space Kumquat

    I like it. Is the right NOT gate the output?
     
  12. saik0

    saik0 Space Spelunker

    Yeah that's the output. The left NOT acts as a NOR of all bits in a down counter. When it hits 0000 it stops the timer. It only works if the input is at least as long as the timer. As a hack I fed the timer back into the NOR gate as well, so it's not stopped until the timer is low. It gives the timer enough time to go high before the button goes low.

    You could adapt it to any pulse with an extra AND gate.
     
  13. SeaJay

    SeaJay Space Kumquat

    Yours is the best version because it uses all the states of the counter, rather than half the states like we were doing. I couldn't figure out a way of using all the states.

    It does some weird stuff if you forget to connect the Timer to the left inverter. It alternates between a short pulse and a long pulse, I think.

    I was concerned that the extra length would make a two-second pulse impossible, but you can do a "0-bit" version that uses no SWSs for a pulse length of two seconds.

    I'll just call this a joint effort between us three (haha) and update the guide with this version soon. (maybe in ~4 hours time)
     
    Last edited: Jan 22, 2014
    GewaltSam likes this.
  14. Eonwulf

    Eonwulf Scruffy Nerf-Herder

    That is good. It's nice to see us all working together. I will be using this version from now on probably. I'm just waiting for the final wipe so I can start a LP of this game. Maybe throw some wiring into it.
     
  15. GewaltSam

    GewaltSam Big Damn Hero

    I read your two threads about wiring so far, SeaJay, and it is pure joy watching the ideas of you three evolve. Please continue with some more threads about advanced wiring stuff in the future :) Maybe if you three do a collaboration at some point, that would be awesome! Well, a thread like this doesn't have to be limited to you guys, but you know what I mean :)

    I myself am on halt with Starbound for now, until the patch gets out. And I am missing some wiring features, too, like light control and a motion sensor (I saw that mod which does it, though). I am more of a tinker, so I try to find practical uses for the circutry. I get most of the (simple) theory behind it, but I always need some time to get behind the more advanced stuff.

    Keep up the great work you guys!
     
  16. FormalRiceFarmr

    FormalRiceFarmr Big Damn Hero

    I love this thread and everyone in it
     
  17. saik0

    saik0 Space Spelunker

    It's fine if you use a button, but as I said earlier if the input is less than the timer it takes for the timer to go from low to high (about 1 second) then the timer will stop before it goes high. If you want something that works with any input, even just one tick high, I came up with this.

    The right is just a button with a one tick pulse. The latch acts as a buffer, holding the input state until the LSB is set.
    [​IMG]

    Now, if the input is on when the counter completes the cycle then it loops without the output going low. If that's a problem do something like this. That's pretty bulletproof
    [​IMG]
     

Share This Page