The sensor has a first element unit and a second element unit. The first element section has a first upper main electrode section, a first upper sub-electrode section, and a first lower electrode layer. The second element portion has an electrode configuration that is upside down from the first element portion, and has a second lower main electrode portion, a second lower sub-electrode portion, and a second upper electrode layer. The first upper main electrode section and the second lower sub-electrode section are connected. The first upper sub-electrode portion and the second lower main electrode portion are connected. The first lower electrode layer and the second upper electrode layer are connected.