The Arduino DUE runs at 3v3 and almost everything in the world runs at 5v. When driving for example an h-bridge chip that needs at least 5v to operate, can I use an opto isolator with the diode being driven by the 3v3 from the DUE and the other side switching a 5v supply? I need the superior speed and resources that a DUE has so using an UNO or MEGA will not work - simply not enough processing power to do all the kinematic calculations for a 6 axis arm. I also like the idea of isolating my DUE from the side that will probably be making blue smoke ;>} (32 PIC MCU's fried in my last attempt at this project) Thanks people.
Yes you can get voltage shifting and isolation using opto couplers.
Be warned that low cost couplers used in saturating mode, that is the 'obvious' way to use them to transmit logic signals, are fairly slow, a 10kHz waveform should go through, 100kHz won't. As long as you allow for this in your choice of PWM speeds, you should be OK.
They work much faster in non-saturating mode, but then you need a little more hardware around them.
You can get premium couplers that work to MHz or 10s of MHz, if you really need low latency.
If you don't need isolation, there are several ICs that will handle level translation, or use discrete transistors.
Note that if your project uses only low voltages (anything up to 12V can certainly be considered low), you don't really need optocouplers to isolate magic smoke failures. Connecting your arduino via MOSFETs offers reasonable protection from overvoltage on its pins, and adding resistors in series guarantees limited current.
Here's an example from this answer:
Of course, I don't imply that optocouplers are useless in low-voltage electronics. There are other reasons to use them, e.g. when you cannot connect grounds of different parts of the circuit together.