what you're interested in is creepage and clearance distances. Creepage basically is the separation distance of copper traces. Clearance on the other hand is the air gap separation of leads/conductive surfaces.
From the linked page:
Typically, most standards are based on conditions being pollution degree 2 and overvoltage category II. It is important to note that as working voltage, pollution degree, overvoltage category, and altitude increase, the creepage and clearance distances also increase. The altitude is particularly important when testing to EN 61010.
Using the data from table IV, if we choose a working voltage of 125VAC, pollution degree 2, and material group IIIa or IIIb ther is a minimum of 1.5mm
creepage required.
Clearance is calculated using the peak voltage, for 120VAC that's ~170Vdc. this table has the appropriate air-gap clearance requirements. Assuming peak voltage of 210Vdc, that means we will need at least a 2mm
clearance.
Personally I like having a comfortable safety margin, so at the minimum I would probably go with 3mm creepage and 4mm clearance, with more being better.
There are a few other circuit protection devices you can add to your system to prevent spikes such as Metal Oxide Varistors (MOVs), Transient voltage suppression diodes, circuit breakers/fuses, etc.
Another route you can take is adding a physical barrier between devices, either by filling with an appropriately rated dielectric material (known as potting) or using a physical non-conductive shield.
This article has some other good high-voltage PCB design suggestions. Granted, they are generally catering for operations in KV's, but it does get you thinking about some of the potential problems and possible solutions when dealing with higher power PCB circuits.
If the device is properly earthed then use a fuse. This is the tried and tested way. Proper earthing is important but if this cannot be achieved then an RCD doesn't cost very much. To be honest I'd be thinking of a low voltage heater that wouldn't be regarded as a health hazard - maybe 50V or thereabouts. Cost should not influence safety unreasonably and a 1kW AC to DC converter isn't beyond the reach of most folk.
Having said that, if you are considering an isolation transformer, then surely one can be foundf that isolates and drops the voltage to something reasonably safe.
Best Answer
The Phidget board that you refer to has digital outputs only.
The voltage-controlled dimmer has an optically-isolated analog input, which takes 0-10V on the non-mains side and generates an analog signal on the hot-side (the side connected to the mains) which is read by the dimmer board micro and used to control the dimmer.
The main point is that your USB board (and whatever circuitry you intend to use to control the optoisolator current) must only be connected to the photodiode (non-hot side of the optocoupler). If you try and interface it directly to the dimmer micro, plug the circuit into the mains then plug a computer into the USB port, you're going to have a catastrophic failure on your hands (since you'll be introducing an earth connection to the primary circuitry) or worse, end up electrocuting someone.
You must make sure that inside your plastic box, no part of your Phidget USB board is located near the mains areas of the dimmer board. In North America, depending on the voltages involved and the exact standard, 4 to 8mm spacing is fairly common.
Use wires with 600V insulation rating to connect between the Phidget and the optoisolator, in case they happen to come near any of the mains circuitry along their travels.