Guitar Case Humidity Sensor Project

Introduction

I live close to the Irish Sea in West Wales. Even for Britain, where rain is never far away, this place is damp! As a result I have a problem with humidity affecting the sound boards of my better quality acoustic guitars. Two of them have warped. Consequently I keep them in their hard cases along with some de-humidifying sachets.

Picture of quality guitar top
My delightful Lakewood M31 Custom

I wanted to know how well the de­humid­ifi­cation is work­ing and when the sachets need to be dried out or replaced. Of course, opening the case to measure the humidity is a non starter because, once the case is open, the humid outside air enters the case.

So I came up with this project to build humidity sensors into the guitar cases that can send data via ports in the cases to an external measuring device.

Specifications

  1. There must be no active electronics within the guitar cases. This is to prevent any overheating or battery leakage from damaging the rather valuable instruments they contain. Whatever circuits are contained in the cases need to be minimal and powered externally for as short a time as possible.
  2. There must be as few intrusions into the guitar case as possible to avoid scratching the instruments.
  3. More than one guitar case will be fitted with sensors: probably two or three.
  4. Each guitar case must have some unique identifier to be used when logging results.
  5. Connections to the guitar cases must be as airtight as possible.
  6. There must be one, portable, hand held device that can be plugged into each case that reads the humidity and temperature inside each guitar case.
  7. The hand held device must have some kind of display to show the readings for any case it is plugged into.
  8. The hand held device should be able to log the information read from each case in a format that can be analysed in a spreadsheet or similar program.
  9. For maximum portability, the hand-held device should be battery powered.
  10. The must be some means of taking a reference humidity from the air in the room where the cases are stored, for comparison purposes.

Design

There are three components to this design: the circuits that will be installed in the guitar cases, a circuit to provide the reference humidity and the circuit for the hand held device.

Guitar case circuits

As mentioned in the specifications above, these circuits have the following requirements:

  1. be externally powered
  2. be sealed as well as possible
  3. be unobrusive
  4. have a unique identifier

To help meet requirement ii, it was decided to fit each case with DIN sockets, because they are relatively well sealed when compared with other sockets, such as jack sockets, as can bee seen below:

Picture of front and read of 5 pin DIN socket
5 pin DIN socket

Requirement i can be met by supplying power and ground via two of the DIN socket pins.

Dealing with requirement iii, we can place most of the electronics, and the DIN socket within the case's accessory box, thus keeping it away from the instrument. The only component that can't be located in the accessory box is the actual humidity sensor, which must be placed within the case proper to get the most accurate reading. The location of this sensor will need to be as far away from the guitar body as possible and will therefore vary between cases.

Fitting the DIN socket within the accessory box also helps with requirement ii because accessory boxes have snug fitting lids that must be closed when the case is closed.

Requirement iv can be met by fitting each case with a unique value of resistor, that will be coupled to ground and to the measuring device via one of the lines from the DIN plug. Full details can be found on the Guitar Case Detector Design page.

The DHT22 / AM2302 temperature and humidity sensor will be used as the case sensor. This requires +3V…+5V, ground and sensor pin connections.

From the forgoing it can be seen that the following lines will need to be connected to the external measuring device:

  1. Power line (3V…5V)
  2. Ground
  3. Sensor line
  4. Line to unique resistor

Therefore a 4 pin DIN socket will be required.

A 5 pin DIN socket will actually be used for two reasons: (1) it provides a spare line in case such should be needed in future and (2) I've got lots of them in stock, along with a 5 pin DIN connector cable! At least initially, two pins will be commoned to ground.

Hand-held device circuit

According to the specifications, the hand-held device has the following requirements. It must:

  1. be battery powered
  2. be portable
  3. provide power to guitar case electronics
  4. be able to recognise each guitar case
  5. have a display
  6. be able to log data received from cases

As mentioned above the device will use a voltage divider in order to detect which guitar case is plugged in, or when no case is plugged in. A microcontroller's analogue input will be used to detect the appropriate voltage. This satisfies requirement viii.

There will be an internal battery or batteries for powering both the device itself (requirement v) and the guitar cases via a DIN socket and cable (requirement vii).

Currently it is planned to use two 3V CR2032 batteries in series, providing 6V DC.

Electronics and battery should be built into a 10cm×6cm×2.5cm plastic case (because that's what I have in stock!). This satisfies requirement vi.

A 0.96" OLED display will be fitted to the device, satisfying requirement ix.

Requirement x will be satisfied by using a SD card writer mounted in the case. The data can then be transferred to a computer using an SD card.

At some later stage the SD card method could be replaced by using a WiFi or Bluetooth equiped unit.

Reference humidity circuit

This circuit is required to satisfy specification #10 above.

A duplicate of the guitar case circuit constructed so that its humidity sensor is exposed to the room air should suffice.

One of the available unique resistor values (mentioned above) will be reserved to identify this circuit to the hand held unit.

This circuit will also be connected to the hand held unit via a 5 pin DIN connection.