Laying Out Your Project on the Proto Shield

The first step is to think about what needs to fit on here, and where they will be. We need to make room for the MOSFETs, relays, LEDs, and screw terminals. The screw terminals should be along a side that is accessible, and it would be nice if the LEDs were near the appropriate screw terminals. The MOSFETs are pretty small and can go anywhere, but it would be nice if each were next to the relay it controlled.

The relays are the biggest objects, so we need to give them space before we fill up the shield.

WARNING

It’s easy to confuse the top of the shield and the bottom, so make sure you place the components on the right side. I have written TOP and BOTTOM on the following illustrations to remind you. I suggest you write TOP and BOTTOM on your shield with a permanent marker.

WARNING

Make sure you don’t use any holes that already have a function, such as the ICSP connector or the lone ground not far from the IOREF pin. In the illustrations, I have indicated these holes with a black-filled circle.

Avoid the area that sits above the USB connector. If you are using the Arduino Proto Shield, this area is intentionally free of holes.

NOTE

Whenever you are soldering a circuit, think about where you will place things before you start any soldering. Start with connectors and the big items, and then place the smaller components close to where they need to connect. You can use the leads of the components to make the connections by bending the leads over on the underside of the shield and soldering them directly to the correct pins.

Don’t solder anything until you are happy with the placement. Document your placement either by drawings or photographs before you begin soldering, in case anything falls out before you solder it into place.

I promised I’d explain what the sockets are for. You can see that the relays would have to be soldered into the Proto Shield. What happens if one of the relays goes bad? Happily, the relays will fit a socket. The socket gets soldered onto the Proto Shield, and the relay plugs into the socket.

If the relays get sockets, why doesn’t every component get a socket? For a couple of reasons: resistors are easy to remove by desoldering. In the worst case, they can be cut out. Same thing for the MOSFETs. The relays would be very hard to desolder because they have eight pins. By the time we heat up the second pin, the first would have cooled down already. Also, once the relay is soldered in place, it’s impossible to cut it out. Finally, the relay is a mechanical device with moving parts, and moving parts are more likely to fail than purely electronic parts. (Still, the relay should work for many years.)

Note that the sockets have an orientation: there is a small semicircle in the plastic indicating the top, or where pin 1 goes. The socket really doesn’t care; it would work either way. This is meant to help you put the component in the right way around, so make sure you put the socket in facing the way you intend to wire it up. Again, making drawings and notes to yourself will help you later. Remember that when you flip the shield over, the orientation of the sockets will be reversed. I like to draw a circle around pin 1 of each socket on the bottom side of the board, to make sure I’m oriented properly.

When you flip the shield over, the sockets will fall out, so bend the leads over to hold them in place. They can be bent almost all the way as long as they don’t touch any other holes.

NOTE

Whenever you are soldering a circuit, use sockets for relays and chips.

Figure 8-17 shows one possible layout.

Note that I have distorted the image a little to enlarge certain areas. We’ll be doing lots of work there later, and I wanted to make it easier to see the details. The number of holes and the orientation of the rows and columns is accurate.

As we add the smaller components, I’ll show you a trick. We’ll make use of their leads to make some of our connections.

Look at the schematic. You’ll see that the three diodes that go near the relay go from pin 1 to pin 16. If we place the diodes on that end, we can just bend the leads over on the underside of the shield and solder them directly to the correct pins. Make sure you observe the polarity of the diodes or you’ll be cursing later. (I know because I’ve done that many times too.) The cathode is indicated by the ring near one end of the diode, and it goes to pin number 1 of the socket.

17 GSWA3E largecomponet layoutOnProtoShield

Bending the leads of the diode also helps keep it in place when you flip over the shield to solder the bottom.

The MOSFET has one pin (the drain) that is connected to the relay pin 16. Let’s place that right next to the diode, and we can bend the MOSFET lead over and solder it to the diode. The 10K ohm resistor that connects the gate of each MOSFET to the GND can go between the gate and the source of the MOSFET, since the source also goes to GND. We do this by standing the resistor on its end and using the resistor’s leads to make the necessary connections, without having to add any wire.

Try to get all components as close to the shield as possible. The diodes should lie flat against the shield. You can bend the leads of the MOSFETs a little to make them low, but don’t bend them too much or they will break. The resistor is standing, but one end of the resistor should be sitting on the shield.

I’ll show you how to make all these connections in a moment.

Figure 8-18 shows the top view with the relay sockets, MOSFETs, diodes, and resistors added.

18 GSWA3E topviewrelaysocketMOSFETDiode

What about the RTC and DHT11? The DHT11 needs to be out in the garden on four long wires. Rather than solder these wires directly to the Proto Shield, we’ll solder a strip of pins to the wire and mount a strip of sockets on the shield so that we can unplug it if necessary. I’ll show you how to do this later. The 10K ohm resistor (on the data pin of the DHT11) can be made to fit almost anywhere, so leave that for later.

The RTC already has pins, so another socket will be perfect for the RTC. Remember that the RTC takes up quite a bit of space, so place this somewhere where there is room. The top edge of the board, after the MOSFETs and their related circuitry, might be a good place. I placed them in the very last row. This still left me an empty row between the MOSFETs and the sockets for any related wiring, as shown in Figure 8-19.

25 26 GSWA3E headers
NOTE

Whenever you have to attach long wires from elsewhere to a board, don’t solder the wires directly to the board. Instead, use a connector of some sort to make it easy to remove. A pair of pins and sockets of the right number of positions make a good, inexpensive choice for small wires; screw terminals are good for larger wires.

Whenever you have to attach a module with headers to a board, don’t solder the module headers directly to your board. Instead, mount a corresponding header of the other gender on your board. This will allow you to remove the module in case you need to for any reason.

Better add all these headers to the shopping list! These headers usually come in long strips and often multiple pieces. They are designed to be cut to whatever length you need. When you cut the pins, you can usually break the strip exactly where you need it. When you cut the sockets, you have to sacrifice one position. Here are the additions that take our shopping list to version 0.5:

  • Add set of sockets, .1” pitch, such as Adafruit product ID 598
  • Add set of pins, .1” pitch, such as Adafruit product ID 392

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *