Skip to content

Instantly share code, notes, and snippets.

@h0ffy
Last active March 28, 2025 07:33
Show Gist options
  • Save h0ffy/c8ec935f279508e1674394f6602d399f to your computer and use it in GitHub Desktop.
Save h0ffy/c8ec935f279508e1674394f6602d399f to your computer and use it in GitHub Desktop.
JFet Read With Arduino
          10kΩ  
  +12V/24V ───/\/\/───┬── Drenaje (D)  
                        │  
                      (JFET)  
                        │  
       10kΩ             ┴── Fuente (S) ─── GND  
   A0 ───/\/\/───┬  
        47kΩ     │  
         │       │  
         GND     GND  
void setup() {
    Serial.begin(9600);
}

void loop() {
    int rdata = analogRead(A0);  // Leer voltaje en D-S
    float volt = rdata * (5.0 / 1023.0);
    Serial.print("Voltaje D-S: ");
    Serial.println(volt);
    delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment