Monday, 25 February 2019

RCA composite cable for Raspberry Pi -Solved Problem

Converting your old CRT TV to a Raspberry Pie display is matter of great excitement. Raspberry Pi comes with many OS such as Raspbian OS, Retro Gaming OS-"Retropie", Media Centre OS-"OSMC" etc are helping getting good User experience.

When it comes to Old CRT TV they don't have in-built HDMI ports Instead they have AV ports. You might have seen AV cable between your set-up box and TV.

  • To play via R-Pi you need HDMI to AV converter (expensive and not discussed here)
or
    • RCA and AV composite cable
    What problem arises!!!
    There is bit difference between pin configuration on Raspberry Pi and other devices. This has been shown below.

    So it is clear that the pin "video" and "ground"on 3.5mm jack is interchanged in case of RPi. To solve this you should buy RPi specified cables or DIY a female connector like me. So needed item are:
    • AV female pins
    • 3.5mm RCA pin
    • wires and soldering material
    Solder the wire according to the given figure below.
    The out come looks like this.

    Plug it to your TV and enjoy gaming and media like never before. Humming sound may arises due to interference.
    **In OSMC OS goto setting and find Audio output option, there change the option to AV mode, then you will find zero noise or humming sound.
    **You can buy readily modified cables at adafruit here thelink.
    ##Thank you##

    Saturday, 23 February 2019

    “SOLAR TRACKER” USING ARDUINO


    Solar power is renewable energy source and Solar panel helps in converting the solar power to electric power.
    Solar tracker is a device which is used to sense solar intensity and rotate the solar panel in that respective direction. It would help in getting maximum solar energy through the solar panel and to its electrical conversion.

    #wiki_stuffs: Orientation and inclination

    A solar cell performs the best when its surface is perpendicular to the sun's rays, which change continuously over the course of the day and season. It is a common practice to tilt a fixed PV module (without solar tracker) at the same angle as the latitude of array's location to maximize the annual energy yield of module. For example, rooftop PV module at the tropics provides highest annual energy yield when inclination of panel surface is close to horizontal direction.
    #wiki_stuffs: A solar tracker is a device that orients a payload toward the Sun. Payloads are usually solar panelsparabolic troughsfresnel reflectorslenses or the mirrors of a heliostat.
    Things we need!!
    • 1.      Solar panel (not necessarily a big one a mini could be better)
    • 2.      DC motor(servo better if you know coding it)
    • 3.      Motor driver
    • 4.      Board, Wood piece or panel holding structure.
    • 5.      Arduino and jumper wires
    • 6.      Two IR (Infrared) sensors and resistor and diodes.
    • 7.      Power source (12V or a power bank might work great)
    • 8.    Incandescent bulb for testing purpose
    Whats the Idea??
    The idea is mounting two sensors and two ends of the solar panel and measuring the solar intensity via Arduino and then Arduino commands to tilt the panel toward that direction in which there is more intensity until the intensity of both the sensors became nearly equal. The tilting action can be done by motor and driving circuit.


    Concept diagram for solar tracker.



    Build IR Sensor!!


    • You can easily find IR Receivers near by electronics store and build the above circuit.
    • Don't forget to place diodes at output it will decrease interference.
    • SEE REF:http://www.ganeshgadgets.co.in/2017/08/


    How it looks when it is built!!





    Coding!!!
    Coding is simple one. That is the tilting process going on until the difference between the sensor values become less than desired value.
    ////////////////////////////Code Solar tracker////////////////////////////////////
    int br = 3;//motor output reverse
    int bf = 2;//motor output forward //you can use enable at pwm output or make iy short to 5v.

    int a4=0,a5=0; //analog sensor input
    int approx=10; //difference limit
    void setup() {

      pinMode(bf,OUTPUT);
      pinMode(br,OUTPUT);
      pinMode(A4,INPUT);
      pinMode(A5,INPUT);
      Serial.begin(9600);

    }

    void loop() {
     a4=analogRead(A4);
     a5=analogRead(A5);

     Serial.print(a4);
      Serial.print(' ');
      Serial.print(a5);
      Serial.print(' ');
      Serial.print(a5-a4);
      Serial.println(' ');


    if(a4>a5)
    {
    int diff=a4-a5;
        if(diff > approx)
        {
           digitalWrite(bf,HIGH);
           digitalWrite(br,LOW);
        }
        else{digitalWrite(bf,HIGH);
             digitalWrite(br,HIGH);}
     }

    if(a4<a5)
    {
    int diff=a5-a4;
        if(diff > approx)
        {
           digitalWrite(bf,LOW);
           digitalWrite(br,HIGH);
        }
         else{digitalWrite(bf,HIGH);
             digitalWrite(br,HIGH);}
      } 
     delay(50);
     }
    //////////////////////////////end//////////////////////////////////////

    Its a good project for students to start with hope you like it.