yes, i've done exactly this. (DIY current transformer for monitoring AC mains)
I built mine as a system to monitor the current of every multiboard at a gaming lan.
We wanted to track power usage of everyones PC's. Just because we thought it might be fun, so we built a system with a DIY CT in every multiboard and cabled them to AVRs in lots of 10 (10 adc channels per AVR). All the AVRs linked together over differential SPI and to a PC to display the power usage per multiboard and total usage for the event.
For the CT's i used 2.7 meters of thin enameled wire wound around a 12mm toroid.
I didn't want to count the number of turns on each toroid as i wound them so i always used cut lengths of 2.7M of wire instead. I'm not sure exactly how many turns 2.7meters is, but it's a fair number ~200.
You need lots of turns for a CT to work. This next bit is wrong but.. think of it as a transformer and the voltage into the primary is the voltage drop across the short length of mains cable that passes through the CT. It's such a small voltage you need lots of turns on the secondary to get a good voltage output.
However, you probably wont need quite as many turns as i did if you just want to detect on/off.
The CTs i made were able to detect current with around 200-400mA accuracy between 0-7A.
Because the cores i used weren't designed for mains frequency the waveform got more distorted the more current there was. The waveform distortion was quite predictable so i was able to plot the values on a graph and work out an equation that more or less gave a reasonably accurate current reading from the CT voltage. The higher the current got the less of a change was seen in CT voltage so above ~7A the accuracy fell away quickly but it was still usable for what we designed it for.
Here's a pic the toroids i used on the left.
The right is one of the finished modules, A CT + load resistor + bypass cap + transistor amplifier.
I dipped the toroids in liquid insulation tape to seal them up and stop them unwinding.
Once you have your CT wound you need to put them across a load resistor.
With mine it was 1Ohm. This gave me around +/- 50mV across the 1R with 10A going through the CT.
A high value resistor will give you more voltage but i found the output was horrible above around 10R.
1R seemed to give the best waveform.
I used a single transistor with bypass capacitor to take the voltage across the CT load resistor and amplify it up to something a bit more usable. The output was now 12V +/- 2V (2V=10A). I then feed this through another bypass capacitor onto an ATMEGA ADC input. The input had a 10K resistor to GND and another to 5V VCC so it was at 2.5V with no current and moved up or down by 2V to represent the AC current signal from the CT.
I rectified the AC current signal in software to save me having to make a external precision rectifier from opamps for every CT i had.
It was much cheaper
and rectifying a signal in software is so much easier
Here's the circuit i used.
I think the component values are still correct, they look to be the same values as i used.