Using L9110 (or HG7881) with external power supply
Why the Arduino is not getting fried? I Guess the resistor has something to do with it but what is the reason for that?


The answer is that the L9110 is designed for this purpose. The OA and OB pins are inputs and don't pass the 12 V supply back to the micro-controller. The datasheet states the inputs are 


  TTL / CMOS output level compatible, and can be
  directly connected to the CPU;


The second table on the datasheet shows:

Test conditions： Vcc =9V , Iout =750mA
Symbol Parameters     minimum      Typical     maximum     units
VHin Input high       2.5          5.0         9.0         V
VLin Input low        0            0.5         0.7         V


The micro-controller output just has to be &lt; 0.5 V when low and > 2.5 V when high to guarantee correct operation.

The resistors don't have anything to do with the logic control signal from the micro. They are there to provide a weak pull-up on the signals out to the next stage - typically the stepper driver amplifier.


  Is there a better design?


This one is fine. It should do what it says.