Pages: [1]   Go Down
Author Topic: Interface with Raspberry Pi  (Read 2870 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 42
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It looks like the Raspberry Pi and the Arduino complement each other very well.  Has anyone defined the 'best' way to connect the two ?  Is there scope for a topic in the Playground ?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no best way, the best way depends on the problem to be solved. Sometimes a connection over the UART is best, sometimes it's I2C or maybe SPI, in some cases connecting a few GPIOs is much better.
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2702
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do some searches for firmata.
It allows a host to manipulate the Arduino pins as well as read their inputs.
There are packages/libraries out there for languages like python as well as a few others
to make it quite easy.

When using firmata you can connect to the Pi using USB so you don't have to mess with
any connections to the i/o connector or have any 3v worries.

If you want to go the Firmata route, the Teensy (http://www.pjrc.com/teensy/)  makes
a great external i/o interface for the Pi since it uses native USB which is fast and
won't suffer character loss like the standard Arduinos which use a USB to serial chip.

--- bill
Logged

Denver, CO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I want to have a raspberry pi run a webserver with php to and communicate to the arduino via usb. I have the arduino powering some tlc5940 driver chips and they are powered by an ATX power supply.

I am not able to use the usb serial monitor to my laptop when it is powered by the atx power supply (seperate grounds i'm assuming). Will I have any issues if the usb is plugged into the PI, like it does with my laptop?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Describe the wiring of your Arduino, I guess there has the problem to be located. Usually the serial monitor should work even if it's powered externally. You cannot expect the serial connection to work with the PI if it won't work with your laptop.
Logged

Denver, CO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The TLC5940's and arduino are powered off a computer power supply. Whenever I introduce the usb just as a serial monitor everything shuts down, if I unplug it ever thing comes back on. I'm assuming it is because of introducing an additional ground to the circuit.
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5145
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The TLC5940's and arduino are powered off a computer power supply.

That computer power supply probably delivers 5V and 12V. Which one are you using and to which connector do you have it connected? That's what I mean by wiring: describe every wire going to or from the Arduino. Tell us which pin/connector you use on the Arduino and where it goes to. Connecting multiple grounds usually isn't a problem. So it must be somewhere else.
Logged

Denver, CO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Circuit taken from here http://arduino.cc/forum/index.php/topic,17106.0.html tlc's are powered by the 5v. V1 is also 5v. 12v going to V2 and the arduino.
Logged

Denver, CO
Offline Offline
Jr. Member
**
Karma: 0
Posts: 54
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


This is what I want to control with the raspberry pi webserver

http://www.youtube.com/embed/kwIKgy6EBoQ
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2916
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The r.Pi I/O pins are 3.3V only and can supply only 5 mA of current. You cannot connect
them directly to Rx,Tx, I2C, or SPI on 5V Arduino boards.

One of the books shows using a USB cable between r.Pi and Arduino as the easiest interface.
It says the r.Pi can supply at least enough current [50 mA] to run the Arduino, as long as
there are no significant loads on the Arduino pins. The r.Pi itself is a current hog, 700 mA or
so, and the on board power ckts cannot supply very much current to anything connected to it.
« Last Edit: January 30, 2013, 03:29:41 pm by oric_dan » Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2308
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The PC's USB port is good 500mA your TLC5940 can use more than tht when driving 16 LEDs.

Mark
Logged

Pages: [1]   Go Up
Jump to: