Raspberry Pi Connection with Arduino

  • calendar_today  Apr, 25 2019
  • visibility  3,756

Raspberry Pi Connection with Arduino

The credit of this incredible project goes to “The Grendel

The Raspberry Pi is a purely little machine or a computer board, however not all that great as the Arduino with regards to I/O capacities. The flawlessly designed Gertboard is a module add-on that flawlessly defeats this defect by giving the Pi access to an Arduino ATMega328, yet it's an extremely complicated and costly arrangement. Another option would be to connect an Arduino running at 3.3 volts to the Raspberry Pi, however this is simpler said than done. 

But this can’t scare us or stop us from doing this? Obviously, not. 

As an initial step, we will construct an Arduino module board for the Raspberry Pi. It is standard to call Pi sheets "plates," 

We will utilize conventional stripboard to manufacture our task. Little (3-3/4" x 2-1/16") sheets can be gotten on eBay for somewhat over a dollar each. It is additionally conceivable to utilize something like a Radio Shack 276-168 protoboard ($3.49). The primary segment, however, is a 3.3-volt Arduino Pro Mini. This will allow interfacing straightforwardly to the Raspberry Pi ports and other 3.3-volt devices without doing level moving. 

A significant number of Raspberry Pi projects include associating sensors and devices straightforwardly to the GPIO pins. This is anything but a smart thought. Utilize cushion chips, for example, the 74HC4050 hex cradle, between the devices and the GPIO. This shields the Raspberry Pi from overvoltages, current floods, and your mix-ups. Far superior to victory a fifty-penny cradle chip than a $35 Pi. 

This specific progress interfaces straightforwardly to the GPIO Rx and Tx pins. Be that as it may, we are interfacing with a 3.3 volt gadget, which restricts the hazard. In any case, a cradle chip would not be a terrible thing here.  

This is a decently intricate undertaking, and amateurs need not make a difference. It requires aptitude at fastening and in the utilization of hand apparatuses. Experience with a coherence analyzer and a relentless hand with a blade sharp edge are too accommodating. 

Are you ready? Indeed, at that point, how about we continue ahead with it!

Step 1: Gathering the Needed Parts

Ingredients that you’ll need for this project are:

  1. Stripboard of 3-3/4” x 2” or bigger than this one. (1 Piece)
  2. Stacking header, 26-Pin (1 Piece)
  3. Wire-wrap socket 24-Pin (1 Piece)
  4. Female Header Strip (which you also utilize in your Best Arduino Projects) 
  5. Patchcords / female to male jumper wires (4 Pieces)
  6. Any mobile display but we will recommend you to take the Nokia 5110 display
  7. Arduino 3.3-volts Pro Mini Clone (Important)
  8. Hookup Wire
  9. Raspberry Pi Model, Lower Power drain will be preferred such as Model A
  10. Atrix Lapdock (A Video display for Raspberry Pi) is necessary.

Nothing is too much expensive. You can buy this easily. Some of them are available with us in affordable price and some are not. You don’t to have worry about non-avaibles because we have already linked them to an external purchase link from where you can buy them easily. 

Tools, you’ll need are mentioned below:

  1. Wire Cutter
  2. Sharp Knife
  3. Continuity Tester
  4. Soldering Iron

Note: One thing you should remember in all of this process that never ever uses the regular 24 pin socket, because the bars of the Arduino Pro Mini will become fitted in the holes. Instead of, you can use the 14-pin strips of female header. 

Truly, it is conceivable to utilize an "ordinary" little Arduino controlled at 3.3 volts for this venture. A few instances of such are the Boarduino and Ardweeny. 

Remember, nonetheless, that the Arduino ATMega328 chip isn't evaluated to keep running at 16 MHz controlled at 3.3 volts. In this way, you would run it out of spec, or basically overclocking it. 

We've done some tests regarding this, and probably a few, possibly generally Arduino ATMega328s can be customized and keep running at 3.3 Volts. In any case, obviously, your mileage may change.

Step2: Placing the GPIO Header after manufacturing the board

