Jump to content

Power Grid [Modified Sine Wave Inverter] [All Battery Switcher Designs] [The NOT-NOT Oscillator] [Battery Engine MK1] [Power Shutoff Bug Fix] [Capacitors and Relays]


Switchers or Flippers?  

  1. 1. I call them switchers and sometimes call them flippers. Both are the same thing. Choose your poison.

    • Switchers
      0
    • Flippers
      0


Recommended Posts

 

 

Current Post Status: Work in Progress, this will disappear when I am mostly finished

To do: [Make Recap and Rules Section] [Find out how to trigger transformer priority]

New update, found an annoying bug. While stress testing the engine, it would popup as damage from overload, but no damage has actually occurred. more over even if no damage occurred, the wires would still break as if they were counting how many times they had been overloaded and not how much actual damage occurred. Hard to say what is happening here. I suspect this would only pop-up on a pulsing grid.

Pretty sure this is called a modified sine wave inverter in real life. The pulsing grid is what is called a switched-mode signal

update: added more info on the inverter

3 seems to be the absolute limit before having to use a transformer. and even then I had to use the large one.

Made another breakthrough. I messed with the timings a bit more. I am now able to run 50Kw off of 3 batteries, no transformers.

I'm Calling this the Battery Engine

so close to a 2 piston engine

logic needed for a 2 cylinder engine

Rules:

C and D must always be 1 at any given time

A and B must not be on at the same time

C and D must not be on at the same time

While Battery Y is discharging

Swap from charging X to discharging X

Then while discharging X

Swap from charging Y to discharging X

A   B   C   D

X swaps from charge to discharge

1    0   0   1

0   0   0   1

0   1    0   1

Y swaps from discharge to charge

0   1   0  0

0   1   1   0

Y swaps back to Discharge 

0  1  0 0

0  1  0  1

X is swapping from discharge to charge

0  0  0  1

Repeat from top

A charges 1 times in this cycle

C charges 1 times in this cycle

B discharges 5 times in this cycle

D discharges 5 times in this cycle

balanced 👍

 

Testing filter mechanics

allows oscillator to pass at .2s but not at .3s

 

buffers behave in a similar way. also 2 gates at set at .2s will not allow the signal to pass. there can only be a chain link of one .2s filter. adding more than one will not allow the signal to pass

seems the pattern is 1001 and repeats this wave all the way down. This is with one not and one xor gate. Might be able to do something useful with this. It takes 4 ticks to repeat the cycle with 4 filters at .1s.

1001

1100

0110

0011

loop

I know the pattern for the 2 cylinder needs it to not be 1100 at all so I'll have to figure out a combination of gates that will let me get that pattern.

I might make a table. adding another not gate to the oscillator an extra 1 and the cycle repeats with

111000

011100

001110

000111

100011

110001

loop

I'm seeing the pattern here.

Every not gate added decreases the frequency of the wave.

also looping the xor gate into itself gives you 10101010... I guess I don't need a higher frequency, I could always invert it with a not gate.

stringing together a bunch of nots in a row since they are already alternating when you first starts nets you with all green or all red.

I'm starting to figure it out. adding buffers or filters at .1s makes it so that it stays green for tick longer and adding a not gate will make the bit red.

so if you have for example a pattern of 3 on 3 off, you get something like this. a good way to get the next bit in the cycle to stay green.

image.png.312cc696c04db679a16d21626594fcbc.png

 

The not will negate the next two bits in the cycle

image.png.20113b7e76eb93fffdc930bb069e26dd.png

 

I've got the pattern for shutoff switch A down to a science now I just need the rest

then

I have a buffer-filter timer for A and i need to shift it 4 ticks to get C. now I just need B and D.

That took a while, but i did it. 2 stroke engine accomplished. It was easier to think about how to offset A to C then A to B to D then it was trying to add waves together. much easier.

Will post vid soon.

 

Relevant Info

 

 

 

 

Saw this after I already built the inverter. similar concept.

 

My previous work on battery switching and transformers.

 

