HemanTan
Posts: 3
Joined: Wed Jun 17, 2015 9:55 am

1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:02 am

Hi everyone i have been trying lately to use a raspberry pi to control a 1mhz oscillator on a raspberry pi :? but i don't have much ideas on how to make it work..
I have been creating a python tkInter gui for a nice controller layout. A computer controlled transmitter has been done before on a computer using a old 9 pin connector (http://sci-toys.com/scitoys/scitoys/com ... itter.html).. I think it would work on a respberry pi as well, with the GPIOs.
Any ideas/suggestions? i will keep working on it.. Scratch is a nice tool to do it on as well, I will try that.
Btw it is really cool, the transmitter uses morse code to transmit a message and another oscillator on another machine can recieve it and decipher it using a programm, so its like a text machine that works in range of about 8km.. if without too much interference. ;)

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:10 am

What do you mean by control an oscillator? You can use the clocks or PWM peripheral to generate 1MHz clocks on various gpios. What you can't easily do is modulate the signal.

HemanTan
Posts: 3
Joined: Wed Jun 17, 2015 9:55 am

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:14 am

Say how you can control a gpio pin and make it turn on/off, use the same thing when the oscillator is plugged into a specific pin on the gpio.. and code the on off to a morse code sequence(i can use a morse library on Python) and will it do its thing?
I dont know how to see the inputs work though.. It has a programm in windows that can control that thing but i cant run it on the pi.

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:18 am

Form that link it looks like it is using a simple 1MHz crystal module and switching it on and off using a serial port to generate morse tones. You could probably do that simply with any GPIO pin just by controlling the on and off times, but I don't know what sort of voltage and current the oscillator module needs. You might need a transistor between the GPIO and osc.

HemanTan
Posts: 3
Joined: Wed Jun 17, 2015 9:55 am

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:21 am

Yah thats what i thought as well.. I will look deeper into the power requirements. And the important thing is ive got lots of coding to do in order to make it work >_<

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 10:47 am

You can switch the 1MHz clock/PWM on and off in software. What bit rate are you considering? You can probably do around 10kbps with reasonable accuracy.

If you need greater speeds you might be able to AND the clock/PWM signal with a gpio signal using a logic chip. In that case you could use much higher bit rates as it is easier to control switching a gpio on/off rather than a clock/PWM on/off.

User avatar
davidcoton
Posts: 5026
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: 1MHz oscillator on GPIO!?

Wed Jun 17, 2015 12:54 pm

Be aware that transmitting a 1MHz radio signal, even at low power, will be antisocial and illegal in most countries, unless you have an appropriate licence (the 1MHz frequency is unlikely to be legally available for this purpose).
Signature retired

Return to “Advanced users”