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

Explain project
Write a project description
Find schematic issues
Create a test plan
Simulate a circuit
Prepare for Manufacturing
Component Selection Workflow
New Subsystem Wizard
Write I2C initialization code
Generate firmware skeleton
max ADC voltage is nominally 1100mV but can be as low as 1000mV source

max ADC voltage is nominally 1100mV but can be as low as 1000mV source
2y
Someone is typing...
6
The ADC on the ESP32-C3 needs a 100nF external cap and has a max sample rate of ...

The ADC on the ESP32-C3 needs a 100nF external cap and has a max sample rate of 100kbps. Therefore we should set a filter on the current monitor amplifier at about 150kHz.
Image

Image

https://storage.googleapis.com/flux-comment-files/files/commentFileId-f07e729e9d08dd8edd9945111b88eecd21627ef71fa8b94b83eee073f8fd9f7d.png?GoogleAccessId=graviton-mvp%40appspot.gserviceaccount.com&Expires=4861792932&Signature=oMSxDGVClaay%2BDZgTRMucB1ZIE5mJB%2B7hJjxta%2BnSA3eOJtTlVQA3j1h3F%2FKyeCH4UDZ7WNmlZY22f0gYCbCxVhucIA19jLUkbipSr8HA04B9PvW3PWVfcsQxcJhLTxQ%2FSe5S263c0cQ2Z8sWCP5Bs%2BCDhZqPENZJ1tECvv1QniHml6FFKT3I5h98Y1IN54OIsVDXxwTa%2BkLli10TJj49ObkuE2ttroiMDPEn8o8tuDuut4YTAr%2Blgh%2BdkUJzCWCE6on8Z3RnpcaZo2MFV0NxywBn%2BlaLAaKoM83KF2WtkhEGQv1C3udjWE0Z71YXx1K2%2F5DlSQLJDVOTqWr47C0xA%3D%3D
2y
Someone is typing...
4
I don't want my ADC voltage to exceed 1.1V. Is there anything I should watch out...

@copilot I don't want my ADC voltage to exceed 1.1V. Is there anything I should watch out for when adding a zener diode in parallel to the ADC?
2y
When adding a Zener diode in parallel to the ADC input to limit the voltage to 1.1V, here are some considerations to ensure your circuit functions correctly without damaging the ADC or the Zener diode:
  1. Zener Voltage Selection:
    • Ensure the Zener diode's breakdown voltage is precisely 1.1V to match your ADC's voltage limitation.
  2. Current Limiting Resistor:
    • Place a current limiting resistor in series with the Zener diode. This resistor will protect the ADC input by limiting the current through the Zener diode when the breakdown voltage is reached. The value of this resistor can be determined using Ohm’s Law: R=VINVZIZR = \frac{V_{IN} - V_{Z}}{I_{Z}} where (V_{IN}) is the maximum input voltage expected, (V_{Z}) is the Zener voltage (1.1V), and (I_{Z}) is the desired current through the Zener diode when in breakdown. The current value should be kept low to protect the ADC and ensure low power consumption, but it also must be high enough to keep the Zener diode in its breakdown region when needed. A typical value could be tens to hundreds of microamperes.
  3. Power Dissipation:
    • Choose a Zener diode with adequate power dissipation capacity. Ensure the Zener diode can handle the power dissipated due to the voltage clamp without overheating. The power can be calculated by (P = V_{Z} \times I_{Z}).
  4. Leakage Current:
    • Be aware of the leakage current of the Zener diode at voltages below its breakdown voltage. Even if small, this leakage current can introduce errors in the ADC reading, especially for high impedance sources.
  5. Capacitive Loading:
    • Zener diodes have capacitance that can vary with voltage. This capacitive effect can introduce a delay in the response time of the voltage clamp and may affect high-speed signals.
  6. Protection from Transients:
    • For added protection against high-energy transients, consider adding a series resistor (if not already calculated for current limiting) or a transient voltage suppression (TVS) diode in addition to the Zener diode.
Given these considerations, your circuit connection for adding a Zener diode to limit the ADC input voltage could be formatted as follows:
  • Connect a resistor (current limiting) in series with the ADC signal line. For instance, if assuming a maximum input voltage of 3.3V and you desire 100µA through the Zener when clamping, and the Zener voltage is 1.1V: R=3.3V1.1V100µA=22kΩR = \frac{3.3V - 1.1V}{100µA} = 22kΩ
  • Connect one end of this resistor to your signal source, and the other end to the ADC input pin and to the anode of the Zener diode.
  • Connect the cathode of the Zener diode to ground. This will clamp the voltage at the ADC input to approximately 1.1V.