@FIXBUGFIXBUGFIX Founder of the concept for battery switching.

 

 

 

Design Precursors

 

The OG

The Original design used a single battery as the primary i/o. When battery requests power, it swaps from charging to discharging on each pair of power shutoffs. Very simple, but effective and cheap.

image.png.0b5a75946a47d9cab09a738fb9459bf1.png

image.png.038c6c85935a19535425f587e0c64c62.png

image.png.b8ce1dc5efab243903ae08854e07ecb7.png

 

 

Battery Switcher 2.0

 

This new design allows us to independently set the i/o for each battery. I will refer to the battery that is directly connected to the shutoff as the primary and the other battery isolated on one leg of the not-not latch will be the secondary.

Primary = Battery A

Secondary = Battery B

The primary will always supersede the secondary when requesting power. When the primary is full, there will only be a state change when the secondary is requesting power. The not-not latch remembers the state it was previously in when toggled. Play around with different High/Low settings and see what i/o fits your needs.

The i/o i have it set for at 5/20 and 80/100 will make it state change faster the less juice is in the system. The opposite is also true where the more juice you have the less it will state change. You can set the i/o to whatever you need.

 

image.png.e133ea99edaf9bf799292089f100f4f5.png

 

I've also built a mirror version where the primary and secondary are flipped in case you want to build from L-to-R OR R-to-L OR. They both function the exact same way, it's just for aesthetics.

 

image.png.b96e93e8e3b203917dcee10d8c252a92.png

same wiring for both

image.png.0e7cd227f52c392dfe3d0aac67f4ea7e.png

 

 

 

Battery Switcher 2.1

Disclaimer: Read the relevant info section on "Introducing the Pulsed Power Grid" and watch the "PSA Power Shutoff Bug" video before continuing the next section.

When you combine normal battery switchers or even the 2.0 version with any consumer (pulsing OR non-pulsing), there will be some bleed back into the system because the shutoffs flip at the same time causing a momentary pulse leakage on the producing line. Here is an example of this in action (or an attempt as i pause and unpause a hundred times).

To make matters worse, there is a bug or should I say "Feature" as a side effect of battery switching in general. This is the mechanic @blakemw describes in This Post, specifically in the "Why instead of Battery Switcher?"  section. To explain a different way, when you have increased i/o speed from your switchers. The power shutoffs don't have enough time to get out of what I call the "Red Zone" Here is a pic of what it looks like.

image.png.cf417c6d8428b59c13c002d50406b88b.png

Even though the power shutoff is off, it will be stuck in this red state until it switches again. This will accumulate overload time from the consumer line (right side) either when it is consuming or pulsing until we toggle it out of this state. Through testing I have found that adding filters give the power shutoffs some room to breathe so they don't trigger this state as often. 0.1s on the discharge shutoff pair & 0.2s on the charging pair seem to be the fastest speed without back bleeding and overload accumulation. [Update] I have found on other builds that .1s on Charge and .3s on Discharge does not overload the wires. With higher switching i/o, 0.1s & 0.2s may still overload the wiring. This is easier to see and understand when I go over the inverter in a later section.

 

image.png.247d36d1d5958d27b34c23601222d89d.png

 

3-Battery Switcher

This got me thinking of an alternate way to add filters without the need to decrease i/o speed. So I added a third battery as a buffer to the mix. Here is the logic table for the 3-Battery Switcher. This Build Gives the power shutoffs a little more room to breathe than a 2 battery switcher.

Input        Output

A B C       A B C

1 1 0        0 0 1

1 0 1        0 1 0

0 1 1        1 0 0

 

image.png.ce727b3c807ce40ea8498940fe7df999.png

 

 

 

0&1-Tick Oscillators

There was a strange mechanic I did not understand at first. I chalked it up to usual circular logic, but there was more to it than that.

 

I did not know how to fully utilize this new effect until later. Turns out even past me was confused about this too!

 

 

This led me to several new discoveries. The one I'm about to share with you is something I am calling

 

