Hello. I am currently working on a simple robot project that uses a servomotor, a DC geared motor and a weird IR reciever.
The thing is near completion, but I still have one big worry on the electronic side: I would like to make the thing run on its own, without any cable. I currently have a 9V battery feeding my DC through an H-bridge, and I would like to know if it was safe to also run the battery in the arduino's Vin. (While I did hear that 9V batteries are short-lived, I will not take another one: this project is mostly experimental, I want to see it roll)
Also, the servo is currently powered through the arduino's 5V: is it that bad?
Supply a separate 5V supply using a regulator from the 9V for the servo as the current draw may be to much and shut down or damage the arduino
You can use the same 9V supply to power the Arduino
I think you mean a hobby servo, not a servomotor!!
Yes a small 9V battery is inadequate for motors/servos.
Yes powering a hobby servo through the Arduino 5V logic rail is bad.
Something like a 6V RC servo battery pack would be good for powering the servo and the DC motor.
What voltage is your DC motor? What motor driver/shield do you have? What current does the motor
use? What is this "weird IR reciever"? Details details details, everything is in the details.