Today I finished putting the final touches on to the inbox and the code. First of all, the code. Unfortunately, for the past few weeks there has been an intermittent issue with the inbox and activity on the element 14 website. The issue has now been resolved, and was not a major barrier to normal use, but it made prototyping code increasingly difficult as the section of the site the code was trying to observe would fail randomly, making troubleshooting incredibly difficult. As a result of this I was forced to delay writing my code until the site was repaired, hence the rather late nature of this blog post. Eventually I was able to get some python code running to provide the cookies normally seen when logged in to the site and request the HTML of the page. This HTML was then parsed to return just the number of messages in my inbox, and passed this number over to the atmega chip to drive the display to the appropriate value. I made sure that the code waited a full 20 minutes between each time it attempted to check the website. This will ensure that it does not use too much of my internet bandwidth or put an excessive load on element 14s servers.

HTML code featuring the name of my account

/\ Some of my first success with the parser, finding a block of code featuring my account name, also proving the cookies worked

 

After writing the code, the time finally came to mount the circuitry. Installing the display and LEDs was reasonably easy with a little hot glue, and transferring the wiring was simply a case of transferring conditions from the breadboard one at a time. I did however run into some major issues in getting everything to fit into the case. Because of the weight of the various ports on an arduino yun, shields will often not be able to fit onto it properly. My intention was to work around this simply by having the shield at an angle with some pins not fully within the female header. Unfortunately this did not provide a good enough connection in some pins, forcing me to rethink my design. In the end I solved this issue by soldering a second set of male headers directly onto the ones I had already mounted. This effectively gave me double the height and easily allowed me to clear the ports. However, this new set of headers rendered the bord far to thick to fit correctly into the original case. In the end the only way I could solve this problem was by running a ribbon cable from inside the multimeter out to a separate enclosure containing the boards. This worked surprisingly well and the meter was soon up and running.

Two strips of pin headers soldered together

The case I chose for the boards was a cardboard box with a slide off clear colour. When I eventually install this I will try and find a better way to conceal the extra electronics, but for now I thought it would would be better to have them clearly visible for you all to see. With this done the only two parts to add were the voltage regulator for the yun and the switch to turn off the backlight. On my breadboarded version of the circuit I used a tact switch to turn off the backlight when held down. Obviously this is not practice in the actual meter so instead I desoldered one of the original switches from the multimeter circuit board and soldered it in place of the tact switch. Due to the design of the case, the switch would hold itself in place so I did not need to glue it in, allowing me to seperatge the two half's of the case for easy repairs. As for the voltage regulator, I choose to use something called a ubec. Ubecs are switching voltage regulator designed to produce a very low amount of rf noise for rc applications. I choose to use on because they are more efficient than traditional linear regulators. It also helped that I had one in my parts bin. To simplify construction, I attached the two input power lines for the ubec to the 12v power supply simply by soldering them to the underside of the power connector on the led driver board. 5v and ground were connected to appropriate pins on the shield and the whole thing was carefully checked with a multimeter before plugging in the yun. It worked perfectly.

A ubec

The only other addition I made to the board was for photography. Because of the 20 minute delay, filming and photographing the board was going to be a very time consuming process. In order to circumvent this I added two tact switches to pins 2 and 3 using the internal pullups. As in some of the prototypes, these were programmed to increment and decrement the post count allowing me to change the value on the display without having to wait for the system to update. For some additional rigidity glued the switches to a piece of wood. It is important to stress that this was only done for the purpose of photography and is not a required part of the system.

  The system seems to be working fully. I will evaluate the success of the solution against my original specification in a separate post, but for now, here are some posture of the finished unit.

 

IMG_20150626_105827.jpg

/\ The entre setup

 

IMG_20150626_111036.jpg

/\ The inside of the meter

IMG_20150626_110228.jpg

/\ The display in action