Copilot

Welcome to the all-new Copilot

Use Copilot to brainstorm projects, search the library, place and connect components, and more. Click a prompt or write your own to get started. Learn More

Explain
Write Project Description
Find Issues
Test Plan
Flux Copilot Video TutorialPlay Video

CAN SUBLAYOUT
for U2 I need a analog pin that I can read up to 3v3 on

@copilot for U2 I need a analog pin that I can read up to 3v3 on
1y
For the STM32F103C8T6 microcontroller (U2), you can use any pin from PA0 to PA7 as they are all 12-bit, 1us Analog-to-Digital Converter (ADC) pins. These pins can read from 0 to 3.3V (VDDA).
Remember that you need to configure the pin as an ADC input in your firmware.
1y
can you use a 16Mhz crystal with the STM32F4X1CXU6 part?

@copilot https://www.st.com/resource/en/datasheet/stm32f446mc.pdf with this part can you use a external 16mhz crystal?
1y
I couldn't identify that component. Sorry!
1y
@copilot can you use a 16Mhz crystal with the STM32F4X1CXU6 part?
1y
I couldn't identify that component. Sorry!
1y
I couldn't identify that component. Sorry!
1y
6
P1 48v P2 GND for 48v

P1 48v P2 GND for 48v
1y
8
for U2 where is the reset pin wired to? Also does it need anything special to a...

@copilot for U2 where is the reset pin wired to? Also does it need anything special to auto reset after flashing?
1y
The reset pin of U2 (STM32F103C8T6 microcontroller) is wired to the RESET pin of the J1 connector according to the project's netlist.
In terms of auto-resetting after flashing, it depends on the flashing tool you are using. Some tools can control the reset line directly and will handle resetting the microcontroller after flashing. In other cases, you might need to manually reset the microcontroller.
For the STM32 series, you might need to connect the BOOT0 pin to a proper logic level (high or low) along with the reset to start the MCU in a specific boot mode.
Remember that the exact procedure can vary depending on the specific microcontroller and the development environment you are using. It's always a good idea to consult the datasheet and reference manual for the STM32F103C8T6 for specific details.
1y
4
I am going to change out X1 and use X2 instead. Can you tell me if the low capa...

is this the same as the Output Load Condition?
1y
@copilot I am going to change out X1 and use X2 instead. Can you tell me if the low capacitors are still correct? Meaning is C13 and C14 ok to be 18pF using the new X2 crystal?
1y
The load capacitance (CL) requirement of a crystal oscillator is a key specification and it is specific to each model of the crystal oscillator. The model change from X1 (X49SM8MSD2SC) to X2 (SG-8101CE 8.000000MHz TBGSA) will indeed likely affect the choice of load capacitors.
Unfortunately, the provided project description and the component notes do not include specific details on the required load capacitance for these two crystal oscillator models. Therefore, I cannot definitively say whether the 18pF capacitors C13 and C14 are still appropriate for the X2 (SG-8101CE 8.000000MHz TBGSA) crystal.
I recommend checking the datasheet or specification sheet of the X2 (SG-8101CE 8.000000MHz TBGSA) crystal to find the recommended or required load capacitance (usually denoted as CL). Once you know the required CL for the new crystal, you can calculate the correct load capacitors to use.
Generally, the capacitor values are determined by the formula CL = C1 * C2 / (C1 + C2) + Cstray. where C1 and C2 are the connected capacitors, and Cstray is the stray capacitance inherent in the PCB and oscillator circuit. However, these values are typically provided or can be calculated using information from the crystal's datasheet.
In conclusion, while 18pF capacitors might be fine, it is important to check the new crystal oscillator’s specifications to ensure compatibility.
1y
is this the same as the Output Load Condition?
1y
No, the Output Load Condition and the Crystal Load Capacitance are two different parameters related to different parts of an electronic system.
Output Load Condition generally refers to the condition or state of the load (the device or component that is being driven or powered by another electronic component) which is connected to the output of an electronic component.
On the other hand, Crystal Load Capacitance refers specifically to the capacitive load required by a crystal oscillator to function correctly as specified. It is an important parameter that helps determine the capacitors you should use with your crystal oscillator to ensure that the oscillator circuits resonate at the correct frequency.
So, if you're looking at a component's datasheet to find the correct capacitive load for a crystal oscillator, I suggest you look for terms like "Load Capacitance (CL)" rather than "Output Load Condition".
1y
The Output Load Condition and the crystal oscillator load capacitance (CL) are not the same.
The Output Load Condition usually refers to the maximum load that the output of an Integrated Circuit (IC), like a microcontroller or digital logic gate, can reliably drive. It is specified by the IC and can be found in its datasheet.
On the other hand, the crystal oscillator load capacitance (CL) is a characteristic of the crystal itself. It signifies the amount of capacitance the crystal requires to oscillate at its specified frequency. The CL is used to determine the correct capacitors to connect to the crystal in the oscillator circuit.
The output of a crystal oscillator is typically connected to a microcontroller or other IC, but the CL and output load condition are independent parameters relevant to the operation of the crystal oscillator and the IC, respectively.
1y
What about this oscillator? YXC OT2EL4C4JI-111OLP-8M Could this work instead?
1y
Based on your description, I believe that you are looking to replace the crystal oscillator in your circuit with a new one (YXC OT2EL4C4JI-111OLP-8M). However, without the detailed specifications or the data sheet of the proposed crystal oscillator, it's difficult to give a definitive answer.
Here are the general steps you should follow:
  1. Obtain the datasheet for the proposed crystal oscillator YXC OT2EL4C4JI-111OLP-8M.
  2. Check the oscillation frequency: The original crystal oscillator in your circuit operates at a frequency of 8 MHz, and this should match with the new one.
  3. Check the load capacitance requirement (CL): This parameter should be similar or if different, you may need to adjust the load capacitors in your circuit accordingly.
  4. Also check other parameters such as the operating temperature range, package type (to ensure it fits on your PCB), and drive level.
So, while the proposed crystal could potentially work as a replacement, it's necessary to go through these steps to ensure compatibility and correct operation in your design.
1y
all i can find is the output load that is 15pf is that right?
1y
Yes, in the context of crystal oscillators, the Output Load specification often refers to the required load capacitance (CL). If the datasheet for the YXC OT2EL4C4JI-111OLP-8M states that the Output Load is 15pF, then this is likely the correct load capacitance.
Given that, you might need to adjust the values of the capacitors currently in your circuit, C13 and C14 which are 18pF, to match this new requirement. The precise values of capacitors required can depend on various factors including stray capacitance that is present on the PCB traces and other components.
Please note that in addition to the load capacitance, there are other parameters in the datasheet you should verify to ensure that this crystal oscillator is suitable for your specific application, including the frequency (should be 8MHz according to your design), operating temperature range, drive level, and package type.
1y
7
what pins on the microcontroller should OSCIN and OSCOUT go to

@copilot what pins on the microcontroller should OSCIN and OSCOUT go to
1y
For the STM32F103C8T6 microcontroller (U2), the crystal oscillator pins are:
  • OSCIN should go to pin PC14
  • OSCOUT should go to pin PC15
1y
Does this design need the 32.768k and the 8Mhz Y1 to work?
1y
The need for the 32.768kHz and the 8MHz crystal oscillators in your design depends on the requirements of your application.
  • The 8MHz oscillator (Y1) provides the main clock frequency for the STM32 microcontroller (U2). If the microcontroller needs to operate at a frequency of 8MHz, then yes, this oscillator is necessary.
  • The 32.768kHz crystal (X1) is usually used for real-time clock (RTC) functions. If your application requires maintaining accurate time or date, then this crystal is necessary.
However, if your application does not require a real-time clock and you can tolerate the less precise internal RC oscillator for the main clock, you could potentially eliminate both crystals. You would need to make sure to modify the clock initialization routines in your firmware accordingly.
For precise, timing-critical applications, external oscillators are generally recommended due to their higher accuracy over the internal RC oscillator.
1y
if I wanted to use both what pins to they go to on U2?
1y
For the STM32F103C8T6 microcontroller (U2), the pins for the crystal oscillators are as follows:
  • The 8MHz oscillator (Y1) should connect to pins PA0 (OSCIN) and PA1 (OSCOUT).
  • The 32.768kHz crystal (X1) should connect to pins PC14 (OSCIN) and PC15 (OSCOUT).
Please note that you may also need to add decoupling capacitors (C6, C7 for X1 and C8 for Y1 in your design) between each crystal pin and ground, depending on the specific crystal's requirements.
1y
Is PA0 and PA1 a dual use pin? Meaning we can use them for adc if we are not using crystals?
1y
Yes, PA0 and PA1 on the STM32F103C8T6 microcontroller are indeed dual-use pins. If you are not using them for an external oscillator, they can be used for other functionalities such as ADC inputs.
Specifically:
  • PA0 can be used as an ADC12_IN0 input for the ADC1/ADC2.
  • PA1 can be used as an ADC12_IN1 input for the ADC1/ADC2.
