Transmit data through induction?

vttom

Senior Member
I'm looking for a way to wirelessly transfer serial data over a very short distance. By very short I mean ~2mm. Basically, I want to mod an existing product by sticking a PICAXE inside the plastic case, and want to get data from it without having to drill a hole in the case for an electrical connector.

Now, I know all about those 433MHz TX/RX modules, but they top out at 4800baud. I'd like to transfer data at more like 38400baud.

So... seeing as how the distance is so short, I was wondering if I could simply use induction. Hook a coil of wire to the serial data source (OK, maybe not directly, but using a transistor to drive a decent amount of current into it). And then on the outside, have another coil of wire that will pick up, through induction, the switching activity on the transmitting coil. I can physically press the receiving coil right up against the outside of the case, so the only thing separating the 2 coils would be about 2mm of plastic.

I was also thinking of using capacitance. Substitute metallic plates for coils and you've got capacitive rather than inductive coupling.

Has anyone on this forum tried something like this?
 

jglenn

Senior Member
Of course it is possible. Decades ago I helped work on a gas meter reading system here in Ohio, it is now on a half a million houses or more. A little module reads the needle of the gas meter, a switch actually, a custom chip an lithium batt stores the data. On the outside of the house is a coil in a housing.

The meter reader places a read coil next to it, and gets the data. It will work thru a half inch of ice. This system saves the gas co lots of money, because before, the readers had to get into the basement where the meters are, but the people may not be home. Now they have radio links, my gas meter has one, even though it is outside, they can read from the street.

The coil system was 2 way, a transceiver. It is essentially an aircore transformer. You may be familiar with pulse transformers used to isolate data streams, not much different. Expect to do a fair amount of experimentation to get it to work! :eek:
 

moxhamj

New Member
This is a fascinating subject and one that I'm thinking about at the moment. There are two types of problems - sending serial data between picaxes, and sending programming serial data. This latter is a bit more complex, mainly because the baud rate is a bit higher.

The simplest answer is raw serial data. Manuka has cracked this one with the deceptively simple technique of sending lots of 'U' 01010101 characters before the actual data. Then you can get away with a few characters that are biased with more 1s than 0s or vice versa.

This may well work with induction too. You have a coil and you have a second coil. The volts on the second coil are not referenced to ground - they are an AC signal. But if you bias that AC signal to 50% with a series of 01010101, then you can detect positive and negative transitions after that point. You probably would need some amplification and this might need some op-amps. And I suspect a lot of experimentation on a breadboard with a CRO.

Then there is the more generic "transmit anything" circuit. ie, you put zero on the input and zero comes out the output. This is a modem and if it is possible to get one working, you could do downloads (ie the break signal) as well as data transfers, and it would have applications for RF, infrared and induction.

How low can the carrier frequency go compared with the baud rate? Sure, you can run infrared at 38khz and send data at 1200hz. But can the carrier rate be as low as the baud rate?

Well, I think that might be possible, which could mean that the download baud rate comes within the range of RF modules. Plus it means that one can transmit at the maximum data rate for that piece of hardware.

I've been thinking about Manchester Coding http://en.wikipedia.org/wiki/Manchester_code

Where this has direct applications is with ethernet, as ethernet is inductively coupled. There is no DC component, so the first design criteria for any code is the number of 1 and 0 has to be equal. This is rather similar to the induction problem posed above.

I'm pondering two circuits. This first is a purely digital design and would need to run at machine code speeds. So perhaps forget that for the moment.

The second uses a D flip flop and an XOR gate to generate the biphase signal from a clock and a data input. Decoding is a bit more complex, but I think it can be done with a couple of very short one-shot timers, an XOR gate, an OR gate and a 4046 phase lock look chip. Lock the PLL by sending a L for a while, which is a series of 1 to 0 transitions. This locks both the frequency and the phase. Then once the phase is locked, sample at 1/4 of the period, after the transition. The 4046 could be used with a divide by 4 counter to generate the right timing point to sample the signal.

This is a bit of a crazy idea. But I've got the cmos chips on order so I think worth breadboarding.

One data protocol that could be very easily implemented is SPI. Clock and data in. And with a PLL you can reconstruct the clock signal and so have clock and data out. But the intermediate data has the same number of 0 and 1 bits, so that makes the datastream perfect for a wide range of AC transmission systems - wireless, audio, induction, light, infrared etc.

Another nice thing about this protocol is that there is no set baud speed. All you need to do is send an initial L which both locks the frequency and the phase. The 4046 can track over a wide range of frequencies with its VCO.

