Detecting when Batbox/MFE/MFSU is empty/full?

  • The Wikipedia states that Splitter cables and Detector cables can be used to detect overflow or detect when a storage is empty.
    The question is, how does it work?


    The only way i know how right now is to make a feedback loop so that if EU's are passing through a detector cable then the storage has power. For this i have to make another storage just for that feedback loop. I don't want that...
    Could anyone provide examples on how to make a storage full/empty detector without using an extra storage. Thanks!

  • Storage full I don't think is that hard, although it still takes extra wiring. Just use a wind or water mill (constant EU flow) with a detector on the cable connecting it to your storage. If it's full, no power flows from the power source. Not sure how this would work with <1EU/t, though, and requires that there be no power draw.


    Another option for testing fullness would be to redstone the storage and check for leakage. This could be on a timer, or manual trigger. Since everything has some internal storage, blocking output for a few ticks shouldn't hurt anything.


    If you have several storage units in series, you can detect whether upstream ones are empty, but only if you don't have constant power input. Put detector cables before and after the last storage unit in the series. If there's power flowing through the downstream detector, and not the upstream one, it means all storage upstream of the detector is empty. I plan to use this setup as a low power warning for my power storage room, so I know when it's time to do another reactor burn. If you do have constant input, I guess you could use a splitter cable to interrupt it for a few ticks while this test is performed...

  • Detecting the full state is easy, obviously (redstone the storage and add a detector wire on the output). It's the empty state that's in question, I guess. Considering that you'll likely be getting at least a trickle of EUs into the storage, you won't be getting a true empty state at all, unless you shut off the energy input once the storage is full. Is that your setup? If it is, I can give you my setup that uses RP2 circuits to fill/empty a storage in cycles... I'm sure it could be replicated with base redstone if required.


    P.S. Incidental, this circuit is also useful for measuring gross EU/t over time. If you just wire the output to a counter, you can see how many cycles it's gone through in a period of time. Do some math and you can figure out EU/t. Ideal for charging customers for their power usage. "Customer has emptied a MFSU 15 times, that's N EU/t/day.." If you are using batboxes, you get more cycles/time, and less cycles/time for larger storages. Obviously the cycle time is dependent on a static EU/t input of some sort.

  • After some more thought, I still can't think of any way to have an ongoing indication of full/empty state.


    The simplest I can come up with is:
    Connect one lever to a splitter cable on the input wire.
    Connect a second lever to the storage unit itself.
    Connect a detector cable to the output.


    Check if empty:
    Turn on lever one - if detector cable is off, it's empty.


    Check if full:
    Turn on lever two - if detector cable remains on, it's full.


    Something downstream has to actually be accepting power during the tests.


  • Something downstream has to actually be accepting power during the tests.

    You can feedback the storage here so you don't need downstream draw. FYI. Suggest having THAT test on a branch of the output, rather than on the primary output.


    EDIT: Can I ask; are you looking for some sort of lit indicator? Like something you would check at-a-glance in a control station, rather than something that requires flipping of switches/etc...?


    EDIT2: Guess what I mean is: WTF are you actually trying to DO? Can't really think of how you would want it set up w/o that info!

  • You can feedback the storage here so you don't need downstream draw. FYI. Suggest having THAT test on a branch of the output, rather than on the primary output.

    True... You could actually put another splitter on that branch connected to the inverted output of both levers, so you're not needlessly feeding back except during the test.


    You could also put the tests on timers, with latches connected to indicators, but I tend to dislike timers running 24/7...


    Being more specific with the use cases would help, too, since you can take advantage of other circumstances in that case to make things easier.

  • Indeed!


    For example; In my last world I had a butt-ton of batboxes INSTEAD of MFSUs so that I could check the input/output of each one and display the results on an at-a-glance RP2 light display. Each batbox would trigger the output of the previous one only when it was empty, for cases where my power supply failed or was shut down, and would fill sequentially as well. This gave me a way to have something similar to the meter on the MFSU, except externalized into the world. I was still working the system out when my -supposedly- stable bucket reactor went critical... My fault entirely. I had forgotten something simple that I won't mention here...... ;( The most recent backup doesn't include that setup, unfortunately, and I have moved on to a new world anyway.


    P.S. The OreVeins is turning out to be quite entertaining! I would love to have the resources to set up a server with 'Extreme' mode. Talk about some real industrial commerce that could develop! Must say; it's made the ore scanners MUCH more valuable! I have (as a side note) 'reprogrammed' my scanners so they can be used to discover which ores I'm detecting. By setting the top 3 desired ores (coal/iron/diamond) each to some factor of 10, it's MUCH easier to understand what's beneath your feet. (Coal = 100, Iron = 1,000, Diamond = 10,000.)

  • Indeed!


    For example; In my last world I had a butt-ton of batboxes INSTEAD of MFSUs so that I could check the input/output of each one and display the results on an at-a-glance RP2 light display. Each batbox would trigger the output of the previous one only when it was empty, for cases where my power supply failed or was shut down, and would fill sequentially as well. This gave me a way to have something similar to the meter on the MFSU, except externalized into the world. I was still working the system out when my -supposedly- stable bucket reactor went critical... My fault entirely. I had forgotten something simple that I won't mention here...... ;( The most recent backup doesn't include that setup, unfortunately, and I have moved on to a new world anyway.


    P.S. The OreVeins is turning out to be quite entertaining! I would love to have the resources to set up a server with 'Extreme' mode. Talk about some real industrial commerce that could develop! Must say; it's made the ore scanners MUCH more valuable! I have (as a side note) 'reprogrammed' my scanners so they can be used to discover which ores I'm detecting. By setting the top 3 desired ores (coal/iron/diamond) each to some factor of 10, it's MUCH easier to understand what's beneath your feet. (Coal = 100, Iron = 1,000, Diamond = 10,000.)

    What I'm aiming for is sort of a 3-stage storage. 4 parallel series of MFSUs. The first set of 4 where the input comes in will essentially be kept redstoned all the time, giving me a 40MEU reserve in case I accidentally leave something running that drains everything. The last set will have the setup I described above, letting me know when the middle ones (up to 56, depending on resources) are empty and I can do another 400MEU reactor run. :) The mass fab(s) will tap in between the output MFSUs and the "middle" ones, so it can't touch the reserve, or run in a "low power" situation.

  • Some time tonight I'll recreate my setup. I think it'll work out better for you, but I'll let you decide once you have seen it. The (very) nice thing about it is that you could make the MFSUs in 'clusters' so you could have that massive reserve you were talking about, but with a power meter to read it's storage at-a-glance.

  • Sorry for taking so long to reply but i was reading the source on Wind Generators and checked a lot of other threads that had replies to them before this one.


    What i intend to do with an Empty/Full detector is:

    • When empty, Trigger a bunch of feeders to my generators to fill them with charcoal.
    • When full, trigger a bunch of unloaders to unload my generators.


    And anything in between OFC. Like an automated system to feed just as much resources to my generators as my energy storage can handle.
    I also have plans on making my base lit by a bunch of luminators. I want the luminators to stop receiving power when my energy storage reaches low levels so that (roughly) the luminators will turn off at the same time as the energy storage is depleted or at least stop consuming power for all light systems (only leaving emergency lights on) when power level is low.


    Obviously, the suggested consumption meter is a neat extra!
    Thanks for the feedback/advice, it helped me get a better understanding of what i need to do.

  • Well, if you're going to use luminators, you should have a pretty constant flow of EU out of your storage. If you hook up storage in series, you can place a detector cable between two of them near the output end. That cable will shut off its signal when storage upstream of it is empty, which you can use to trigger fuel dispatch. You'll already know exactly how much to send, since it's just storage size/4000 coal (plus a little extra to account for energy used during generation time if you want). Leave enough storage downstream of the detector to handle any delay required to get the generators started. Any solar/wind or other constant EU income will have to be input downstream of the detection point.


    EDIT: this setup will trigger a "not empty" signal right as the generators start, and there's no "full" signal - you'd have to have a system that sends a predetermined amount of fuel without further input...

  • I have been having some issues with finding the lapis I need to get the system up and going. I don't want to just creative it because I'm going to be using it as well. I'll let you know when I have it up and running. I'll be sure to get it operational without all the cover plates and walls in place to hide the wiring, so you can see everything.

  • I'm running into an issue where the power flow from a MFSU to another causes the EU detector to "pulse" with each tick, whereas I need a constant on (power is flowing from one to the other) or off (power is not flowing) signal. I suppose I could add a HV -> MV -> LV -> detector -> luminator circuit on every MSFU to get a more steady flow, but that seems rather silly. Similarly, I could try and do something complicated with latches and timers RP2 to turn a pulsing signal into a steady one, but there really has to be a simpler solution here...

  • Hmm, MFSE -> MV transform -> LV transform -> luminator still causes pulses. I'll try adding in a batbox before the luminator and see if that stabilizes it.

  • Maybe the reason it pulses is because of the lag caused by transferring power to something that requests it and it requesting another packet?
    But initially i thought of the need to build the packet. For instance, if you are going to send a 512 EU packet and you feed it 128 EU/t it will take 4 ticks to make that 512 EU packet.

  • I figured out a reasonably cheap way to turn the EU detector pulse into a steady signal using the RP2 Counter coupled with a Timer. Essentially, if current is running through the EU detector, it will tick faster than the Timer pushing the Counter to one side. If current is not running through the EU detector, the Timer will push the Counter to the other side.

  • If you're seeing a looping cycle on the output of a batbox/mfe/mfsu check the positioning of your detectors. I've found having a detector sitting directly on the output of such a battery triggers the redstone cutoff for the battery, and since the detectors and splitters only update once (or twice not sure) a second, you get a nice loop of pulsing power from your battery...


    I'm not certain if detectors on the input do it, or if it's just if the detectors are on the box's sides... will need some experimenting, but if you want to be sure stray redstone signals don't mess with your batteries, make sure the detectors are at least not in contact with the battery.

  • Man, these images are getting thin! Been spreading them about all over the place!





    Run multiple versions of these, in series or parallel, your choice. If you don't want constant 'pass through,' eliminate the entire top part of the assembly.


    The redwire out the bottom 'To Reactor' can be renamed 'Recharge Request' for our purposes.


  • ------------------


    Basically, you can determine wether a Power Storage is Empty or has Some amount of power left inside it.


    When a Restone signal is supplied to the Electric motor....
    The Eu-detector will....


    -Create a Redstone signal if there is power in the Power Storage.


    -Produce no signal if Empty.



    Hope this helps :thumbup: it's the method i use in a bigger project.