A 9V battery is a fixed-voltage DC power source, commonly used as a standalone supply for breadboard prototypes without a bench power supply or USB power. In Open Maker Studio, it does not have Blockly code blocks — it interacts directly with the real-time SPICE analog simulator as a real voltage source.
1. Schematic Symbol
Battery symbol: the long line is the + side, the short line is the − side. A 9V battery has several cells inside, so it is drawn with more than one cell:
2. Characteristics
- Fixed 9V output: unlike the Bench Power Supply, this component has no adjustable voltage — it's a real
spice.V()voltage source fixed at 9V, plus a series internal resistance modeling real battery non-ideality (voltage sag under load). - Wiring: connect
+to VCC and−to GND on your circuit.
3. Component Properties (Property Inspector)
When you select a 9V Battery on the canvas, you can modify the following parameter in the Property Inspector panel:
- Internal Resistance (
internalResistance): Models the battery's real internal resistance — higher values cause more voltage sag under load.- Default:
1Ω - Range:
0.01Ω to50Ω (step size0.1Ω)
- Default:
4. Programming Notes
Batteries are purely passive-source components and have no associated Blockly blocks. A 9V battery only supplies power to the rest of your circuit — for example, powering an Arduino Uno through its barrel jack or VIN pin, separate from anything a board_analog_read block would read.
5. Simulator Behavior
- Real-time Current Readout: While a simulation is running, OMS renders a live text overlay directly on the battery body showing the current it's supplying (in mA), whenever it exceeds ~1µA.
- Short-Circuit Protection: drawing more than 3A triggers a real
SHORT_CIRCUITfault — recoloring the battery body reddish with a warning stripe, flagging "possible short circuit."