Adapting this to the net and components in your project, we may presume the Zener diode's function is to protect the ESP32_ADC1_CH0 input. The specific connections depend on your circuit’s maximum input voltage and other parameters. Remember to account for the Zener diode's characteristics and ensure it matches your voltage clamp needs.
2y
Someone is typing...
8
nSleep is internally pulled down

PH1 and PH2 are also internally pulled down
2y
nSleep is internally pulled down
2y
Someone is typing...
2
I want to size a shunt resistor. I expect a maximum current draw of 100mA and I ...

@copilot I want to size a shunt resistor. I expect a maximum current draw of 100mA and I want a 1V signal on my ADC. Note that I also have an amplifier with 20V/V of gain.
2y
To size the shunt resistor for your requirement, we need to calculate the resistance value that generates a 1V output across it with a maximum current draw of 100mA. Since you have an amplifier with a gain of (20,V/V), the voltage across the resistor, before amplification, should be (1V / 20 = 0.05V) to achieve a 1V signal at the ADC input after amplification.
Given Ohm's law (V = IR), we can rearrange it to solve for (R) as (R = V / I). Substituting the values, we have:
[R = \frac{0.05V}{100mA} = \frac{0.05V}{0.1A} = 0.5,\Omega]
Therefore, you should use a shunt resistor of (0.5,\Omega). However, note that standard resistor values may not exactly match (0.5,\Omega), and you might need to choose the closest available value or use a combination of resistors to achieve the desired resistance. Also, consider the power rating of the resistor:
[P = I^2R = (0.1A)^2 \times 0.5,\Omega = 0.01A^2 \times 0.5,\Omega = 0.005W]
A (0.25W) resistor would typically be sufficient, providing a safety margin. Always double-check the resistor's power rating to ensure it can safely dissipate the heat generated by the current flow.
2y
Someone is typing...
7
20V/V linear gain for the 193 https://storage.googleapis.com/flux-comment-files...

20V/V linear gain for the 193
Image

Image

https://storage.googleapis.com/flux-comment-files/files/commentFileId-3e48b45d222e196f8a8045a38b7e9ec792654cada3e403f02582162159513aa1.png?GoogleAccessId=graviton-mvp%40appspot.gserviceaccount.com&Expires=4861792329&Signature=HLTnMWhZOSH2ZAzURr0aSG0Nxfh4Y4r2biwj8oOOCsfr5peBy2XA5I00WZhDsKF0BuDJ4MIFS3pEbL%2BtJYlsg5uHfNXghwsWSOTVdbqkTMccEN17QSHU1HIEC4%2BDb99p6pdDQ%2BAHHnPpqXYRaVpgQsXu7znqn%2Be2rSgAbqvJyUusI1RjqwGpK77jCsHK3N7DvhPnvIjFCXySPYsrTbjnO29EkBR3dIT0ifodiBQzAjoem%2BB68IEXVHArHYwZflX%2F3BLSPouFGS1dZF5IK0dhz%2Fhjz1Ew82YJ9WjWvaybgtoRfQdx2MTWd%2FHpAcLIZMwchT9%2FO%2BcWz6zWnmrgevi3Mw%3D%3D
2y
Someone is typing...
3
I want to build a filter for my current amplifier. Here is the equation given by...

By the way, here's the reference design
Image

Image

https://storage.googleapis.com/flux-comment-files/files/commentFileId-ec0c56aace1db1ae22220ee1436611971d24292359d94d1c70c63b62b1d0e65a.png?GoogleAccessId=graviton-mvp%40appspot.gserviceaccount.com&Expires=4861793395&Signature=htghcGL2eXhPrmSUAJiLzZfdOm6vm1YP8FWt61iuswGaJIECZwqY9ANnucI4JPCWRT3Bv28tjJh9yghwHv%2FyYyLhZWrc8ztvy6Yfj%2BVSn2W2sPr1haPFkbnyg%2Bp78d%2B8F9W%2BVngeQWF2BOYk0fuF9EGJnFR8NTmM7qp6cmIp0wyyURofWnkmzswA6L4sOnyAErQEFegdb53BjvsfBp5nBucgB8EnB0EnSBmZhU62oeX%2BHCpjdE4O9gk0Ys%2BGcjAf7Dva3bgz4jHQy2PEfHdK%2BKUE2N1tkTd1pov9SqsuOwF7uwIEJw1L8rLG6RPUoX4qoEkneRMZBpybkw9SF9AXVA%3D%3D
2y
@copilot I want to build a filter for my current amplifier. Here is the equation given by the datasheet. I want a 3dB cutoff frequency of 150kHz. Keep RFilt under 100 Ohms. Please suggest some values for Cfilt and Rfilt
Image

Image