The NOT-NOT Oscillator

To be fair I am not the first person to discover this mechanic. In fact I've seen no less than 10 different posts at varying times all talking about how exactly to control this 1 tick behavior through buffers and filters after searching just now. It just so happens I discovered this phenomenon naturally while I wasn't even looking for it and I'd like to share the circuit I came up with to control this behavior.

 

Logic is fairly simple

Not Gates = flops signals with one another at the games default tick rate.

Filter-Buffer = As described by 2.1 Battery Switcher section. Reduces back bleed to the mains.

XOR = acts to flop the signal from red to green when one input is always on.

Not-Gate to XOR = If EVEN number of NOT floppers are built, set the left switch to OFF. If ODD number of floppers are built, set the switch to ON. This is showcased in the video above.

 

Modified Sine Wave Inverter

An inverter is used in circuitry and electronics to convert 12V/24V DC battery power into a stepped, approximated 120V/230V AC waveform. Using The NOT-NOT Oscillator together with a bunch of Batteries, Filters, and Not Gates, we can create the same thing in game! I'm starting to think this is less of an exploit and more of intended behavior at this point. This is way more ethical than farming oxygen deprived dupes for free water, and energy.

 

 

image.png.b7244ed4afb1acddb9420d3776e201dc.png

image.png.e2976f32b9a1ddceb0c3cee1451f3d89.png

Inverter on a Pulsing Grid

This works on a pulsing grid set to [0.1 ON & 0.2 OFF]. If you increase the wave frequency on the inverter here, you will overload the wires as they need a full wave cycle to cool down after encountering the "Red Zone" as described in [2.1 Battery Switcher] section. The small video above makes it easy to see this happening. The filters are set to 0.3s for the incoming charge and filter-nots are 0.1s for the outgoing discharge. The filter-buffer I have going into the XOR is set to 0.1s/0.1s because that is the quickest the wave can complete a full cycle. You can reach peak efficiency by just removing the in-line buffer-filter, but I like how you can easily delay the cycle with them added. plus, any quicker than 1 full cycle will risk an overload, so this gives a .1s buffer to prevent that.

Inverter on a Non-Pulsing Grid

Here is where this really shines. We can do away with transformers all together. Just increase the wave frequency and you can power anything directly to consumers.

 

[add automation to increase wave frequency]

 

 

Power Shutoff Fix

No guide to power builds would be complete without talking about the one bug that still plagues all of us to this day. The dreaded Power Shutoff Bug...

Disclaimer: This was written before making the inverter build. This method of fixing the shutoff bug will still work for battery switchers that do not use The NOT-NOT Oscillator. As of writing this now, I believe the cyclical nature of the oscillator fixes this bug for good. I will still include the alternate method here for inspiration and other builds.

Through testing, adding filters alone to battery switchers does not fix the shutoff bug on save/reload.

Going off of my previous work and the fact that we actually have a wattage sensor now means we can finally have a fully automated way to detect and fix the shutoff bug. No clocks or other indirect mechanics needed.

Watt-Filter sensor = detects when there is no voltage on the consumer side for a variable amount of time.

Filters = As described by 2.1 Battery Switcher section. Reduces back bleed to the mains.

Not-Not Latch = Remembers the state it was in when toggled

Not-And Rising Edge Detector = @biopon helped me with that a long time ago. Sends a 1-tick pulse when on. Only sends another pulse after it has been turned off and back on again. The Buffer is to make sure the pulse goes through the filters.

XOR gate =  isolates one leg of the not-not latch from the switcher shutoffs. It will toggle the shutoffs regardless of what state the non-not latch is in.

 

image.png.aba0ef883564c764d5a5ca48e17aeb02.png

 

 

 

Power Grid and What-Nots Explained

 

Remote Battery Level Indicator .33Kw

In terms of priority, it will be the first thing that gets charged by the producer line at .33 Repeating [.1/(.1+.2)=1/3] Kw (pulsed) or just 1/3 efficiency. and it will be the last to discharge at 1Kw when consumption is greater than power produced (or if gens are turned off).

