Strom Input auslesen

  • Hallo.


    Ich hab 2 Fragen: Gibt ein Steckernetzteil zu GPIO Konverter? Oder sowas in der Art?
    und wie kann man den Strom Input auslesen? Also wenn ich per GPIO Strom reinkriege soll er lesen wieviel das ist? gpio read eventuell?


    So at hoc würde ich sagen... gar nicht.
    Wenn ein GPIO als Input gesetzt ist wird ein Level gemessen, und kein Strom.
    ~< 1,2V gilt als "low" also 0. ~>2,6V gilt als "high" also 1.
    Deswegen ist der Input sehr hochohmig

    gruß root

    Einmal editiert, zuletzt von root (27. Mai 2015 um 16:12)

  • Hallo root,

    sorry, dass ich Deine Zahlen korrigieren muss:
    LOW: < 0,8 V
    HIGH: > 1,3 V

    Hallo The OverClocker.

    Du hast die Möglichkeit, über einen bekannten Widerstand eine Spannung abfallen zu lassen. Die abfallende Spannung hängt vom Strom ab. Die abfallende Spannung kannst Du über einen A/D-Wandler wie den MCP3208 CI/P durch Anwendung eines SPI-Protokolles auslesen.

    Über U=RI, I = U/R kannst Du den Strom berechnen (U gemessen, R bekannt).

    Suchfunktion mit den Stichworten

    Code
    Raspberry Pi MC 3208 SPI


    führt ich zu einem Beitrag von mir inkl. Software zum Auslesen des MCP3208 CI/P .

    Anstelle MCP3208 funktionieren auch folgende A/D-Wandler MCP3204 CI/P , MCP3202 CI/P , MCP3008 CI/P , MCP3004 CI/P , MCP3002 CI/P .


    Beste Grüße

    Andreas

    Ich bin wirklich nicht darauf aus, Microsoft zu zerstören. Das wird nur ein völlig unbeabsichtigter Nebeneffekt sein.
    Linus Torvalds - "Vater" von Linux

    Linux is like a wigwam, no windows, no gates, but with an apache inside dancing samba, very hungry eating a yacc, a gnu and a bison.

    Einmal editiert, zuletzt von Andreas (27. Mai 2015 um 16:42)

  • Hi.


    sorry, dass ich Deine Zahlen korrigieren muss:
    LOW: < 0,8 V
    HIGH: > 1,3 V

    ...accepted...:) ...
    wobei mich mal eines interessieren würde.
    Lt. Schema (Anhang) ist der Eingang grob gesehen ein Schmitt-trigger mit einer offensichtlich einstellbaren Hysterese.
    Wo und wie stellt man die ein ?
    Bisher nichts gefunden

    gruß root

    //Nachtrag:
    ...man muss halt an der richtigen Stelle suchen :blush:

    Zitat

    There are a few notable features of the circuit:
    The input gate detects whether the input voltage level is low or high by comparing it to a threshold voltage. Normally the voltage threshold is about 1.8V, but it isn't guaranteed; it can be anywhere between the maximum input low and minimum input high, that is, between about 0.8 and 2.0V.
    To provide noise immunity and prevent chatter on transitions, you can configure the input gate to act as a Schmitt trigger, with input hysteresis. With hysteresis there are different threshold voltages for rising and falling transitions. Broadcom doesn't specify the degree of hysteresis, but Table 1 offers some representative values from other ARM1176-based devices. For a better understanding of how it works, you can read our more detailed description of input pin hysteresis for the Freescale 9S12/HCS12 MCU. That description pertains to a different processor, but the operation is the same.

Jetzt mitmachen!

Du hast noch kein Benutzerkonto auf unserer Seite? Registriere dich kostenlos und nimm an unserer Community teil!