Here's a couple of short subject posts.
While the mountains in West Virginia might not be the highest in the U.S. the difference in pressure is still enough to cause a problem I didn't foresee. Constructed the drawer that holds the Porta-potti to just be a little taller than needed.
![](http://larry.wvnet.edu/~van/pics/150506-63-mj.jpg)
After previously cleaning and filling the Port-potti at home (1000 feet) I drove to and set up camp at 3800 feet then found that I couldn't open the drawer. The Porta-potti had swelled so much in size it's top was hitting the bottom of the fridge.
![](http://larry.wvnet.edu/~van/pics/150926-01-mj.jpg)
A temporary fix was to remove the mounting screws on the front of the fridge then slide it out enough to get the drawer open. Then I could open the gate valve that separates the two parts of the Porta-potti and relieve the pressure so it returned to it's normal size.
That worked for the weekend but for a more permanent solution I've removed the small vent grid from the bottom front of the fridge.
![](http://larry.wvnet.edu/~van/pics/150926-03-mj.jpg)
This should give enough clearance so it doesn't happen again.
![](http://larry.wvnet.edu/~van/pics/150926-04-mj.jpg)
Next subject is the electric sofa-bed. Last time I updated the controls I didn't post about it. I've revisited it recently so time for a quick update. The two actuators that drive the sofa bed are run by DC motors. To change the direction of the motors you reverse the polarity by swapping the positive and negative power leads.
In the photo below you can see the first of the control boards on the right. It used mechanical relays (numbered 1, 2 and 4) to do the swapping of the power leads. The number 3 relay failed and was replaced by the larger automotive style relay at the bottom. There are two computer chips. The one at the top is an Atmel microcontroller. This is the "brains" that controls the sofa-bed. The second chip is a Darlington transistor that uses the 5 volts that the microcontroller outputs to switch 12 volts which is needed to drive the mechanical relays.
![](http://larry.wvnet.edu/~van/pics/151008-03-m.jpg)
I hadn't kept up with the technology so didn't know this way of controlling the DC motors was "old school". There are now better ways. Started having trouble with another one of the relays so decided to make a new updated control board. On this new board the "brains" is supplied by a Arduino Nano microcontroller. In the picture below there are two ICs numbered 1 and 2. These are "H-bridge motor controllers". Each chip takes the place of two mechanical relays and also the Darlington transistor. The H-bridge chip can swap the polarity of the power going to the DC motor. It takes two 5v inputs from the microcontroller and uses that to indicate how to switch the 12 volts outputs from the H-bridge.
![](http://larry.wvnet.edu/~van/pics/151008-04-mj.jpg)
Here it is all wired up to the middle support on the sofa-bed that also holds the actuators. The disc in the lower corner is a piezoelectric buzzer to remind me to turn off the power to the sofa-bed when it's reached final position.
![](http://larry.wvnet.edu/~van/pics/151008-05-mj.jpg)
![](http://larry.wvnet.edu/~van/pics/151008-08-mj.jpg)
The microcontroller requires some inputs to know the current position of the sofa-bed as it moves. In this photo you can see a potentiometer (variable resistor) that's wired to the microcontroller. One of the actuators lifts or lowers the back of the sofa-bed. As the lifting arm moves that small piece of spring wire will rotate in line with the potentiometer. The small white nylon cap causes the spring wire to move the potentiometer and the microcontroller reads the change in resistance and translates that to the lifting arm's position. Since the potentiometer is not perfectly in line with the pivot axis of the lifting arm the the spring wire slides slightly as it rotates so the nylon cap can't be too tight.
![](http://larry.wvnet.edu/~van/pics/151008-07-mj.jpg)
The position of the of the other part of the sofa-bed is indicated by three limit switches. The controller only needs to know if it's fully open, fully closed or in the middle so only the three switches are needed.
![](http://larry.wvnet.edu/~van/pics/151008-09-mj.jpg)
Here's a video that I posted a couple years ago that shows how the actuators work when under power. It also stars my dearly departed old friend Tiger.
Youtube video