https://storage.googleapis.com/flux-comment-files/files/commentFileId-0160afc94170b75aa1b862b7ad21f424483bdd8e02aedda2a17b17a17ec7a315.png?GoogleAccessId=graviton-mvp%40appspot.gserviceaccount.com&Expires=4861793107&Signature=KEVHjxA%2BaLz%2B9BZ1JrD8gHEDg0brviCSijgLBcYUxOA1DvKo6eBGeS60ugeRwBbIq6NNGFIweqYlcH0Htw5LQm1NCJrVovxRNISf%2FHuEBC4Ee8ayPEe78rYIJL0o5Wc%2FhIxW3JTONZMrj%2F95NgGkG%2B28I8moDZRYvNCh%2BP7zjUk8QefSKILPfh3K5mUAhf7Gc%2BcHTA5L%2BficeHSURy4NJ8AFEY4PkcJ%2BcUUS3ZVCKMo2ojz8HW8QobMah7s9P2mCOXL06sKwbcSdFDg%2BlXZJsJQQRz1FfzkK8VMyKkvSuAoI0LRV3fQ6YBow2I47sd3FbwV0vfeZhxzN3gWJgIn%2B1A%3D%3D
2y
To design a filter with a 3dB cutoff frequency of 150 kHz, we will use the given equation:
f3dB=12π(2RFILT)CFILTf_{3dB} = \frac{1}{2\pi (2 R_{FILT}) C_{FILT}}
To solve for (C_{FILT}), we can rearrange the formula to:
CFILT=12π(2RFILT)f3dBC_{FILT} = \frac{1}{2\pi (2 R_{FILT}) f_{3dB}}
You've requested that (R_{FILT}) be under 100 Ohms. Let's try with (R_{FILT} = 100 \Omega) (the maximum allowed value based on your constraint) and plug it into the equation along with the desired frequency:
CFILT=12π(2100Ω)150kHzC_{FILT} = \frac{1}{2\pi \cdot (2 \cdot 100 \Omega) \cdot 150 \text{kHz}}
Now calculate the value of (C_{FILT}):
CFILT=12π200Ω150×103HzC_{FILT} = \frac{1}{2\pi \cdot 200 \Omega \cdot 150 \times 10^3 \text{Hz}} CFILT12π200150×103C_{FILT} \approx \frac{1}{2\pi \cdot 200 \cdot 150 \times 10^3} CFILT1188495559HzC_{FILT} \approx \frac{1}{188495559 \text{Hz}} CFILT5.305164769729844×109FC_{FILT} \approx 5.305164769729844 \times 10^{-9} \text{F} CFILT5.3nFC_{FILT} \approx 5.3 \text{nF}
Therefore, you can use (R_{FILT} = 100 \Omega) and (C_{FILT} \approx 5.3 \text{nF}).
Standard capacitor values near 5.3 nF are 5.1 nF or 5.6 nF. You can choose the closest standard value or adjust (R_{FILT}) slightly if you require an exact 150 kHz cutoff. Keep in mind that real-world components have tolerances and the environment can affect the circuit's behavior, so you may need to fine-tune the values accordingly.
2y
change Rfilt to 50 ohms
2y
With ( R_{FILT} = 50 \Omega ), let's calculate ( C_{FILT} ) using the same cutoff frequency ( f_{3dB} ) of 150 kHz:
CFILT=12π(2RFILT)f3dBC_{FILT} = \frac{1}{2\pi (2 R_{FILT}) f_{3dB}}
Plugging in the values:
CFILT=12π(250Ω)150×103HzC_{FILT} = \frac{1}{2\pi \cdot (2 \cdot 50 \Omega) \cdot 150 \times 10^3 \text{Hz}} CFILT=12π100150×103C_{FILT} = \frac{1}{2\pi \cdot 100 \cdot 150 \times 10^3} CFILT=12π15×106C_{FILT} = \frac{1}{2\pi \cdot 15 \times 10^6} CFILT1.061033e9FC_{FILT} \approx 1.061033e-9 \text{F} CFILT1.06nFC_{FILT} \approx 1.06 \text{nF}
Choosing the nearest standard capacitor value, you can use a ( C_{FILT} ) of 1 nF (or 1.0 nF). Again, remember that component tolerances and environmental factors might necessitate some adjustment to these values for precision.
2y
Someone is typing...
5
H-Bridge-EN
H-Bridge-PH1
H-Bridge-PH2
H-Bridge-PH1
+10V
C4
Capacitance
0.1uF
+3.3V
R4
Resistance
50 Ω


Universal Electronic Derailleur V1

Universal Electronic Derailleur V1 thumbnail
NOTICE: This board has a incorrectly sized battery holder. If building this revision, also build the adaptor board
Cable Index Shifting Electronic Derailleur. The first version just uses a linear actuator because I suck at ME design. I imagine it would be pretty easy to build a reeling one with positional feedback.

Pricing & Availability

Distributor

Qty 1

LCSC

$0.62

Controls