Remember, you need to properly configure these pins in your microcontroller's firmware to use them as ADC inputs.
1y
if using them for crystals how do you set the firmware to use them as crystals?
1y
To use PA0 and PA1 for external crystals in the STM32F103C8T6 microcontroller, you need to configure the microcontroller's clock source options in the firmware. The specific steps can vary depending on the software environment and libraries you are using.
Here's a general approach if you are using STM32CubeIDE and HAL (Hardware Abstraction Layer) library:
  1. Open the STM32CubeMX software or the STM32CubeIDE which has STM32CubeMX integrated.
  2. Select your specific microcontroller model (STM32F103C8T6).
  3. Go to the "Clock Configuration" tab.
  4. Select HSE (High-Speed External) as the clock source and ensure the frequency matches your crystal (8 MHz).
  5. Configure the PLL (Phase-Locked Loop) settings if you want to run the microcontroller at a frequency different from the crystal frequency.
  6. If you're using the RTC (Real-Time Clock), select "RTC Clock Mux" as "LSE" and ensure that the LSE (Low-Speed External) frequency matches your low-speed crystal (typically 32.768 kHz).
  7. Save these settings. The software will generate initialization code that you can use in your firmware. This code sets up the RCC (Reset and Clock Control) module in the microcontroller to use the external crystals.
Please note that PA0 and PA1 are generally not used for crystal oscillator connections in STM32F103C8T6. The pins for the main crystal oscillator are usually PC14 and PC15 (for the 32.768 kHz RTC crystal) and PF0 and PF1 (for the main high-speed crystal). PA0 and PA1 are usually used for other functionalities like ADC, GPIO, timers, etc. Make sure to verify the correct pins for your specific microcontroller and board layout.
1y
This cpu does not have PF1 or PF0
1y
I apologize for the confusion. You are correct. The STM32F103C8T6 microcontroller does not have PF0 and PF1 pins.
The 8 MHz High Speed External (HSE) oscillator pins are:
  • OSC_IN which is on pin PC14
  • OSC_OUT which is on pin PC15
The 32.768 kHz Low Speed External (LSE) oscillator for RTC, if used, is connected on the same pins PC14 and PC15. The microcontroller internally switches between HSE and LSE when necessary based on the Clock configuration in firmware.
PA0 and PA1 are typically not used for crystal oscillators. My previous response was incorrect, and I apologize for any confusion caused. Thank you for your patience and for pointing out the error.
1y
I think this is wrong. Perhaps its PD0 and PD1? Which is oscin and ouit?
1y
I apologize for the confusion in previous responses. You're correct. For the STM32F103C8T6 microcontroller:
  • The High-Speed External (HSE) oscillator pins are:
    • OSC_IN on pin PD0
    • OSC_OUT on pin PD1
