Jump to content

Recommended Posts

Posted

Hi all,

I'm interested if anyone has actually done any teaching or programming using a Raspberry Pi and if so could reccomend or share instruction sheets, books or resources?

 

Raspberrypi.org only seems to have a tutorial to install the os then write a hello world type program in python.

 

Thanks

Jona

Posted
Scratch runs on the pi and there are resources out there for it.

 

I think its pointless, why not install it on a desktop?

Posted
I think its pointless, why not install it on a desktop?

 

The OP was asking about programming on a Pi. I suggested a way of doing it.

 

Its a debian system so you can take your pick of languages - it's just a question of finding ones that children will pick up easily.

Posted
Look for some stuff using pygame that might be a good start. I'm going to be doing some programming using the GPIO this weekend hopefully, if all my stuff arrives in time!
Posted

Just fiddling with the GPIO myself, got some LED's working on it, now time to experiment:cool:

Just a word of warning, the GPIO pins connect directly to the cpu with no protection, so make doubly sure you've got your circuit right!

 

Anyway, eLinux seem to be a good starting place for tutorials etc on the Pi- RPi Tutorials - eLinux.org

Posted
Just a word of warning, the GPIO pins connect directly to the cpu with no protection, so make doubly sure you've got your circuit right!

 

Any idea how to go about getting the GPIO pins to drive a relay? If I understand correctly, most relays need 5v to operate them, but the Raspberry Pi can only provide 3.3v and would be damaged by trying to provide 5v. Any idea how I go about using the Raspberry Pi to control a relay so I can switch motors / solenoids / etc on/off?

Posted
Any idea how to go about getting the GPIO pins to drive a relay? If I understand correctly, most relays need 5v to operate them, but the Raspberry Pi can only provide 3.3v and would be damaged by trying to provide 5v. Any idea how I go about using the Raspberry Pi to control a relay so I can switch motors / solenoids / etc on/off?

 

You're best using a daughter board like the Gert board or similar. I've got one a Pi Face Digital I/O on back order - Buy Pi-Face DIgital IO Interface for Raspberry Pi, there are a few others about to come on the market as well, so that will drive prices down. I personally don't have the electronics skills to make my own board to do this, or to figure out how to do it safely directly from the Pi, it's a bit of a new adventure for me, trying to recall O Level electronics from 27 years ago is a bit foggy to say the least lol.

  • Thanks 1
Posted
Any idea how to go about getting the GPIO pins to drive a relay? If I understand correctly, most relays need 5v to operate them, but the Raspberry Pi can only provide 3.3v and would be damaged by trying to provide 5v. Any idea how I go about using the Raspberry Pi to control a relay so I can switch motors / solenoids / etc on/off?

 

I could draw the circuit on a piece of paper in about a minute, but instead will try to explain it...

 

To protect the raspi, I would use an opto-isolated transistor like the venerable 4N25 - this means that anything bad that happens on the other side of the opto can't hurt the raspi.

 

I would then use a transistor (or even 2, depends how much current the relay needs) to drive the relay coil. Not forgetting a reverse biassed diode across the coil to protect against voltage spikes when it is switched off.

 

Failing that, I suspect interface boards will be 2 a penny in a month or twos time.

  • Thanks 1
Posted
What a resource!! Good find. I'll be hidden away furious typing in code for the rest of the day if anyone wants me :nerd:

 

Its bordering on addictive, maybe should come with a government health warning

 

Caution, use with care, may cause addiction and may lower your social interaction to dangerous levels. Ensure you go the pub at least once a week to remind yourself what other people look and sound like.

  • Thanks 1
Posted
Any idea how to go about getting the GPIO pins to drive a relay? If I understand correctly, most relays need 5v to operate them, but the Raspberry Pi can only provide 3.3v and would be damaged by trying to provide 5v. Any idea how I go about using the Raspberry Pi to control a relay so I can switch motors / solenoids / etc on/off?

 

You can use a 'Darlington Transistor' (actually a pair of transistors) AND a diode to prevent any issues with back EMF. The Darlington handles the switching - you feed it the output from the pin and it will switch a higher load, in this case a relay. Once a relay has been triggered, the coil is 'charged' and then the switching current is switched off, the coil will dump it's energy into the circuit as "Back EMF". The Diode will only allow current to flow one way, so will prevent a surge going back to the input (possibly causing the Darlington to re-trigger).

 

The PicAxe manual on basic circuit interfacing might be a very useful resource. There should be no difference interfacing to output pins on the PI.

  • Thanks 1
  • 2 months later...
Posted (edited)
Any idea how to go about getting the GPIO pins to drive a relay?

 

Start with a few transistors they switch with .5v but can handle much more on the other side enough for a relay definitely. i know its a pain but its the best way from going pin to relay. the transistor its self may be able to drive much of what your after, without the need for a relay.

Edited by januttall

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...