Maybe it might have picaxe applications. The downside is you do need quite a few discrete logic chips (though they are all 25c ones, so the total circuit might still come in less than a single picaxe chip).

Having said all that, if you just want to send one byte, I'd use serin and serout, and use lots of Us at the beginning, then 'ABC', then send the byte and then send its inverse and use that as the checksum. Then the problem is a lot simpler. Just detect the AC signal in a coil. Reference it to 2.5V and just feed the signal into a 1/4 of a LM324, and you should get a digital signal on the output which can go straight into a picaxe. Clamp the receiver coil with diodes so it can't go >5V or <0V.

Hmm- even simpler experiment (which might zap a chip but worth a shot). Reciever coil with one end to the +ve of a 741 and the other end to the -ve. (Mabye 2 clamp diodes on each of those input pins!!). On the +ve transition you get a High output and on the -ve a Low output. I think a 741 can drive a picaxe directly.
 
Last edited:

boriz

Senior Member
I wonder what would happen if you just connect a IR LED to the serial out, and an IR phototransistor to the serial in. Over such short distances, it's essentially the same as using an opto-isolator. It would simplify things a great deal.
 

hippy

Ex-Staff (retired)
It certainly seems possible and here's one paper discussing the technique -

http://america.renesas.com/media/company_info/news_and_events/mcu_promo/ESC-320_Johnson_Paper.pdf

Alternatively, you could consider it a simpler [sic] task of re-designing a 433MHz RF pair to handle over 2400 baud.

Are there any other connectors already fitted which have a spare pin which could be used ? Or the signal could perhaps be super-imposed on an existing signal.

At 38400 baud you are looking at a bit time of 26us and that's close to carrier modulation of many IR LED's so that is an option as boriz suggests though does mean drilling a hole to poke that through.

As you are receiving from the box it's probably a simpler proposition than doing it the other way round. It doesn't matter how 'nasty' the signal is coming out as long as it is representative of the data being transmitted. All the effort will be in decoding the signal. I've no idea if a PICAXE could do that or how much additonal electronics you'd need.

Best solution perhaps depends on how many you need to modify. If it's just the one it would probably be easier to modify the case to add a connector. For a few, XBee may be best. It's going to have to be decision based on cost, effort and time spent on R&D.
 

tiscando

Senior Member
I've successfully transmitted serial data via an induction coil on a multi-part VCR video head at baud n4800.
 

vttom

Senior Member
Well, after reading this discussion I'm encouraged enough to try out the coil-to-coil induction method. I'll concentrate on 2 approaches:

1) OOK (I think that's the right acronym). In a nutshell, I would have an oscillator running at, say 100kHz, and then gate that with my RS232-like waveform. Presence of the 100kHz carrier="mark", absence="space". Should be easy enough to sort out at the receiving end using a peak-detector.

2) Feed the 38400baud RS232-like waveform directly into the coil. At the receiving end, I'll probably just see positive-going or negative-going transients every time there is a rising or falling edge of the waveform. I'd probably need little more than a set/reset latch to re-construct the original RS232-like waveform.
 

jglenn

Senior Member
If you want to go fast, you need good techniques. Going slow is easier.

This can get complex. We used manchester bi-phase L coding for MILSTD-1553 transmission at 1MHZ bit rate, the drivers and receivers are not simple.

With a transformer, you can send a + going pulse or a - going pulse. One could be a 1, the other a 0. All you need is a filter and comparator at the receiver.

Or you could send 2 different frequencies, filter them, one represents a 1, the other a 0. There could be some kind of "start pulse, that is longer than the others, that gets the receiver ready.

If you want to get wild, send 10 different frequencies, representing 0-9 decimal. But you will need too many filters. Serial is a drag sometimes. :mad:
 

boriz

Senior Member
I just had idea (while in the bath) for using inductive coupling for comms:

Use the native IR TX system to drive an NPN transistor with the TX coil as it’s collector load.

On the RX side, drive a high efficiency IR LED directly from the coil. Place the IR LED very close to a standard IR receiver/demodulator. Use native IR RX system on the RX Picaxe.

Could work...
 

boriz

Senior Member
EEK. I just re-read the spec. No chance this would be fast enough. Still, might work for someone.
 

gengis

New Member
It may be silly but wouldn't it just be possible to build a free running TTL gate style oscillator then just toggle data through by turning it off and on with a nand gate to the output transistor to your coil, then your pickup coil would just need circuitry to demodulate it back to a data signal. (crystal radio - diode and small capacitor)
 

boriz

Senior Member
Not silly. Good idea in fact. And you should be able to get it to work upto the maximum possible speed of the Picaxe.
 
Top