I’ve always been engrossed in electronics and being hands on with hardware – I liked getting my hands dirty, but I’ve never set myself something to work on with actual value to people, it’s always been Lilliputian projects that have been one minute wonders and have never seen a wink of daylight from the cramped corners of my cupboards.
When I started my work placement in Embecosm, the first few hours were spent confabulating with the team, and discussing what I would be doing in the next two weeks, and what my project would be. We settled on making a humidity and temperature sensor, the team thought this would be a very advantageous project, as it would be put into practise, and would be used in an every day situation in order to keep observations on the server room, so we could have better outcomes for cooling.
To begin with I started with a cuttlefish board, and I had a handful of different components that I needed to install to begin my task. These components consisted of a multitude of resistors, and capacitors that I had to individually solder onto the board, this was a very precise job as I didn’t want to bridge any of the connections I was making.
One of the next components I installed was the 16Mhz crystal that controls the clock speed of the CPU, in this case the clock speed was 16Mhz. The crystal doesn’t have polarity, therefore it didn’t mater what way it was facing, so in my head just less things to worry about.
After most of the capacitors and resistors were installed, the job was nearly done, I just had to install a small variety of components and I was done with this board.
One of the final, main components was the ATMega328-PU chip, which was essentially the brain of the board – this was most definitely a pain to solder as there where just so many pins that needed to be soldered in, and the risk of bridging the connections were considerably high, luckily I managed to solder them in ease – which was a surprise.
I never really ran into any major problems with the first part of the project, I had a few minor inconveniences during the process of putting it together, but I swiftly dealt with it, leaving the issue negligible.
Next we moved on to the Ethernet Shield, now at the beginning this had a few connectivity issues, because I couldn’t get the Cuttlefish to communicate with the Ethernet shield efficiently, after many failed attempts to troubleshoot the issues, we thought the only way to solve the issue was to replace the cuttlefish with an arduino uno, which the Ethernet shield is directly connectable to, so we wouldn’t have to worry about converting all the signals, and it would just make life easier for me – and it did, all the issues regarding connections disappeared, and I could move on to the next task at hand.
Since we had most of the electronics and hardware sorted out, it was time to work more on the software side, to program the arduino code, and also the python codes.
I tried a few different arduino codes to see what one worked better with what I was doing, and after a few different tries, and a lot of troubleshooting, I managed to get a code that worked well for what I wanted, I managed to get a code that displayed the temperature and the humidity through a webpage – so far so good.
One of the other tasks at hand was to make a server with python, this was going to be difficult because I have never really worked with python, and making a server as my first proper task would definitely be a challenge for me. I somewhat got the python web server to work, but not how I wanted it to work, it was only displaying a header, nothing else. My plan for the server was to intercept the data collected from the arduino, and display them on the web server, so whoever wanted to see the humidity or temperature could do so with ease.
I was given a sense of false hope, because with the arduino code, I managed to get the data to display on a web page, but that wasn’t what I wanted from the arduino code, I wanted it to send data out to the server, so that it could be displayed on the web page that my python script had created.
After working on the code, both the python script, and the arduino scripts, I managed to sort something out. I managed to get the arduino to act as a client to send data to the python script, which was acting as the server.
To make the readability of the temperature and humidity, we decided to plot out all the data that was exported from the code into a CSV file, that would automatically be converted into a graph, easily displaying all the data that had been previously connected. After this was all over and done with, it looked like the project was coming to an end.
I think I’m overall happy with how the project went, and the end result was what I wanted. I think my favourite part of the project was definitely putting the arduino together, and soldering the cuttlefish. At the same time I like how to python script went together, because I didn’t have high hopes for it – but it ended up well.