Skip to main content

VoltKit: A Python toolkit for electrical and electronics engineering

Project description

⚡ VoltKit — The Open Toolkit for Electrical & Electronics Engineering

VoltKit is an open-source Python library designed to make electrical and electronics engineering more practical, visual, and beginner-friendly.

From Ohm's Law to Phasor Diagrams, from FFTs to Streamlit-powered simulations — VoltKit helps students, educators, and makers bring theoretical concepts to life using code.


🚀 Why VoltKit?

Electrical engineering is filled with complex formulas and repetitive calculations. VoltKit simplifies this by:

  • Providing clean and tested Python functions for core EE concepts
  • Offering ready-made simulators and calculators
  • Including beautiful interactive visualizations using Streamlit
  • Helping students build real projects, faster

🧩 Features (So Far)

Version Highlights
v0.1 Ohm’s Law, Series & Parallel Resistors, RLC impedance
v0.2 AC Power: Real, Reactive, Apparent, Power Factor
v0.3 Signal generation (sine, square, triangle, DC)
v0.4 Filters (Low-pass, High-pass), Bode Plots
v0.5 FFT Analysis, RC Step Response
v1.0 Phasor Math, RL/RC/RLC Phasor Diagrams, Time-domain Signal Generator

⚙️ Installation

Clone the repo and install in development mode:

git clone https://github.com/ShobhitBhardwaj763/voltkit.git
cd voltkit
pip install -e .

🧪 Usage Examples

Ohm's Law

from voltkit.core import voltage, resistance, current
# voltage(i,r)
# resistance(v,i)
# current(v,r)
v = voltage(2, 5)           # 10 volts
r = resistance(10,2)       # 5 ohms
i = current(10,5)          # 2 amps

RLC Impedance

from voltkit.core import resistor, inductor, capacitor
z_r = resistor(100)                     # 100 Ω
z_l = inductor(10e-3, freq=1000)       # 62.8j Ω
z_c = capacitor(1e-6, freq=1000)       # -159.1j Ω

Phasor Diagram for RL Circuit

from voltkit.core import plot_rl_phasor_diagram
plot_rl_phasor_diagram(R=10, L=0.1, I=1, f=50)

Generate a Sine Wave

from voltkit.core import sine_wave
t, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)

To Plot the sin wave

from voltkit.core import sine_wave
import matplotlib.pyplot as plt
t, y = sine_wave(freq=50, duration=1, sample_rate=1000, amp=5)

plt.figure(figsize=(12, 8))
plt.plot(t, y, label='Sine Wave')
plt.ylabel('Voltage (V)')
plt.legend()
plt.grid()
plt.show()

🖥️ Interactive Streamlit Apps

VoltKit also includes pre-built apps for learning and visualizing concepts. Run them like this:

streamlit run voltkit/streamlit_ui/signal_generator_app.py

(If not work, then open Command Prompt and use this method)

cd voltkit
streamlit run voltkit/streamlit_ui/signal_generator_app.py

Available Apps:

  • signal_generator_app.py
  • bode_simulator_app.py
  • fft_explorer_app.py
  • rc_visualizer_app.py
  • phasor_visualizer_app.py
  • phasor_diagram_visualizer_app.py

Example files to understand

  • basic_usage.py
  • signal_genrator.py
  • rc_response.py
  • power_analysis.py
  • phasor_diagram_example.py
  • plot_bode_rlc.py
  • phasor_demo.py
  • lowpass_filter_demo.py
  • fft_analysis.py
  • ac_vs_dc_example.py

To run example files, use this method

python examples/example_file_name.py

Who Is It For?

  • Students learning EE/ECE fundamentals
  • Teachers building visual classroom demos
  • Makers building small projects and simulations

🤝 Contributing

Want to contribute or request a feature?

  • Submit a PR or open an issue
  • Reach me directly at: voltkit.dev@gmail.com

📜 License

This project is licensed under the MIT License.


VoltKit was started with one goal:
To empower electrical engineers to learn and build faster with Python.
If this helped you, feel free to ⭐ star the repo or share it with your peers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

voltkit-1.0.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

voltkit-1.0.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file voltkit-1.0.0.tar.gz.

File metadata

  • Download URL: voltkit-1.0.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for voltkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c37dbbdd0cae024de03b06d7e72364daf998ab3cf9f249d54353f405f9116e0e
MD5 0896ddfd3b08bbd53a5e0b37ba963ee9
BLAKE2b-256 1f4d1affecd95c6fd0d990e20e1ee0debdf159c1bce32942da07e5adf5fe3451

See more details on using hashes here.

File details

Details for the file voltkit-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: voltkit-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for voltkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 102e708cf9646e2c043a5696d597d40a5bb7afa2a9409a774452882a014d43f7
MD5 0f14c29f238cb8c0088d51403fde0393
BLAKE2b-256 0f3b1684c1efcd277d12037195c59e9eb151a5bc6a947439eb310d0025323c4a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page