The Low-Speed External (LSE) oscillator pins generally used for a 32.768 kHz crystal for RTC functions are on the same pins PD0 and PD1. The microcontroller internally switches between HSE and LSE based on the clock configuration in the firmware.
Remember to configure these settings correctly in your firmware to ensure proper operation.
1y
5
L1
Inductance
2.2u H
LED1
PGND
BOOT Selector Mode
GND
Note 3
Line 1
RB Resistor Selection
Line 2
3.3v - R1 33.2k, R2 10k
Line 3
5v - R1 54.9k, R2 10k
R2
Resistance
220 Ω
12V
RESET
CANBUS INPUT
R1
Resistance
220 Ω
BOOT1
3V3
R12
Resistance
110 Ω
GND
3V3
ANALOG PINS
Line 1
PA0~PA7 are all 0~3v3 12bit ADCs
3V3
R15
Resistance
33.2k Ω
PGND
CONTACTOR
RESET
PRECHARGE
LED4
LED_VAL2
GND
3V3
VOLTAGE_SENSE
Note 4
Line 1
20 to 68 uF
LED_VAL1
GND
R5
Resistance
10k Ω
GND
LED_VAL1
48V
R7
Resistance
390 Ω
3V3
CANTX
12V
Note 2
Line 1
3v3 @ 1A
R9
Resistance
10k Ω
LED_VAL4
R10
Resistance
10k Ω
GND
VOLTAGE_SENSE
LED_VAL2
LED3
GND
PGND
J4
LED2
KEY_INPUT
R13
Resistance
10k Ω
J3
MOTOR+
RESET
3V3
LED_VAL4
3V3
CANTX
R8
Resistance
10k Ω
Logic Key
Line 1
When 12V is high,
Line 2
TTL is low
GND
RESET CIRCUIT
CONTACTOR_SW
3V3
Out to Motor Controller
CANRX
CONTACTOR
12V
SWCLK
R21
Resistance
390k Ω
J5
3V3
LED_VAL5
Decoupling Caps
Current Monitoring Section
48V
PGND
R16
Resistance
1k Ω
confirmed
confirmed
CONTACTOR CIRCUIT
BOOT0
Key Switch Input
Line 1
48V comes into P1 which goes though the opto anode then back to p2 (-48v gnd) from the cathode. This will drive the START_TTL_IN low
CONTACTOR_SW
CANRX
LED_VAL3
LED5
GND
LED_VAL3
GND
12V
R4
Resistance
110 Ω
R6
Resistance
220 Ω
PRECHARGE
GND
PGND
PGND
CL Calculations
Line 1
(CX+strayC)/2
Line 2
(39pf + 5)/2=22pf
BOOT1
GND
R17
Resistance
1k Ω
confirmed
confirmed
R14
Resistance
10k Ω
48V
R3
Resistance
220 Ω
R7 is a power resistor
GND
SWCLK
GND
R20
Resistance
10k Ω
My Logic
Line 1
Q2 should start conducting which would allow for Q1 to switch 48V into IP+ pin. This will come out IP- pin on the current monitor (u3). If Q2 does not conduct it should make Q1 open as well and no current should be conducting through Q1.
BOOT0
GND
R19
Resistance
4.7k Ω
MOTOR+
SWDIO
Minimal Design Schematic
Line 1
http://www.haoyuelectronics.com/Attachment/STM32F103C8T6-DEV-BOARD/STM32F103C8T6-DEV-BOARD-SCH.pdf
SWD Interface
GND
SWDIO
START_TTL_IN
GND
GND
GND
GND
LED_VAL5
R11
Resistance
220 Ω
Y2
C6
Capacitance
.1u F
C2
Capacitance
1u F
C4
Capacitance
.1u F
C1
Capacitance
10u F
C12
Capacitance
.1u F
J6
C3
Capacitance
.1u F
C9
Capacitance
10u F
CONTACTOR
IC1
Manufacturer Part Number
TPS561208DDCR
C8
Capacitance
.1u F
C11
Capacitance
22u F
C7
Capacitance
22u F
J2
C13
Capacitance
22p F
C14
Capacitance
22p F
Q4
End of Life
C5
Capacitance
.1u F
Q3
J1
U1
Not Recommended for New Designs
Part Type
Sensor
Manufacturer Part Number
ACS70331EOLCTR-005U3
C10
Capacitance
10u F
D1
U2
Manufacturer Part Number
STM32F103C8T6
Q5
Q2
Q1


  • Terminal
    Terminal
    An electrical connector acting as reusable interface to a conductor and creating a point where external circuits can be connected.
  • Ground
    A common return path for electric current. Commonly known as ground.
  • Net Portal
    A net identifier used to create connectivity to other Net Portal with the same designator. #portal
  • Power Net Portal
    Power net portal is a special schematic object used to define a power or ground net. Power ports allow you to conveniently indicate a power net at any location in the design. Power nets of the same designator automatically connect throughout your design #portal #power
  • Generic Resistor
    A generic fixed resistor for rapid developing circuit topology. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard resistor values: 1.0Ω 10Ω 100Ω 1.0kΩ 10kΩ 100kΩ 1.0MΩ 1.1Ω 11Ω 110Ω 1.1kΩ 11kΩ 110kΩ 1.1MΩ 1.2Ω 12Ω 120Ω 1.2kΩ 12kΩ 120kΩ 1.2MΩ 1.3Ω 13Ω 130Ω 1.3kΩ 13kΩ 130kΩ 1.3MΩ 1.5Ω 15Ω 150Ω 1.5kΩ 15kΩ 150kΩ 1.5MΩ 1.6Ω 16Ω 160Ω 1.6kΩ 16kΩ 160kΩ 1.6MΩ 1.8Ω 18Ω 180Ω 1.8KΩ 18kΩ 180kΩ 1.8MΩ 2.0Ω 20Ω 200Ω 2.0kΩ 20kΩ 200kΩ 2.0MΩ 2.2Ω 22Ω 220Ω 2.2kΩ 22kΩ 220kΩ 2.2MΩ 2.4Ω 24Ω 240Ω 2.4kΩ 24kΩ 240kΩ 2.4MΩ 2.7Ω 27Ω 270Ω 2.7kΩ 27kΩ 270kΩ 2.7MΩ 3.0Ω 30Ω 300Ω 3.0KΩ 30KΩ 300KΩ 3.0MΩ 3.3Ω 33Ω 330Ω 3.3kΩ 33kΩ 330kΩ 3.3MΩ 3.6Ω 36Ω 360Ω 3.6kΩ 36kΩ 360kΩ 3.6MΩ 3.9Ω 39Ω 390Ω 3.9kΩ 39kΩ 390kΩ 3.9MΩ 4.3Ω 43Ω 430Ω 4.3kΩ 43KΩ 430KΩ 4.3MΩ 4.7Ω 47Ω 470Ω 4.7kΩ 47kΩ 470kΩ 4.7MΩ 5.1Ω 51Ω 510Ω 5.1kΩ 51kΩ 510kΩ 5.1MΩ 5.6Ω 56Ω 560Ω 5.6kΩ 56kΩ 560kΩ 5.6MΩ 6.2Ω 62Ω 620Ω 6.2kΩ 62KΩ 620KΩ 6.2MΩ 6.8Ω 68Ω 680Ω 6.8kΩ 68kΩ 680kΩ 6.8MΩ 7.5Ω 75Ω 750Ω 7.5kΩ 75kΩ 750kΩ 7.5MΩ 8.2Ω 82Ω 820Ω 8.2kΩ 82kΩ 820kΩ 8.2MΩ 9.1Ω 91Ω 910Ω 9.1kΩ 91kΩ 910kΩ 9.1MΩ #generics #CommonPartsLibrary
  • Generic Capacitor
    A generic fixed capacitor for rapid developing circuit topology. Save precious design time by seamlessly add more information to this part (value, footprint, etc.) as it becomes available. Standard capacitor values: 1.0pF 10pF 100pF 1000pF 0.01uF 0.1uF 1.0uF 10uF 100uF 1000uF 10,000uF 1.1pF 11pF 110pF 1100pF 1.2pF 12pF 120pF 1200pF 1.3pF 13pF 130pF 1300pF 1.5pF 15pF 150pF 1500pF 0.015uF 0.15uF 1.5uF 15uF 150uF 1500uF 1.6pF 16pF 160pF 1600pF 1.8pF 18pF 180pF 1800pF 2.0pF 20pF 200pF 2000pF 2.2pF 22pF 20pF 2200pF 0.022uF 0.22uF 2.2uF 22uF 220uF 2200uF 2.4pF 24pF 240pF 2400pF 2.7pF 27pF 270pF 2700pF 3.0pF 30pF 300pF 3000pF 3.3pF 33pF 330pF 3300pF 0.033uF 0.33uF 3.3uF 33uF 330uF 3300uF 3.6pF 36pF 360pF 3600pF 3.9pF 39pF 390pF 3900pF 4.3pF 43pF 430pF 4300pF 4.7pF 47pF 470pF 4700pF 0.047uF 0.47uF 4.7uF 47uF 470uF 4700uF 5.1pF 51pF 510pF 5100pF 5.6pF 56pF 560pF 5600pF 6.2pF 62pF 620pF 6200pF 6.8pF 68pF 680pF 6800pF 0.068uF 0.68uF 6.8uF 68uF 680uF 6800uF 7.5pF 75pF 750pF 7500pF 8.2pF 82pF 820pF 8200pF 9.1pF 91pF 910pF 9100pF #generics #CommonPartsLibrary
  • Generic Inductor
    A generic fixed inductor for rapid developing circuit topology. *You can now change the footprint and 3D model at the top level anytime you want. This is the power of #generics
  • RMCF0805JT47K0
    47 kOhms ±5% 0.125W, 1/8W Chip Resistor 0805 (2012 Metric) Automotive AEC-Q200 Thick Film #forLedBlink
  • 875105359001
    10uF Capacitor Aluminum Polymer 20% 16V SMD 5x5.3mm #forLedBlink #commonpartslibrary #capacitor #aluminumpolymer #radialcan
  • CTL1206FYW1T
    Yellow 595nm LED Indication - Discrete 1.7V 1206 (3216 Metric) #forLedBlink

Inspect

current_limiter

current_limiter
Description

Created
Last updated by ril3y
3 Contributor(s)
ril3y
vasy_skral
support

Controls

Properties

Availability & Pricing

DistributorQty 1
Digi-Key$8.59–$11.98
LCSC$4.59–$5.94
Mouser$12.50–$12.96

Assets

    Simulation

    µs

    Simulation Speed