Redstone Energy Cell + BC Gates

  • 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

danmand

New Member
Jul 29, 2019
6
0
0
Hey all,

I have a problem detecting a full redstone energy cell when using a logic gate on an adjacent buildcraft pipe. The problem is that I have a constant energy sink from the cell, meaning that even if the input power is higher than the output power, the cell will never register as being full.

In case this isn't clear enough, I'll give some details of my setup. I have an array of combustion engines powering a few refineries, via redstone conduits with an energy cell in between. I estimate that the engines together provide roughly 70 MJ/t, and I have throttled the output from the cell to 45 MJ/t. So, my energy cell powers up at a rate of about 25 MJ/t. This might suggest the cell will become full eventually. However, it never gets above 599955 MJ, and thus the connected logic gate doesn't detect it as full. I assume this is because the energy of the cell is calculated each tick by first looking at input, then output, and then evaluating the energy stored. So it goes up to 600000 MJ and then back down to 599955 MJ before the condition is evaluated.

My aim is to use the redstone signal that the cell is full in order to turn off the engines for a few minutes using a state cell from Redpower, in order to not waste fuel. The problem I just described makes this difficult though.

My current workaround is to use a timer and state cell to de-activate the output from the energy cell for 0.4s every 20s. This gives time for the cell to build up to full if it has been hovering at 599955 MJ, thus activating the redstone signal and my state cell. This is not an ideal solution however; I don't like having to temporarily disable the output regularly to make this check.

Hopefully that made some sort of sense! Can anyone think of a better workaround or more intelligent solution to this problem?
 

Magnus

New Member
Jul 29, 2019
18
0
0
You could also set up a second energy cell in series with the first one as a buffer and check on that one. Start your engines when the second energy cell gets empty and stop them when it gets full, this way you always have one cell full to power your devices and one to charge.
This used to work nicely with mfsu:s etc atleast, not certain if the second one will register properly here though or if it will just have the same problem as your first one though.
But you could also combine it with the above suggested timer and you would atleast have a working buffer so your machines won't stop before your timer activates your engines.
 

danmand

New Member
Jul 29, 2019
6
0
0
Thanks to you both! I'm sure I can implement some combination of your answers as Magnus suggested. By having two cells, I have effectively got one 1200000 MJ cell with the ability to detect the half way point. Very handy! I'll have to try this out and see what I can come up with.
 

Zjarek_S

New Member
Jul 29, 2019
802
0
0
Are you sure that you are not talking about my setup: http://imgur.com/a/2OsAO . The first energy cell (next to the engines) is useless and only increase energy loss. These two energy cells have RS latch below, controlling which cell emit power. If a cell is empty then the latch is flipped and another cell begins draining. Engines are deactivating on redpipe signal. If energy cell in charging mode (detected by redstone signal through this floating marble brick block) is full then redpipe signal is emitted.

Similar bug can also present itself in this setup, but it has very small impact, one unnecessary cooling maximum once per fully charging of REC instead of blowing conductive pipes. What's more interesting, this bug was introduced in 2.1.0 IIRC, in previous versions energy full condition was correctly triggering even with constant energy drain.

Edit: Some more detail about this setup ->
bottom layer -> RS latch, which deactivates RECs
middle layer -> redstone torches propagating signal to top layer, gates with "energy empty -> redstone signal"
top layer -> gates with "redstone signal and energy full -> redpipe signal).
 

danmand

New Member
Jul 29, 2019
6
0
0
Thanks Zjarek, that looks like a pretty nice solution. So if I understand correctly, you flip between the output of the two cells, such that only one cell has the power sink at a time. I think in your situation the power drain is larger than the input power, meaning that at any time you have one cell charging and one cell discharging, but this may well be the same for my setup once I split the input power line into two paths. I'll have to try applying this one as well and see how it compares!
 

Zjarek_S

New Member
Jul 29, 2019
802
0
0
Well, you can't really disable charging of energy cells in this way. This setup ensures that with a small drain there will alway be energy cell outputing necessary energy and with long bigger drain (if this bug doesn't manifest itself) it changes into redstone clock, but all energy is transferred from engines to machines. If drain on this setup is big with this bug, half of the energy will go to the system through discharging cell and half will charge the second cell. Then engines will cooldown, but enough energy will be in second cell to keep your machines going and it is only an issue if drain is bigger than half of engines output.

It will also work without this additional redstone signal to iron gates, but then on smaller drains engines will activate more often for shorter period of time. This isn't a problem with combustion engines, but could be an issue with magmatic or biogas engines.

