Vm110, Measuring voltage with analog input

Hi!
I have a 12V battery connected to two resistors and I want to measure the Voltage over one of them using the analog input on my K8055 card.
When i connect the A1 and GND to the resistor the shown Voltage in the demo program is too low. Also, when I do that, almost all the voltage is on the other resistor.

When the battery and resistors are running without the card connected everything works fine. I’ve measured everything using a Voltmeter.

I suspect that I’m not using the analog input correctly. Any help would be extremely apprieciated.

Maybe you have too high value resistor in series from the battery to A1. Please note that the input resistance between A1 and GND is about 100 kilo ohms. If you have e.g. 1 Mega ohm between the battery and A1 then you get only 1.09 V to the analog input of the K8055.

Thank you for the help. I’m using the resistans over A1 to GND now for measuring and it seems to be working so far.

Measuring the Voltage using the analog inputs works great when only the battery and the resistors are connected.
But when I connect a Battery Charger, the input value of the analog input jumps up and down. And not just a little fluctuation, it jump between 0 and 255, and everything in between.
Do you have any idea what might be causing this?

That is strange. - It seems that you are measuring the rectified waveform coming out from the battery charger. Is the battery connected to the charger when you measured the voltage? Adding a 1000uF electrolytic capacitor from A1 to GND may help a little…

Connected a capacitor from A1 to GND and now it’s working fine.
Thanks for all your help.