//This example code shows how to use Flux's API (https://docs.flux.ai/reference/api-overview) to add an LED simulator model to a part.
//It also changes the symbol to signal schematic users when the LED is turned on and when it's turned off based on simulator data.
//You can find this part in use in the Astable multivibrator example in your profile.
//Assigning the object ID of the terminals in the schematic editor to two variables
const anodeTerminalId = "63b04c1b-436c-3804-2af5-f29f2e88399c"; // Anode terminal ID
const cathodeTerminalId = "e5f77de8-474b-cc14-8e87-78778e0da1c6"; // Cathode terminal ID
//Get terminal objects by ID.
const anodeTerminal = flux.getNodeById(anodeTerminalId, "elementTerminal");
const cathodeTerminal = flux.getNodeById(cathodeTerminalId, "elementTerminal");
//Create the output nodes that will be visible to users in the simulator tab on the schematic
const outputVoltage = flux.createOutputNode("vout");
const inputVoltage = flux.createOutputNode("vin");
const current = flux.createOutputNode("I");
const voltageDrop = flux.createOutputNode("vdrop");
//Setting up basic parameters of an LED. You can modify these parameters and see how the simulation changes when you put it in a project
const seriesResistance = 0.42;
const emissionCoefficient = 3.73;
const saturationCurrent = 93.2e-12;
dtrain6284
copilot
-
Capacitors:
- C1: 0.01µF, correct.
- C2: 2.2µF, correct.
- C3: 20µF, correct.
-
Resistors:
- R1: 330Ω, correct.
- R2: 100kΩ, correct.
- R3: 33kΩ, correct.
- R4: 8.2kΩ, correct.
- R5: 10kΩ (trimmer potentiometer), correct.
- R7: 1kΩ (another trimmer potentiometer), correct.
-
Transistors:
- Q1 and Q2: Both BC108B, correct.
-
Connectors:
- J1 and J2: SMA-J-P-H-ST-EM1, correct.
2. Component Connections Power and Ground Connections-
Power:
- V1:ANODE is correctly connected to Net 2 alongside R1:P1 and R3:P1.
-
Ground:
- GND is consistently connected to various components (e.g., J2:3, Q1:E).
Other Important Connections-
R1 and R3 Connections:
- Connect R1:P1 to R3:P1 and V1:ANODE.
-
R2, Q1:B, and C2:+ Connected to Net 7:
- Connect R2:P1 to Q1:B, C2:+.
-
R4 Connection Check:
- Ensure Connect R4:P2 to Q2:C.
Switches- S1 and S2:
- Connections seem okay given S1:COM to J2:2 (Net 14).
- Connections in Net 11 and Net 9 also okay.
3. Missing/Grounded Components and Miscellaneous- Ensure Pinsnamed"GND" are properly referenced and connected.
- Unspecified components (MPNs) like S1, S2, R2 should be checked for sourcing or specified manually for accurate BOM.
Summarydtrain6284
copilot
-
Transistors:
- Q1 and Q2: NPN transistors like BC108B.
-
Resistors:
- R1: 33kΩ (Bias resistor).
- R2: 100kΩ (Collector resistor for Q1).
- R3: 330Ω (Emitter resistor for Q2).
- R4: 8.2kΩ (Collector resistor for Q2).
- R5: 10kΩ (Variable resistor/potentiometer for output level).
-
Capacitors:
- C1: 20µF (Input coupling capacitor).
- C2: 2.2µF (Output coupling capacitor).
- C3: 10µF (Emitter bypass capacitor).
-
Power Supply:
- V1: 9V battery.
Connections in the Original Fuzz Face Input Stage-
Connect the input jack to C1.
-
Connect one side of C1 to the base of Q1.
- Also, connect a bias network (e.g., 33kΩ resistor to ground) to this point.
Transistor Q1- Connect the collector of Q1 to R2 (100kΩ), which then connects to V1:ANODE (9V).
- Connect the emitter of Q1 to the base of Q2 directly (this forms the transistor pair).
Transistor Q2- Connect the collector of Q2 to R4 (8.2kΩ), which then connects to V1:ANODE (9V).
- Connect the emitter of Q2 to ground via R3 (330Ω).
Output Stage-
Connect a coupling capacitor C2 (2.2µF) from the collector of Q2 to C2:-.
-
From this coupling point, connect to the "wiper" of the output potentiometer (variable resistor R5:2).
-
One side of the output potentiometer R5:1 to space.
-
The other side R5:3 should be connected to ground.
-
Connect the output jack to the wiper and ground.
Updated Connections for Your Project- Connect J1:1 to C1:P1 (assuming J1 is the input jack).
- Connect C1:P2 to R2:P1, Q1:B, and to R3:P1 (Bias resistor).
2. Transistor Q1:- Connect R2:P2 to Q1:C.
- Connect Q1:C also to Q2:B (Directly as a transistor pair).
- Connect Q1:E to ground.
3. Transistor Q2:- Connect R4:P2 to Q2:C, and then to R7:2.
- Connect R7:3 (Next stage Q2 collector) to V1:ANODE (9V).
- Connect Q2:E to R1:P2 and ground (Emitter resistor).
4. Output Stage:- Connect J1:1 (Input jack) to C1:P1.
- Connect C1:P2 to Q1:B, R3:P1 (Bias network), and R2:P1 (100kΩ).
- Connect R2:P2 to Q1:C.
- Connect Q1:E to ground.
Inter-Transistor Connection:- Connect Q1:C to Q2:B.
- Connect Q2:E to R1:P2 and ground.
Output and Feedback: