V_in on graph ?



  • Hi

    There is a way for showing V_in on graph ?
    This allow to monitoring voltage drop.

    It is possible with some gcode ?



  • @dc42 if I use thermistor3 (pin 35) with a voltage divider :

    V_IN |---- |47K|---|thermistor3 pin|----|4K7|-----|GND

    with M305 P104 S"V_IN" X3 it should work ?

    edit : I have 2.6v on ADC with V_IN 24V, so I need to tune the two resistors in order to have a 1/10 ratio between V_IN and ADC input voltage.

    How do a x10 value on DWC graph for this channel ?



  • @pipersw
    Nice approach to a solution 🙂
    You need to use the thermistor (or thermocouple?) temperature tuning model to give you (say) 250C == 25V, this would give a sensible reading in the graph. I'm not sure you can have the graph display Volts without changing DWC etc. But having a 'temp/10 = my voltage' graph might work for you.

    Next point, Your resistors are probably fine. You need to divide Vin by eleven to get the thermistor3 voltage, not ten. I made the same mistake initially monitoring a boat battery from a ATTiny here. Don't forget that the 4K7 resistor is part of the divider too, so the overall resistance is 51K7 (eg 4K7+47K).
    You can do a fine-tune on the M305 settings to correct for this.



  • @EasyTarget The thermistor is a NTC, so the resistance value fall if temperature rise, so the adc voltage fall.
    Here if V_IN rise the adc voltage rise too, it's the opposite behavior of a thermistor.

    V_IN |---- |33K|---|thermistor3 pin|----|5k|-----|GND

    with M305 P104 S"V_IN" X3 R33000 T5000



  • @pipersw Yep, this is true. I hadn't checked the M305 section and kinda assumed it had some sort of linear voltage based temp sensor support amongst it's many options. My bad, a quick glance over that says (to me, at least) that this is a no-go. Pity.


  • administrators

    @pipersw said in V_in on graph ?:

    @dc42 if I use thermistor3 (pin 35) with a voltage divider :

    V_IN |---- |47K|---|thermistor3 pin|----|4K7|-----|GND

    with M305 P104 S"V_IN" X3 it should work ?

    edit : I have 2.6v on ADC with V_IN 24V, so I need to tune the two resistors in order to have a 1/10 ratio between V_IN and ADC input voltage.

    How do a x10 value on DWC graph for this channel ?

    Try using the "Linear analog sensor" type instead of thermistor.



  • @dc42 said in V_in on graph ?:

    Linear analog sensor

    Thanks !
    So I have to upgrade my Duet2Wifi to RepRapFirmware 3 in order to have this functionnality.



  • @EasyTarget said in V_in on graph ?:

    I'm not sure you can have the graph display Volts without changing DWC etc.

    That should already be working by adding the unit in square brackets at the end of the sensor name

    M308 S5 ... A"V_IN[V]"
    

Log in to reply