Thursday, December 31, 2015

Arduino Controlled 3-Axis Pen Plotter

Picture of Cheap Arduino Controlled 3-Axis Pen Plotter
Schematic.JPG
bipolar_stepper_four_pins.jpg
Pen Plotter Control Board.jpg
Output.jpg

The purpose of this project was to make a 3-axis pen plotter as cheaply as I possibly could.  Assuming you already have an Arduino it ended up costing me $30 to build.  Please understand that the stepper motors that are inside CD-ROMS are not strong.  If the pen comes down too far it will stop the motors from moving.  This will not harm the motors but I thought it would be worth mentioning.  But if you are looking for a cheap way to experiment with 3-axis's this might be for you. 

The program reads binary 0's & 1s stored in a word array in row/column fashion & then controls the motors accordingly.  You can change what it prints by changing the data in the "image" array.  It's pretty basic & shouldn't be too hard to understand or change to fit your wants better.

I included the schematic I followed for wiring the H-Bridge Motor Drivers (SN754410NE).  I apologize for not having a complete schematic I have not found an easy way to make them.  I used an LM317 5V regulator for each H-bridge, but honestly since I used a computer power supply to give me 5V you shouldn't even need the LM317's.  You could just take the 5v from the power supply & wire it to each H-Bridge.  In my case I built the control board before choosing a power supply.


Part List                                                              Quantity     Cost        Total
H-Bridge Motor Driver 1A (SN754410NE)                3              $2.35       $29.25
Voltage Regulator (LM317)                                      3            ~$1.95
10uF/25V Capacitor                                                  3             ~$0.45
Used CD-ROM                                                           3             ~$5.00

Arduino Duemilanove/UNO   (This indestructible assumes that you already have one) ;)    

If you don't already have an Arduino the total cost will be closer to $60.00.
                                                           
In case you don't want to download the zip file, the code is below:

//Beginning

#include <Stepper.h>

// change this to the number of steps on your motor
#define STEPS 200

// create an instance of the stepper class, specifying
// the number of steps of the motor and the pins it's
// attached to
Stepper stepperX(STEPS, 6, 7, 8, 9);     //x (top) platform
Stepper stepperY(STEPS, 2, 3, 4, 5);     //y (bottom) platform
Stepper stepperZ(STEPS, 10, 11, 12, 13); //z pen

int x_inc = 0;
int y_inc = 0;
int z_pos = 0;

word image[16] = {
  0b0000001110000000,
  0b0010011111000100,
  0b0010001110000100,
  0b0010000100000100,
  0b0011111111111100,
  0b0000011111000000,
  0b0000011111000000,
  0b0000001110000000,
  0b0000011111000000,
  0b0000011111000000,
  0b0000110001100000,
  0b0001100000110000,
  0b0001100000110000,
  0b0011100000111000,
  0b0011100000111000,
  0b1111111111111111
};


void setup()
{
  // set the speed of the motors to 60 RPMs
  stepperX.setSpeed(60); //bottom (60rpm)
  stepperY.setSpeed(60); //top (60rpm)
  stepperZ.setSpeed(60); //Pen (60rpm);
  delay(2000);
}

void loop()
{
  
    for(int row = 0; row < 16; row++) {

      penUp();
    
      stepperX.step(-x_inc);
      x_inc = 0;

      for(int column = 0; column < 16; column++){
        boolean pixel = bitRead(image[row],column);
        if(pixel == 1){

          penDown();
        
          //move X-Axis forward 5 steps for each bit in the array
          stepperX.step(10);
          x_inc = x_inc + 10;
          delay(15);
        }
        else{

          penUp();
        
          //move X-Axis forward 5 steps for each bit in the array
          stepperX.step(10);
          x_inc = x_inc + 10;
          delay(15);

        }
      }
    
      penUp();

      //Position Y-Axis for next row
      stepperY.step(10);
      y_inc = y_inc + 10;
      delay(15);
    }

  penUp();

  //Return X/Y-Axis back to home position
  stepperX.step(-x_inc);
  stepperY.step(-y_inc);

  //Endless Loop
  while(1){
  }

}


void penDown()
{
  //if the pen is raised
  if (z_pos == 0){
    //move the pen to the paper
    stepperZ.step(83);
    delay(15);
    z_pos = 83;
  }
}

void penUp()
{
  //if the pen against the paper
  if(z_pos == 83){
    //move pen away from paper
    stepperZ.step(-83);
    delay(15);
    z_pos = 0;
  }
}

//END
Source:http://www.instructables.com/id/Cheap-Arduino-Controlled-3-Axis-Pen-Plotter/

Wednesday, December 30, 2015

MPPT Solar Charge Controller

Basics of MPPT Solar Charge Controller

What is MPPT?
MPPT or Maximum Power Point Tracking is algorithm that included in charge controllers used for extracting maximum available power from PV module under certain conditions. The voltage at which PV module can produce maximum power is called ‘maximum power point’ (or peak power voltage). Maximum power varies with solar radiation, ambient temperature andsolar cell temperature.
Typical PV module produces power with maximum power voltage of around 17 V when measured at a cell temperature of 25°C, it can drop to around 15 V on a very hot day and it can also rise to 18 V on a very cold day.

Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller

Figure 1  The I-V curves show maximum power from PV modules when exposed
to irradiance 1000 W/m2

Source: The parameters are measured by the IVTracer program by Sandia National Laboratories

Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller

Figure 2  The I-V curves show maximum power from PV modules when exposed to irradiance 100 W/m2
Source: The parameters are measured by the IVTracer program by Sandia National Laboratories.

As the graphs in figure 1 and 2, we see that at the different solar radiations, PV modules deliver the variations in parameters as follows:
 (1) Maximum power; Pm
(2) Maximum power voltage; Vpm
(3) Open circuit voltage; Voc
(4) Maximum power current; Ipm
(5) Short circuit current; Isc

How MPPT works?
The major principle of MPPT is to extract the maximum available power from PV module by making them operate at the most efficient voltage (maximum power point). That is to say:
MPPT checks output of PV module, compares it to battery voltage then fixes what is the best power that PV module can produce to charge the battery and converts it to the best voltage to get maximum current into battery. It can also supply power to a DC load, which is connected directly to the battery.
MPPT is most effective under these conditions:
Cold weather, cloudy or hazy days: Normally, PV module works better at cold temperatures and MPPT is utilized to extract maximum power available from them.
When battery is deeply discharged: MPPT can extract more current and charge the battery if the state of charge in the battery is lowers.

MPPT solar charge controller

A MPPT solar charge controller is the charge controller embedded with MPPT algorithm to maximize the amount of current going into the battery from PV module.
MPPT is DC to DC converter which operates by taking DC input from PV module, changing it to AC and converting it back to a different DC voltage and current to exactly match the PV module to the battery.

Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller
Examples of DC to DC converter are
Boost converter is power converter which DC input voltage is less than DC output voltage. That means PV input voltage is less than the battery voltage in system.
Buck converter is power converter which DC input voltage is greater than DC output voltage. That means PV input voltage is greater than the battery voltage in system.
MPPT algorithm can be applied to both of them depending on system design. Normally, for battery system voltage is equal or less than 48 V, buck converter is useful. On the other hand, if battery system voltage is greater than 48 V, boost converter should be chosen.
MPPT solar charge controllers are useful for off-grid solar power systems such as stand-alone solar power systemsolar home system and solar water pump system, etc.

Main features of MPPT solar charge controller
In any applications which PV module is energy source, MPPT solar charge controller is used to correct for detecting the variations in the current-voltage characteristics of solar cell and shown by I-V curve.
MPPT solar charge controller is necessary for any solar power systems need to extract maximum power from PV module; it forces PV module to operate at voltage close to maximum power point to draw maximum available power.
MPPT solar charge controller allows users to use PV module with a higher voltage output than operating voltage of battery system.
For example, if PV module has to be placed far away from charge controller and battery, its wire size must be very large to reduce voltage drop. With a MPPT solar charge controller, users can wire PV module for 24 or 48 V (depending on charge controller and PV modules) and bring power into 12 or 24 V battery system. This means it reduces the wire size needed while retaining full output of PV module.
MPPT solar charge controller reduces complexity of system while output of system is high efficiency. Additionally, it can be applied to use with more energy sources. Since PV output power is used to control DC-DC converter directly.
MPPT solar charge controller can be applied to other renewable energy sources such as small water turbines, wind-power turbines, etc. 

How to choose MPPT solar charge controller for PV module
Table 1  Specifications of PV modules separated by manufacturers
PV Manufactures
Model
Wp
Vpm
Ipm
Isc
Voc
NE-78T1
78
17.1
4.57
5.08
21.4
ND-130T1
130
17.4
7.48
8.09
22
GPA
64
68
0.94
1.17
92
HIP-180B2
190
54
3.33
3.15
66.4
Bangkok Solar[View Specifications]
BS 40
40
44.8
0.9
1.16
62.2
Standard Test Condition: Irradiance = 1000 W/m2, Cell temperature = 25°C, Air mass = 1.5

How to set system configuration of MPPT solar charge controller

Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller

Figure 3  General configuration of the MPPT solar charge controller



SOLAR CHARGE CONTROLLER
WITH MPPT AND
DC LOAD TIMER 10A
  • Advance microprocessor control
  • Buck regulator wide input range
  • Maximum Power Point Tracking (MPPT)
  • Solar charge controller with DC load control
  • Reverse polarities protection of PV and battery
  • Battery overcharge and overdischarge protection
  • Temperature compensation (-3 to -7mV/Cell/Celsius)
  • Lighting surge protection (TVSS)
  • 3-step charging to provide quick and safe charging for battery
  • Automatic cooling fan (outside enclosure)
  • 7 modes timer control (ON/OFF DC load) selectable


Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller
Basics of Maximum Power Point Tracking (MPPT) Solar Charge Controller
Table 2  Specifications of the SOLARCON SPT-series MPPT solar charge controller

How to choose MPPT solar charge controller for PV module and battery
Steps to consider for choosing MPPT solar charge controller
SPT-XXYY (XX is nominal battery voltage, YY is maximum charge current)
Find out what is nominal battery voltage that charge controller will charge and select XX
Find out what is Wp of PV module and
Select the suitable charge current (CC) = (Wp) / XX
Find out YY by multiply CC by safety factor (NEC requirement) = (CC) x 1.2
Select SOLARCON SPT-series model that covers YY
Check that Vpm(system) is in range that SPT-XXYY can handle (MPPT voltage range) 
If PV modules are in series, need to check that Vpm(system) = Vpm(module) x Module in series
If PV modules are in parallel, need to check that Vpm(system) = Vpm(module)
Check that Voc(system) is not more than SPT-XXYY range (Maximum open circuit voltage)
 
If PV modules are in series, need to check that Voc(system) = Voc(module) x Module in series
 
If PV modules are in parallel, need to check that Voc(system) = Voc(module)

What is the difference between Socket and Port?

Socket Sockets allow communication between two different processes on the same or different machines. To be more precise, it's a way to ...