I can't think of any other solution which would perform well with small and big drains without any risk of explosion, I even added safeguard to disable all engines for a short while when any one is orange. Basically to correctly examine gate full trigger energy cell must be disabled, I just make sure that at least one is emitting power because I use it all over the place.
 

Zjarek_S

New Member
Jul 29, 2019
802
0
0
The same iron gate, which emits redstone signal to engines. In my system lack of redpipe signal is required for engines to run, so I just emit it in this case. It causes all engines to stop and cool down.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
The easiest solution would be ticking the cell every two seconds or so. With a signal just long enough for it to go the last few MJs.
 

jnads

New Member
Jul 29, 2019
248
0
0
I don't know if you'll easily be able to do what you want.

Alternatively, look into Magmatic Engines. They output 4 MJ/t, and will work in conjunction with your Redstone Energy Cell (when connected by Conduit) to only produce the exact amount of power required to keep the REC at 100%. I have an array of Magmatic Engines and they all work at different rates.

With a Magma Crucible and Igneous Extruder you can convert cobble to Lava at a 1:1 ratio (input 20k MJ from combustion, get 20k MJ from Magmatic Engine). Keep in mind Magma Crucibles can only accept 20 MJ/t Input, so this is effectively your max generation rate. You'll need more crucibles if you expect higher long-term sustained generation.

Then your combustion engines can be relegated to monitoring a Buildcraft tank and turning on when it gets too low, to produce more lava.


Yeah, it's more complicated, but if you want everything to work as efficiently as you're expecting, this is the only way (at the cost of Materials).
 

jnads

New Member
Jul 29, 2019
248
0
0
If it hasn't changed, you'll get only 18k MJ from one bucket of lava. This was done on purpose by KingLemming.
I forget, yes, you are right. 18k MJ.


Cobblestone structure pipe + Iron AND Gates can detect when your Redstone Energy Cell is 75%, 50%, and 25% full (I think, it works for machines).

You can use that to scale back your production. Have 2/3 of your engines turn off when it reaches 75%, then turn them back on at 25%.

Just throw a structure pipe on your Energy Cell, and attach an IRON AND Gate. Set it for 25% = emit redstone signal, 75% = signal off. Connect this to 2/3 of your engines.
 

danmand

New Member
Jul 29, 2019
6
0
0
Cobblestone structure pipe + Iron AND Gates can detect when your Redstone Energy Cell is 75%, 50%, and 25% full (I think, it works for machines).

I don't think these options are available for the Redstone Energy Cell. When I tried it, the only options for it are empty, has energy, can store energy, and full. It's a shame, those would have been ideal!

The solution I went with in the end was to turn the cell off every 10 seconds to allow it to check whether it's full. This toggles the engines off, and they don't toggle back on until the cell drains completely. Pretty happy with it really, still not ideal, but probably the easiest at the moment without having to switch power source or anything, and don't need any timers with really long settings either. Thanks for everyone's input!
 

Shalen

New Member
Jul 29, 2019
41
0
0
I gates don't want to work, you could alaways use CC computers + Gate Reader from MiscPheripheral and check if the energy level is higher than 599900
 

Hydra

New Member
Jul 29, 2019
1,869
0
0
What you could probably do is have multiple cells in series. If there are two cells in series the first (input) one will drain first. If that's empty (and you're at 50% storage) you could restart the engines again. If you wanted to be able to do 0-25-50-75-100% you need 4 cells in series.
 

zooqooo

New Member
Jul 29, 2019
138
0
1
Pipe wire generally solves these kind of problems, if your willing to make iron gates that is :p
 

danmand

New Member
Jul 29, 2019
6
0
0
Hey, that sounds like a plan! Hadn't heard of the gate reader til now, will have to try that. Doesn't need many resources either which is good, I can just re-use the gate I already have on there to build it.
 

Shalen

New Member
Jul 29, 2019
41
0
0
Hey, that sounds like a plan! Hadn't heard of the gate reader til now, will have to try that. Doesn't need many resources either which is good, I can just re-use the gate I already have on there to build it.

Yes. If you need help check the Misc Pheripheral thread here or watch one of the DW20 Spotlight.
 

seattleda

New Member
Jul 29, 2019
42
0
1
Soon you will be able to use a PRC from MFR as an SR-Latch. With at least 3 RECs in a row (last one has a constant small draw, say, from an AE net) put a signal-if-empty on the middle one, and signal if full on the first. The SR-Latch circuit will turn the engines on when the middle one signals empty and turn them off with the first signals full. Viola - no need for RP2.