He utilized a stripboard to assemble the Raspberry Pi interface board/hoody. Stripboard has the edge of structure adaptability - it doesn't oblige the element design to a specific setup. It's likewise a lot less expensive than proportional estimated solderable protoboards. The main drawback of stripboard is the need of broad cutting of copper follows on the patch side. 

It's preferable to have a initial thought of the format before starting. A harsh outline on a sheet of paper makes a difference. 

He mounted the 26-stick stacking (long-stick) GPIO header close to one edge of the board, with the female (module) some portion of the header on the copper-follow side. The trap is for the header not to mount flush against the board, however to remain off around 1/4" high so as to allow fastening the pins to the copper traces. According to the Grendel, first we have to cut thirteen rows of traces where the GPIO header will mount, with the goal that neighboring header pins won't be shorted to one another (see second and third representations). Trimming the traces requires returning and forward with a sharp blade edge with a considerable measure of weight (alert!), at that point line up checking with a congruity analyzer. It's a decent measure of work, and next time he will attempt something like this he'll most likely utilize a Dremel instrument with cutting disk, instead of knife. 

With the thirteen traces cut, cautiously mount the GPIO header around 1/4" in height. This will give enough space to move the tip of the soldering iron between the pins to bind them. A couple of spots of posting mounting putty hold the header in position preceding soldering. Solder one end stick, at that point cautiously fix the header so it sits opposite to the board. Solder the rest of the pins, at that point utilize the progression analyzer to search for shorts beween pins, both sideways furthermore, over. A decent progression analyzer with capable of being heard marker is particularly supportive here. 

Subsequent to patching, the header pins will just 1/4" or more on the perfboard (non-patch) side. This is helpful, as these will work as presents on join fix ropes and jumpers. Each post will be an electrical association with the relating GPIO stick underneath when the board is mounted on the Pi.

Step 3: Arduino Socket Installation on the Board

The interface board need for connecting an Arduino, and peculiarly, a 3.3-volt small Arduino Pro. This is the place where the 24-stick wire-wrap socket comes in. For reasons unknown, the Arduino Pro module conveniently connects to a wire-wrap socket, however, the pins are unreasonably fat for an ordinary 24-stick socket. Luckily, wire-wrap sockets are generally accessible and not very costly. He happened to have a couple laying around from a 2716 EPROM venture on which he was taking a shot at quite a few years back. 

Position the sockets around an inch down from where the two lines of posts stick up from the GPIO header on the perfboard side (see pics). Patch or you can solder the socket flush onto the board. Afterwards patching or soldering, cut the jutting pins flush on the copper-follow side of the board. At that point, cut the lines of copper traces between the two lines of soldered pins on the sockets, so contiguous pins don't short together. 

From the 40-stick female header strip, cut off the two 12-stick strips. On the perfboard side, position a 12-stick female header strip on each side of the IC Sockets. This will give module focuses to jumper-wires to get to the Arduino pins. Secure the header strips so they are vertically situated in respect to the board. Presently, turn over the board and patch each line. 

There is a kind of craftsmanship to cutting off areas of female header strip. There are no scores, similarly as with male header strip, so the cut off strips will as a rule turn out somewhat worn out, however this scarcely matters. The stratagem (stratagem meaning = trick or strategy) is to cut amidst a gap, and this will either leave a metal prong hanging, or the prong will simply drop out. It squander (squander meaning = waste) one opening of the strip each time you cut, yet there is no staying away from this. 

There is a bit of female header strip left over. Cut off a 8-pin strip from it. You should get the second 40-pin strip so as to have the capacity to cut the second 8-stick strip since one stick dependably gets squandered in the cut-out procedure. These two strips will make up an socket for an discretionary Nokia 5110 monochrome presentation for our project. The two lines will short together on the patch or solder side, so jumper wires can be electrically associated with the pins of the Nokia display. Position the strips, at that point turn over the board and bind them. At long last, cut lines of copper traces, with the goal that the Nokia attachment is electrically secluded from everything else. The Grendel introduced two double row "utility" socket strips on the fringe (fringe meaning = region) of the board. The establishment and best soldering methodology is equivalent to that for the Nokia socket. The factual number of pins in these socket lines is discretionary, yet they are helpful for power and ground buses, among other things. After doing the soldering method, cut suitable rows of copper traces to segregate (segregate meaning = separate) these strips electrically from the remainder of the board.