because of the limited .33 repeating Kw throughput from both transformers in line with each other, if you build multiple modules of these miles away, they will charge/discharge at the same rate effectively syncing them together on the same backbone. There are a few variations of this to suit your i/o needs. For example if you want even slower drain when batteries are full, just pulse the second transformer too.

If you remove the pulser from the left transformer it won't be as accurate but it will fluctuate between 0-4Kw on the same backbone. I blame shutoffs causing transformers to start and stop at different times causing output to not be stable.

 

image.png.b7645ba90b2a0ce4e1d8e61c56e6e42b.png

image.png.a34177e545861d59b24222647f6e0771.png

 

 

Auxiliary Sensor

Same exact wiring except Add/Replace the battery with watt sensors

image.png.82afed8cdba068a683fc26c1de17aa7e.png

 

 

Looping Transformers Explained

A little bit more on looping transformers (@Gamers Handbook method of battery switching)

Lets assume non pulsed transformers that are completely accurate so they turn on and off at the same rate AND also assume a full battery to start with before depleting through said transformer.

Battery A AND B Charge/Discharge at different rates when you loop. 1Kw is being divided to charge Battery A and every other battery on the backbone. So Battery A charges at 1Kw Divided by Total Amount of Batteries on Producer line. Another way to think about it is to add how much power your generators are producing with the total number of output side transformers you have on the same line.

T+G / Total Batteries = How fast Battery A charges

Throughput of transformer on the left = How fast Battery A AND B discharges to Battery C

This looping behavior can be a boon or curse on your grid depending on how you use it. For example if you were to build a Power Relay or Capacitor that pushes power down the line, you would not want to loop it back to the main backbone as that would limit throughput.

image.png.0b02f8348639cac00292ba20d533e7a5.png

 

 

Capacitors

Disclaimer: Inverter supersedes the need to build a capacitor of any sort. This section is here for info on configurations prior.

Non-Pulsed 20Kw and 50Kw Capacitors (Small and Large Wire Variants)

Based on the 2.1 Battery Switcher Spec with the shutoff bug fix upgrade. The Large wire variants have the ability to feed consumers directly whereas the small wires act as a relay. They both have back feed protection and stabilize output when needed. Benefits include being able to stockpile energy and dispersing all at once later.

image.png.fc102c16012c512c42c48493deaa65c6.png

 

image.png.79d1c081a8a763464608190e4e21f35e.png

 

image.png.86a96769da946f7799b66ebbcfd73509.png

 

 

Pulsing Relay

Has identical function to the capacitors when paired with a battery switcher of the same kind. Only difference is this one is able to be infinitely scaled to one battery switcher. I chose a block of 100 transformers for this example.

image.png.b34136bd28262a2e7a36ea53c76e3fbc.png

 

image.png.a4f4ca64ecaffe5f479abd4e97a5544d.png

 

image.png.e6eb5d2ebe3e2ed20fd04be832b0dcb9.png

 

Only Pulsing will allow you to consume unlimited wattage on a given wire. If your goal was to have the most wattage consumed on a single piece of wire without overloading it, this is how you would do it.

 

image.png.d2ed47854f33bd20d7c74b3baf0eebc9.png

 

The timer would have to be synced on all transformers to prevent overload. Two pulses on the same wire will always overload. This is covered in Pulsed Power Grid.

Efficiency for a pulsed transformer is given by this formula [ Time ON / (Time OFF + Time ON) ]

In our case, 1 large transformer is equivalent to 4000/3 or 1333.33 J/s. 1 small transformer is 1000/3 or 333 J/s. I've found only .1s ON .2s OFF is the only frequency that prevents overloads with battery switcher power shutoffs. You must pair Pulsing relays with a battery bank on the consumer end to have 100% downtime otherwise you will get a flickering light show.

 

Capacitor VS Pulsed Relay

Which is right for you?

Lets do a cost benefit analysis between the two since they do the same thing which is to push as much power as humanly possible from producers to consumers.

get ready for some rough math.

2000Kw / (4000Kw/3)  = 1.5 ratio of large transformers pulsed per 2 small non pulsed
365kg per additional large transformer to add
need 36 + 1.5 = 37.5 modules needed per 50Kw
(37.5 * 365kg) / (1000kg/T) = 13.6875T metal per 50Kw

One-Time Battery and transformer builld cost for non-pulse = 2260kg or .2260T
50Kw pulse recurring cost = 13.6875T
50Kw non pulse build = 8.1T + 2.175T = 10.275T
Pulse capacitor outpaces non-pulse capacitor by 3.4125T of metal every 50Kw
It is cheaper to build the non-pulse every time

on 1.9 off for 2 is (1.9 / 3.9) = .48718 efficiency
on for .1 off for .2 is (.1/.3) = 1/3 efficiency
even if we used a different pulse timer for the capacitor we would only get
.48718 / (1/3) = 1.46154 or 146.154% more power.
new ratio would be 2000Kw / (4000Kw * .48718) = 1.0263 ratio of large transformers pulsed per 2 small non pulsed
[ ( 36 + 1.0263 ) * 365kg / (1000kg/T) = 13.5146T
new 50Kw pulse recurring cost with better efficiency = 13.514.6T
thats a small difference of only 172.9Kg every 50Kw

I have a table included of all possible ratios up to 7s if you want to find and/or filter the data yourself. In google spreadsheets, just select all -> go to "format" -> "conditional formatting" -> and make a rule to highlight the range of values you are looking for.

0to7s ratio.xlsx

 

tldr; Non-Pulsed Capacitor is always cheaper to build

 

Recap and Rules of the Grid

  • You cannot charge a battery with another battery. There must always be a producer of some kind to charge batteries and a consumer to drain them otherwise batteries will sit idle losing power over time or just not having power at all.
  • Batteries charge and drain in sync when being produced/consumed on the same line.
  • Battery Switching without filters leads to consumer leakage to backhaul.
  • You can produce as much power on any wire without overload. Go nuts with generators.
  • Transformers are both a consumer and a producer. A pulsed transformer will be 1/3 as efficient to a normal transformer running at 100% when pairing with battery switchers at 0.1s ON / 0.2s OFF pulses.
  • A transformer will only produce/consume on itself if you isolate it with switchers or another transformer.
  • Large transformers produce and consume up to 4000 J/s. Small transformers produce and consume up to 1000J/s.
  • Pulsing transformers do not inherently overload wires. Wires will only overload after they have accumulated enough overload time. Overloading needs a cooldown period of 95% of the uptime to prevent overload accumulation. This is any time greater than 6s or just 6.2s as each game tick is 0.2s
  • Pulsing 2 transformers on the same line that are not synced to the same clock will cause an overload. This also applies if you have a consumer leakage through when battery switching without filters.
  • Even if you see no visible damage when overloading because you perfectly hit the 6.2 second mark, Your wires will still break. Any Overload notification you get means your system is in fact overloaded. I found this out while stress testing the inverter.
  • Power shutoffs can make wires enter the red zone that will remember the longest overload time in the chain when recombining
  • Transformers have build Priority [Add piece on transformer build priority
  • Wires will overload in this order; Wire Bridge -> Wire -> Conductive Wire Bridge -> Conductive Wire -> Heavi-Watt Joint Plate -> Heavi Watt Wire -> Heavi Watt Conductive Joint Plate -> Heavi Watt Conductive Wire.

 

Quick checklist for overloads

  • Accidental Connections
  • Out of sync pulsing
  • Back feed leakage onto another another pulsing line
  • Constant draw on a wire not rated for that load
  • Check the draw on your transformers. You've either added too many consumers per transformer or too many transformers on a wire not rated for that load.
  • Are you giving your power shutoffs enough time to recover after hitting the red zone?
  • Where is it overloading? Check your wire bridges they get affected first.

 

 

 

 

image.png

Edited by BLACKBERREST3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...