Friday 26 July 2013

The components

Today I will present you the different components I have bought yet, what they are for, and how to connect them with each other.

The Raspberry PI
It is an mini-PC, very easy to use, running Linux. I guess most people buying them are geeks, but you can also use them as a media station, or something like that :



The LCD screen
This part was the most difficult to find. The original constraint was to find a 3-5'' LCD monitor including a touch panel, compatible with the Raspberry PI. However, all the monitors I could find were very expensive, around 150€, even the smaller ones.
The other solution was to buy a "naked" LCD screen, and find a way to make a case around it. After much reflexion, I finally bought this screen :




It is a 6.3'' LCD screen with a touch panel on it, native resolution 800x480. It has an RCA input, which is good because the Raspberry PI has an RCA output. It also has a remote control to configure the backlight and so on. The last part is the touch-panel controller, which is independant from the display part. It has a standard 4-wire resistive input for any touch panel, and a USB plug. I guessed there was a driver for Linux, which is the case fortunately :)
The complicated part is that the screen doesn't have a case. The solution for this problem is to design one and have it built using 3D printing. This method is becoming quite usual, and there are many services on the Web where you cand send a 3D file and receive the object some days later, in various materials. It is not really cheap, so I'd better do a one-shot-good :) The good thing is that I can integrate all the electronics inside the case, and let a hole for the temperature sensor. I will come back to the case later.
I bought the screen on Aliexpress (like all the other components, except the Raspberry), which is a good site for this kind of things. However, I received it after 2 months and a half, so if you ever buy something there, be patient !

Once I received the screen and the Raspberry, I connected them through the RCA. I then had a bad surprise, because the RCA output of the Raspberry is low-resolution only, so the dispay was quite ugly. The only solution to have a clean display is to use the HDMI output of the Raspberry, but the screen only has a VGA input, so I had to buy an HDMI to VGA converter, which is not a simple cable because the HDMI signal is digital, and the VGA is analogic :


Once connected this way, the screen works perfectly (after setting some parameters on the Raspberry, which I will describe later).

The temperature sensor
I first bought a simple USB temperature sensor on Aliexpress :


Once I got it, I found some piece of code on the Internet to communicate with it and retrieve the temperature. It worked, but after some hours of temperature retrieving every second, I observed some strange values. Sometimes the communication with the sensor just didn't work, and sometimes the returned value was irrelevant. After speaking with a colleague at work, he suggested that I use one of the sensors we are working on, and we know are very robust. The sensor is based on a TMP102 chip, communicating using an I2C bus. For those who don't know, it is a 2-wire communication protocol, often used to communicate between electronic chips. The Raspberry PI has an I2C controller on some of the multi-purpose pins, so I just had to cut the cable, and solder a plug :


Once done, I just plug it on the Raspberry, and I have to retrieve the value of a register on the I2C bus, then convert it to the temperature, according to the TMP102 datasheet. Actually I already had the code, because I implemented it for an other project at work.

The relay
A relay is just a switch, but instead of switching it with your finger, you can switch it by sending an electric current :


This is what will allow me to actually control the stove, by connecting it on the serial port. It should be easy to use with the Raspberry, because it has General Purpose Input Outputs (GPIO), which are pins you can easily control to send a current or not. It did not test the relay yet, but I have no doubt that it will work...
As you can see, there are two relays on the board : having an extra-relay might prove useful later, for example to turn the screen on/off if I can't control it otherwise. By the way, A 2-relay board is not more expensive than a 1-relay... Actually, I have other ideas which may require other ones, so I'd better have bought an 8-relays in the first place !

Next time, I will come back on how everything is connected together !

No comments:

Post a Comment