Chat
Welcome to Flux
Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More
Python
import matplotlib.pyplot as plt # Components and their power consumptions in mW components_power = { "RP2040": 120, # Assuming 40 MHz operation at typical voltage "LoRa-E5": 111, # Assuming operation current at 868MHz transmitter mode "SD Card": 60, # Approximate power consumption for SD card writes "MEMS Microphone": 1.08, # SPH0645LM4H-B typical consumption "RT8059": 0.3, # Quiescent current "LEDs": 120, # Assuming 6 LEDs at 20mA each with 2V forward voltage "Other ICs": 10, # Placeholder for other small ICs "Resistors and passives": 5, # Placeholder for passive components } # Supply voltage in V voltage = 3.3 # Calculating power consumption total_power_mW = sum(components_power.values()) # Calculate percentage for the donut chart components_percentage = {k: (v / total_power_mW) * 100 for k, v in components_power.items()} # Plotting the donut chart fig, ax = plt.subplots(figsize=(8, 8), subplot_kw=dict(aspect="equal")) wedges, texts, autotexts = ax.pie(components_percentage.values(), labels=components_percentage.keys(), autopct='%1.1f%%', shadow=True, startangle=140, wedgeprops=dict(width=0.3)) # Decoration plt.setp(autotexts, size=10, weight="bold") ax.set_title("Power Consumption of Major Components") # Display the plot plt.show()

Image
Reviews
Code Interpreter Playground: AvocAudio: A tinyML community board
Properties
LoRaWAN
Scientific
RoHS
3.3
Buttons
Microphone, Temperature sensor, Humidity sensor
SD Card
Audio
Pricing & Availability
Distributor | Qty 1 |
|---|---|
Arrow | $2.21–$3.25 |
Digi-Key | $13.68–$17.52 |
LCSC | $35.47–$36.71 |
Mouser | $17.30–$17.51 |
Verical | $2.78–$4.02 |
Controls
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.
nico
copilot