Read out Hbridge output

Hello,

I want to do some stuff with DCC for my model railroad.
I have some decoders and I want to read out the voltage from there H bridge which is normally connected to the motor.

But is that possible? When the motor turns in the other direction, the power is supplied in the other way.

Cheers,
Dylan

Well, sorta.... Arduino can not handle voltage swings below 0 V. One of the functions (the main one) of a full H-Bridge is to reverse the voltage at the motor terminals. You can use various techniques (like sample a voltage ladder output that gas been offset to rais it beyond 0V) to try to get arround this, but is what you want to do worth the effort? What do you want to do with the readings?
Display the voltage applied to the motor (what good is that beyond forward or backward?) why not pick up one of those digital pannel voltage modules (cheap and easy, check out someplace like MPJones).
Display/indicate direction (polarity), output percentage? think about decoding the H-Bridge inputs and measuring pulse counts in (nice clean digital that Arduino can easily handle).

The problem is that I can't access the Hbridge input. The electronics are so small.
I am going to find out if it's possible for the Arduino to take over the task of that piece of electronics.

Cheers,
Dylan

H bridge which is normally connected to the motor.

Reading voltage on the HBridge pins that supply output power to the motor isn't a good thing to do with a Microcontroller without conditioning the signal because motor generates spikes in voltage ,its that type of supply which any IC would not like, so you may decouple it and divide the voltage (given the voltage is higher the logic level voltage used at that time on Arduino) and read the same on the ADC.
This is offcourse a suggestion and guidance you should however dig deep while actually doing this on your ATmega/Arduino.