0

Well I have an dht21 and arduino mega. Dht21 leads look like this

enter image description here

If I use jumper cable and soldering dht21 leads with jumper cable than plug-in my arduino's socket. it looks like this below image. It dont looks safe. If the device falls to the ground or something, the cables may come out of place or the place may loosen over time. If I solder the cables under the arduino, it will be hard and looks like ugly. What is the best solution to plug-in a sensor to arduino board.

enter image description here

0
1

There is also the option of a Prototyping Screw Shield which converts the Arduino pins into terminal screw blocks. This makes a more permanent connection without being completely permanent.

enter image description here

1

Remember the Arduino is a prototyping system and it should be easy to plug, unplug and move around connectors.

If you want a permanent solution, you should make your own PCB and you will have a huge choice of connectors suited for all imaginable purposes (for example the JST family of connectors).

There are some connectivity systems like the Grove connector that have attempted to standardize connectivity on Arduino and related platforms.

1

One option you have is to solder your sensor leads to a set of header pins. The friction of multiple pins secured in a header will be greater than that of individual jumpers. When soldering to the header pins, use a method to secure the pins from movement, as the heat of the soldering iron may soften the plastic holding the pins.

The image below, from Digikey, is representative and does not imply correct spacing or fit for an Arduino.

header pine

Arduino solder shields are also available. This is a complete circuit board, akin to StarCat's recommendation of a custom PCB, but off-the-shelf. It allows access to all pins on the specific Arduino for which it was designed. I consider this option excessive for three connections, but include it for completeness.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.