How to amplify outputs to 9 volts

I am working on a project that requires 9 volt control lines that I was hoping to use an arduino uno for. In other words, instead of a logical 1 equaling 5V, my hope is to make the arduino output 9V for a logical 1.

The control lines are unidirectional, so it seems like it should be relatively simple. There are also some 9V inputs that need to be handled, which I will use a simple voltage divider to read.

My first thought was to use an OP amp to multiply the arduino's output voltage. I've heard that these don't work well for digital applications though. Another constraint is that I only have the arduino's 5V supply and a 9 volt battery for power sources, so that is somewhat limiting.

I picked up a couple LM339 comparators that I was hoping to use, but it appears that they require an 18 or 36 volt source, which is not available in this application.

Does anyone have some suggestions on how I should proceed with this project? Any help is greatly appreciated, thanks in advance.

One way to do it is a pull-up resistor that will bias the output to +9V and an NPN transistor controlled by the Arduino that will drag the output to Ground when turned on. The logic will be inverted (LOW=9V, HIGH=0V). The pull-up should be something like 10K Ohms. There should also be a resistor between the Arduino pin and the Base of the transistor to limit Base current. Make that one about 200 Ohms.

Make that one about 200 Ohms.

21mA base current - too much for ~1mA collector current… I would go with ~2kOhms min when not talking ~ns switching times… Maybe another 2k from base to gnd to speed the stuff up (and maintain transistor’s state when arduino’s pin floats).