Step 4: Wiring Process (Part 1)

Now as we the interface is almost built, so what will be our next step after all of this? Well, the next step is plug the Nokia display and Arduino pro in the socket that we’ve build. Afterwards, we will take some jumper wires and patch cords and will make a path between the Arduino and display by using the jumper wires and patch cords. After doing this, we will again make a path from Arduino to GPIO post by using the same components. 

As in the start, you have bought only the Nokia 5110 Display, then surely, you’ll have to solder male header row to the 8 solder holes. This process is for getting the power and date lines. Remember; never forget to take note of “in which manner the holes are labeled”.

If we talk about the Nokia 5110 Display with respect to the “standard pinout configuration”, then this is a bad news for you that Nokia 5110 Display does not consist of “Standard Pinout Configuration”. They all consist of same amount pins, but you know what, they are not in-line on the display board’s connector. Remember; pin’s labeling matters. Because they have standard functions that are mentioned below:

  • Arduino     Nokia display pin name          Nokia display pin number 
  • pin 7 -           Serial clock out (SCLK)                   varies
  • pin 6 -           Serial data out (DIN)                 (see pin labels on display)
  • pin 5 -           Data/Command select (D/C)
  • pin 4 -     LCD chip select (CS)
  • pin 3 -     LCD reset (RST)
  • Vcc           à Nokia Vcc (3.3 v.)
  • Ground     à Nokia Ground
  • Vcc           à Nokia backlight

If you don’t want to confuse yourself, then we will suggest you to kindly use different colors of jumper wires for different functions. For example, take red for Vcc, black for the ground and some other colors for date lines. We always recommend this method to each and every person because it will help you in rechecking of your connection. 

Caution: Do your work slowly and calmly, arrange separate room for your work and start the wiring process there, because it will help you in providing more concentration on your wiring process. Do not make any kind of error while in the process of making ground connections and Vcc. 

As we have done with the hardware section of the project, so now, you can take a little rest and start your work again for

Step 5: Wiring Section (Part 2)

So, now that’s the time where we will connect the Arduino Pins and GPIO header posts. In this process, we will use the female to male jumper patch-cords. 

In this process, we have to build four connections. And this is the point where the twice rows of female headers along with Arduino Socket be advantageous. 

  1. Connect the GPIO Ground Pin (Pin Number 6) connects with the Ground on the Arduino.
  2. GPIO RxD pin (Pin Number 10) connects with the TxD on the Arduino.
  3. GPIO Vcc (3.3V) pin (Pin Number 1) connects with the Vcc (3.3V) on the Arduino.
  4. GPIO TxD pin (Pin Number 8) connects with the RxD on the Arduino.

Connection between the TxD and RxD is useful because of one main reason and that is the signals. Basically the signals which are coming out from one device tries to enter into another device. At first, with this process, you will be confused but later, you will realize it “Quite Logical”.

If you want to facilitate yourself with troubleshooting, then we will recommend you to use the red jumper wire for the Vcc and black for the ground and the other two colors for TxD and RxD. Remember, Don’t work carelessly, concentrate on your work and keep your eyes sharp on the Vcc and Ground. Because, a little mistake will cause huge damage. 

Hurrah!!! At last, we have done all the hardware process, now it’s time to turn towards the software mode. 

Step 6: Sending Data from Arduino to Pi (Software Process part 1)

We're not exactly prepared to connect the interface hoody to the Pi. To begin with, we should stack a program into the Arduino Pro that will tell it to communicate information on its sequential port. Attach a suitable sequential/tty-to-USB link or a FTDI breakout board to the 6-stick right-edge programming header. Fitting the USB end into your workstation phone running the Arduino IDE, and transfer the accompanying portrayal into the Arduino. In this way, this would give the Pi access to simple ports and gadgets that interface to same. 

This is a basic sketch that augments a variable and sends it to sequential out as a major aspect of a "Line Number #" string. It will show in the comfort or on a xterm on the Pi running minicom (sudo yum introduce minicom if it's not as of now introduced).