Charge/Discharge Redstone Circuit?

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

MaxAstro

Active Member
Oct 1, 2017
52
8
34
I'm trying to figure out how to make a charge/discharge redstone circuit. Specifically:
*As long as the signal strength is above 2, the output is off
*When the signal strength falls to 2, the output turns on and stays on
*When the signal strength reaches maximum, the output turns off again and returns to the initial state.

The idea is that I'm going to take a comparator output from a tank so that I can refill the tank when it gets low, but not be running the machines that fill it all the time.

I'm pretty sure I need a T-flipflop, but that's as far as I've gotten; I'm kinda terrible with redstone.

Only "advanced" redstone I have access to is the redstone connectors from Immersive Engineering.

Can anyone help me figure this out?
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
I am terrible with vanilla redstone stuff, but yes you would need two setups detecting when strength is above and below certain values(I would stick to two trigger values, something like 10% and 90% full). And those two's output signal would then have to trigger a flipflop/latch.
If you had something like BC gates, detecting the level in the tanks is also pretty easy. You could even build the flipflop with the gates, by using "self holds" that you trigger and break respectively.
 

MaxAstro

Active Member
Oct 1, 2017
52
8
34
I do have Build craft but I don't know if I have gates (SevTech, age 3). I haven't used BC gates before, either.

I think based on your description, though, that I've had a flash of insight. If I'm correct, what I need is a falling edge monostable at signal strength 3 and a rising edge monostable at signal strength 14 (not 15 because the tank might not ever get 100% full). If I connect both monostables to an RS NOR latch and then to the pumpjack that... Should actually work? I think?

Looking back at that sentence, I can't believe that it kinda makes sense to me. First time I've built a redstone circuit this complex and sorta understood it, lol. I've heard people talking about monostables before but this is the first time I've actually realized what they are useful for. XD

I won't be able to test this until tomorrow; can anyone confirm that it sounds like it will work?

Alternatively, if it turns out I do have access to gates, how do those work?
 

SolManX

New Member
Jul 29, 2019
987
-1
1
Here's a post I made from a while ago with a very similar problem. I think it's basically what you said but it might help to clarify your idea.

I've changed the numbers to match yours.

The basic idea is ...
Code:
If(Redstone Off AND Signal < 2)
Turn Redstone On

If(Redstone On AND Signal > 14)
Turn Redstone Off

... although there are actually 6 states to consider ..

Code:
Redstone      Signal            Result
Off          < 2               Turn Redstone On
On           < 2               Do nothing (ie keep Redstone On)
On           > 2 AND < 14      Do nothing (ie keep Redstone On)
On           > 14             Turn Redstone Off
Off          > 14              Do nothing (ie keep Redstone Off)
Off          > 2 AND < 14      Do nothing (ie keep Redstone Off)

Hope that helps!

PS You could use a Etho hopper setup for the switch.