Showing posts with label using. Show all posts
Showing posts with label using. Show all posts

Wednesday, November 9, 2016

PC BASED DC MOTOR SPEED AND DIRECTION CONTROL USING PWM AND BRIDGE

PC BASED DC MOTOR SPEED AND DIRECTION CONTROL USING PWM AND BRIDGE


ABSTRACT:


A pulse width modulator (PWM) is a device that may be used as an efficient DC motor speed controller or light dimmer. This project is a versatile device that can control DC devices which draw up to a few amps of current. The circuit may be used in either 12 or 24 Volt systems with only a few minor wiring changes. This device has been used to control the speed of the DC motor and to control brightness of an automotive tail lamp.

A PWM circuit works by making a square wave with a variable on-to-off ratio, the average on time may be varied from 0 to 100 percent. In this manner, a variable amount of power is transferred to the load.

The main advantage of a PWM circuit over a resistive power controller is the efficiency, at a 50% level, the PWM will use about 50% of full power, almost all of which is transferred to the load, a resistive controller at 50% load power would consume about 71% of full power, 50% of the power goes to the load and the other 21% is wasted heating the series resistor.

One additional advantage of pulse width modulation is that the pulses reach the full supply voltage and will produce more torque in a motor by being able to overcome the internal motor resistances more easily. Two push-to-on switches are provided for increasing / decreasing the speed of the motor.

Two more push-to-on switches are provided to rotate the motor in Clock wise / Counter clock wise direction. 16X2 LCD is connected to display the speed level of the motor and the direction. LED indication is also provided for visual indication.


A buzzer is provided for audio indication of DC motor speed variation and change in direction. Whenever the speed is increased / decreased, the system acknowledges by a short beep. This buzzer is driven by transistor driver circuit.



This project uses regulated 5V, 750mA & 12V, 500mA power supply. 7805 and 7812 three terminal voltage regulators are used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac out put of secondary of 230/12V step down transformer.









If you want to buy this project, drop email on technofieldsystems@gmail.com





Available link for download

Read more »

Using DialogFragments

Using DialogFragments


[This post is by David Chandler, Android Developer Advocate — Tim Bray]

Honeycomb introduced Fragments to support reusing portions of UI and logic across multiple activities in an app. In parallel, the showDialog / dismissDialog methods in Activity are being deprecated in favor of DialogFragments.



In this post, I’ll show how to use DialogFragments with the v4 support library (for backward compatibility on pre-Honeycomb devices) to show a simple edit dialog and return a result to the calling Activity using an interface.
For design guidelines around Dialogs, see the Android Design site.

The Layout

Here’s the layout for the dialog in a file named fragment_edit_name.xml.

<LinearLayout 
android_id="@+id/edit_name"
android_layout_width="wrap_content" android_layout_height="wrap_content"
android_layout_gravity="center" android_orientation="vertical" >

<TextView
android_id="@+id/lbl_your_name" android_text="Your name"
android_layout_width="wrap_content" android_layout_height="wrap_content" />

<EditText
android_id="@+id/txt_your_name"
android_layout_width="match_parent" android_layout_height="wrap_content"
android_inputType=”text”
android_imeOptions="actionDone" />
</LinearLayout>

Note the use of two optional attributes. In conjunction with android:inputType=”text”, android:imeOptions=”actionDone” configures the soft keyboard to show a Done key in place of the Enter key.

The Dialog Code

The dialog extends DialogFragment, and since we want backward compatibility, we’ll import it from the v4 support library. (To add the support library to an Eclipse project, right-click on the project and choose Android Tools | Add Support Library...).

import android.support.v4.app.DialogFragment;
// ...

public class EditNameDialog extends DialogFragment {

private EditText mEditText;

public EditNameDialog() {
// Empty constructor required for DialogFragment
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_edit_name, container);
mEditText = (EditText) view.findViewById(R.id.txt_your_name);
getDialog().setTitle("Hello");

return view;
}
}

The dialog extends DialogFragment and includes the required empty constructor. Fragments implement the onCreateView() method to actually load the view using the provided LayoutInflater.

Showing the Dialog

Now we need some code in our Activity to show the dialog. Here is a simple example that immediately shows the EditNameDialog to enter the user’s name. On completion, it shows a Toast with the entered text.

import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
// ...

public class FragmentDialogDemo extends FragmentActivity implements EditNameDialogListener {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
showEditDialog();
}

private void showEditDialog() {
FragmentManager fm = getSupportFragmentManager();
EditNameDialog editNameDialog = new EditNameDialog();
editNameDialog.show(fm, "fragment_edit_name");
}

@Override
public void onFinishEditDialog(String inputText) {
Toast.makeText(this, "Hi, " + inputText, Toast.LENGTH_SHORT).show();
}
}

There are a few things to notice here. First, because we’re using the support library for backward compatibility with the Fragment API, our Activity extends FragmentActivity from the support library. Because we’re using the support library, we call getSupportFragmentManager() instead of getFragmentManager().

After loading the initial view, the activity immediately shows the EditNameDialog by calling its show() method. This allows the DialogFragment to ensure that what is happening with the Dialog and Fragment states remains consistent. By default, the back button will dismiss the dialog without any additional code.

Using the Dialog

Next, let’s enhance EditNameDialog so it can return a result string to the Activity.

import android.support.v4.app.DialogFragment;
// ...
public class EditNameDialog extends DialogFragment implements OnEditorActionListener {

public interface EditNameDialogListener {
void onFinishEditDialog(String inputText);
}

private EditText mEditText;

public EditNameDialog() {
// Empty constructor required for DialogFragment
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_edit_name, container);
mEditText = (EditText) view.findViewById(R.id.txt_your_name);
getDialog().setTitle("Hello");

// Show soft keyboard automatically
mEditText.requestFocus();
getDialog().getWindow().setSoftInputMode(
LayoutParams.SOFT_INPUT_STATE_VISIBLE);
mEditText.setOnEditorActionListener(this);

return view;
}

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (EditorInfo.IME_ACTION_DONE == actionId) {
// Return input text to activity
EditNameDialogListener activity = (EditNameDialogListener) getActivity();
activity.onFinishEditDialog(mEditText.getText().toString());
this.dismiss();
return true;
}
return false;
}
}

For user convenience, we programmatically focus on the EditText with mEditText.requestFocus(). Alternatively, we could have used the <requestFocus/> tag in the layout XML to do this; however, in some cases it’s preferable to request focus programmatically. For example, an OnFocusChangeListener added in the Fragment’s onCreateView() method won’t get called if you request focus in the layout XML.

If the user focuses on an EditText, the soft keyboard will automatically appear. In order to force this to happen with our programmatic focus, we call getDialog().getWindow().setSoftInputMode(). Note that many Window operations you might have done previously in a Dialog can still be done in a DialogFragment, but you have to call getDialog().getWindow() instead of just getWindow(). The resulting dialog is shown on both a handset and tablet (not to scale):

The onEditorAction() method handles the callback when the user presses the Done key. It gets invoked because we’ve set an OnEditorActionListener on the EditText. It calls back to the Activity to send the entered text. To do this, EditNameDialog declares an interface EditNameDialogListener that is implemented by the Activity. This enables the dialog to be reused by many Activities. To invoke the callback method onFinishEditDialog(), it obtains a reference to the Activity which launched the dialog by calling getActivity(), which all Fragments provide, and then casts it to the interface type. In MVC architecture, this is a common pattern for allowing a view to communicate with a controller.

We can dismiss the dialog one of two ways. Here we are calling dismiss() within the Dialog class itself. It could also be called from the Activity like the show() method.

Hopefully this sheds some more light on Fragments as they relate to Dialogs. You can find the sample code in this blog post on Google Code.

References for learning more about Fragments:

  • Fragments Dev Guide


  • “Basic Training” on Fragments


  • Updating Applications for On-screen Input Methods


  • OnEditorActionListener


  • EditorInfo and IME options



Available link for download

Read more »

Sunday, November 6, 2016

SMS BASED PWM SPEED AND DIRECTION CONTROL OF DC MOTOR USING H BRIDGE AND GSM

SMS BASED PWM SPEED AND DIRECTION CONTROL OF DC MOTOR USING H BRIDGE AND GSM


ABSTRACT:


Nowadays there are various electronic equipments available for remote operation of electronic devices. But, the main disadvantage of these systems is that they can be operated only in short ranges and also less reliable. Thus, to overcome the above drawbacks, we are using one of the wireless communication technique i.e., GSM.


           GSM(Global Systems for Mobile Communication) is vastly used because of its simplicity in both transmitter and receiver design, can operate at 900 or 1800MHZ band, faster, more reliable and globally network. Here the system is capable of controlling the motor by receiving control messages from an authorized mobile number. Microcontroller is the heart of our system, which controls the overall operation of our system. System always alert for receiving SMS  from valid number then that particular messages are displayed on our LCD(Liquid Crystal Display) i.e., whether the motor should rotate in right shift or left shift with a speed of so and so.


We are using H-Bridge as an driver for our DC Motor because our Microcontroller cannot provide the maximum current to drive a DC Motor. GSM network operators have roaming facilities, user can often continue to use there mobile phones when they travel to other countries etc. In contrast, a microcontroller not only accepts the data as inputs but also manipulates it, interfaces the data with various devices, controls the data and thus finally gives the result.


This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac out put of secondary of 230/12V step down transformer.


BLOCK DIAGRAM:



If you want to buy this project, drop email on technofieldsystems@gmail.com



Available link for download

Read more »

Saturday, November 5, 2016

Motorcycle Shunt Regulator Circuit using SCR

Motorcycle Shunt Regulator Circuit using SCR


The circuit presented here is a Rectifier plus Regulator for a 3-Phase charging system of Motorcycles. The rectifier is full-wave and the regulator is shunt-type regulator.


By: Abu Hafss 


A motorcycles charging system is different from that on cars. The voltage alternator or generator on cars are electro-magnet type which are quite easy to regulate. Whereas, the generators on motorcycles are permanent magnet type. The voltage output of an alternator is directly proportional to the RPM i.e. at high RPM the alternator will produce high voltages more than 50V hence, a regulator becomes essential to protect the entire electrical system and the battery too.

Some small bikes and 3-wheelers which do not run at high speeds, only have 6 diodes (D6-D11) to perform full-wave rectification. They dont need regulation but those diodes are high ampere rated and dissipate a lot of heat during operation.

In bikes with proper regulated charging systems, normally shunt-type regulation is used. This is done by shorting out the alternators windings for one cycle of the AC waveform. An SCR or sometimes a transistor is used as shunting device in each phase.

The network C1, R1, R2, ZD1, D1 and D2 forms the voltage detection circuit, and it is designed to trigger at about 14.4 volts. As soon as charging system passes this threshold voltage, T1 starts conducting. This sends current to each gate of the three SCRs S1, S2 and S3, via current limiting resistors R3, R5 and R7. D3, D4 and D5 are important to isolate the gates from each other. R4, R6 and R8 help in draining any possible leakage from T1. S1, S2 & S3 should be heat-sinked and isolated from each other using mica insulator, if using common heat-sink.

For the rectifier, there are three options:

a) Six automotive diodes

b) One 3-phase rectifier

c) Two bridge rectifiers

All must be rated at least 15A and heat-sinked.


The automotive diodes are two types positive body or negative body hence, should be used accordingly. But they might be little difficult to contact to heat-sink.


If using two bridge rectifiers, they may be used as shown.



Bridge Rectifier

Automotive diodes


 
3-phase rectifier




Bridge Rectifier











Available link for download

Read more »

Wednesday, November 2, 2016

Remote Control Circuit Using Arduino

Remote Control Circuit Using Arduino



In this post, we are going to construct a remote control circuit for controlling home appliances using arduino microcontroller.


By: Girish Radhakrishnan


This circuit can turn on/off your gadgets using TV remote’s unused buttons or any other unused remote that may be lying in your junk box for ages.


The motto of this project is to help physically challenged persons, and help them to access the ON/OFF switching of the basic home appliances such as fans or lights independently.


The second objective is to enable the user to control the gadgets “Like a boss” without having to move from his or her existing position.


The circuit utilizes traditional IR based communication between transmitter and receiver.

This circuit is cent percent fool proof to other IR remotes, and other IR sources and less susceptible to errors.


The major problem with non-microcontroller based IR remote control circuit, which is found around the internet, is that it could turn ON/OFF with any IR based remote and can only control one device at an instant and also more susceptible to errors.


This circuit overcomes above specified issues, and we can control several gadgets on one remote and assign keys for specific gadgets.


Before proceeding this project you need to download the library files for arduino form this link and follow the instruction given below: https://github.com/z3t0/Arduino-IRremote


Instructions:


1) Click “clone or download” button form the given link and hit “Download ZIP”.


2) Extract the file and move “IRremote” folder to your library folder of Arduino.


3) Delete “RobotIRremote” folder from your arduino library. “RobotIRremote” has similar definition of “IRremote” library which clash and not able to upload the code to Arduino so, deletion/removal is mandatory.


By duplicating the above instruction your Arduino IDE software is ready for any/most of the IR based projects.


Assign keys for remote:


In our TV remote each key has unique hexadecimal code, which is used to recognize which key is pressed for an operation. Before uploading the final code to Arduino, you need to find what the hexadecimal codes for your keys are.


To do this construct the following circuit in breadboard and follow the instruction.





1) Open Arduino IDE and upload example code “IRrecv Demo”


2) Open serial monitor and press the key on remote that you want to use.


You’ll see hexadecimal code pop up as soon as you press the key. That’s the hexadecimal code for that particular key.


3) Do the same for other two keys (3 keys are given in this project for controlling 3 devices)


· We are going to use these hexadecimal codes in the main program and upload to arduino.

Program:

//-----------------Program developed by R.Girish-----------//
#include<IRremote.h>
int input = 11;
int op1 = 8;
int op2 = 9;
int op3 = 10;
int intitial1;
int intitial2;
int intitial3;
IRrecv irrecv(input);
decode_results dec;
#define output1  0x111    // place your code received from button A
#define output2  0x112   // place your code received from button B
#define output3  0x113  // place your code received from button C
void setup()
{
  irrecv.enableIRIn(); 
  pinMode(op1,1);
  pinMode(op2,1);
  pinMode(op3,1);
}
void loop() {
  if (irrecv.decode(&dec)) {
    unsigned int value = dec.value;
    switch(value) {
       case output1:
         if(intitial1 == 1) {       
            digitalWrite(op1, LOW);
            intitial1 = 0;          
         } else {                     
             digitalWrite(op1, HIGH);
             intitial1 = 1;         
         }
          break;
       case output2:
         if(intitial2 == 1) {
            digitalWrite(op2, LOW);
            intitial2 = 0;
         } else {
             digitalWrite(op2, HIGH);
             intitial2 = 1;
         }
          break;
       case output3:
         if(intitial3 == 1) {
            digitalWrite(op3, LOW);
            intitial3 = 0;
         } else {
             digitalWrite(op3, HIGH);
             intitial3 = 1;
         }
          break;         
    }
    irrecv.resume();
  }
}
//--------------Program developed by R.Girish-----------//






NOTE:

In the program:

#define output1 0x111 // place your code received from button A

#define output2 0x111 // place your code received from button B

#define output3 0x111 // place your code received from button C



· Place your 3 unique codes from your remote in this place of 111, 112, and 113 and upload the code. Hexadecimal codes will be from 0 to 9 and A to F, for example: 20156, 26FE789, FFFFFF.

· Place your code with “0x” (zero x).

Circuit diagram:

· Pressing key trips the relay ON and by pressing again it will turn off the relay.






Available link for download

Read more »

Thursday, October 27, 2016

Sinewave UPS Circuit using PIC16F72 Part 5

Sinewave UPS Circuit using PIC16F72 Part 5


In this write-up we try to understand in detail regarding the various possible faults that could be encountered while constructing the proposed sinewave UPS circuit using PIC16F72. and how to troubleshoot these issues effectively through simple steps.

Data provided by: Mr. hisham bahaa-aldeen (hisham2630@gmail.com)

Sinewave UPS Circuit using PIC16F72 Part-1
 
Sinewave UPS Circuit using PIC16F72 Part-2
 
Sinewave UPS Circuit using PIC16F72 Part-3
 
Sinewave UPS Circuit using PIC16F72 Part-4




SINEWAVE UPS TESTING AND FAULT FINDING


Construct the card thereby confirming each and every wiring, this includes LED connectivity, ON/OFF switch, feedback via inverter transformer, 6-volt mains sense to CN5, -VE of battery to card, +VE of battery to large heatsink.

Initially do not plug the transformer primary to the pair of small heat sinks.

Plug in battery +ve wire to PCB via MCB and 50-amp ammeter.

Prior to proceeding for the recommended testings be sure to check the +VCC voltage at the pins of U1 - U5 in the following sequence.

U1:pin#8 and 9: +5V, pin#3: +12V, pin#6: +12V, U2:pin#8 and 9: +5V, pin#3: +12V, pin6: +12V, U3: pin14: +5V, U4: pin20: +5V, pin1:+5V, U5: pin4:+5V.

1) Power Up the battery MCB and check the ammeter and also be certain it doesnt jump beyond 1-amp. If the ampere shoots then remove U1 and U2 briefly and switch ON the MCB again.


 2) Power ON by toggling the given ON/OFF switch of the inverter and check whether or not the relay clicks ON, illuminating the "INV" LED. If it doesnt then check the voltage at pin#18 of the PIC which is supposed to be 5V. If this is absent check components R37 and Q5, one of this may be faulty or incorrectly connected. If you find the "INV" LED not switching ON, check if the voltage at pin#25 of the PIC is 5V or not.

 If the above situation is seen to be normally executing, go to the next step as described below.

3) Using an oscilloscope test pin#13 of the PIC by alternately switching ON/OFF the inverter switch, you can expect to see a well modulated PWM signal appearing at this pinout each time the inverter mains input is switched OFF, if not then you can assume the PIC to be faulty, coding not implemented correctly or the IC is badly soldered or inserted in its socket.

If you succeed in getting the expected modified PWM feed over this pin, go to pin#12/in#14 of the IC and check the availability of 50Hz frequency on these pins, if not would indicate some fault in the PIC configuration, remove and replace it. If you are to get affirmative response on these pins, go to the next step as explained below.

4) The next step would be to test pin#10/pin#12 of the IC U3 (CD4081) for the modulated PWMs which are finally integrated with the mosfet driver stages U1 and U2. Additionally you would be also required to check the potential differences at pin#9/pin#12 which is supposed to be at 3.4V approximately, and at pin#8/pin#13 may be verified to be at 2.5V. Similarly verify pin#10/11 to be at 1.68V.

In case you fail to identify the modulated PWM across the CD4081 output pins, then you would want to verify the tracks terminating to the relevant pins of the IC CD4081 from the PIC, which could be broken or somehow the obstructing the PWMs from the reaching U3.
If all is fine, lets move to the next level.

 5) Next, attach the CRO with U1 gate, toggle the inverter ON/OFF and as done above verify the PWMs on this spot which are M1 and M4, and also the gates M9, M12, however dont be surprised if the PWM switching are seen out of phase M9/M12 as compared to M1/M4, thats normal.

If the PWMs are entirely absent on these gates, then you can check pin#11 of U1 which is expected to be low, and if found high would indicate that U1 may be running in the shut-down mode. To confirm this situation check voltage at pin#2 of U5 which could be at 2.5V, and identically pin#3 of U5 could be at 0V or under 1V, if its detected to be below 1V, then proceed and check R47/R48, but if the voltage is found to be above 2.5V then check D11, D9, along with mosfets M9, M12 and the relevant components around it to troubleshoot the persisting issue, until corrected satisfactorily..

 In case where the pin#11 of U1 is detected low and still you are unable to find the PWMs from pin#1, and pin#7 of U1, then its time to replace IC U1, which would possibly rectify the issue, which will prompt us to move to the next level below.

6) Now repeat the procedures exactly as done above for the gates of the mosfet array M5/M18 and M13/M16, the troubleshooting would be exactly as explained but with reference to U2 and the other complimentary stages which may be associated with these mosfets

7) After the above testing and confirmation are completed, now its finally time to hook up the transformer primary with the mosfet heatsinks as indicated in the sinewave UPS circuit diagram. Once this is configured, switch ON the inverter switch, adjust preset VR1 to hopefully access the required 220V regulated, constant sinewave AC across the output terminal of the inverter.
If you find the output to be exceeding this value or below this value, and void of the expected regulation, you may look for the following issues:
If the output is much higher, check voltage at pin#3 of the PIC which is supposed to be at 2.5V, if not then verify the feedback signal derived from the inverter transformer to connector CN4, further check voltage across C40, and confirm the correctness of the components R58, VR1 etc. until the issue is rectified.

8) After this attach an appropriate load to the inverter, and check the regulation, a 2 to 3 percent falter can eb considered normal, if still you fail a regulation, then check diodes D23----D26, you can expect one of these to be faulty or you may also try replacing C39, C40 for correcting the issue.

9) Once the above procedures are successfully completed, you can carry on by checking the LOW-BATT functioning. To visualize this try short circuiting R54 with the help of a pair of tweezers from the component side, which should instantly prompt the LOW-Batt LED to illuminate and the buzzer to beep for a period of around 9 seconds at the rate of  a beep per second approximately.

In case the above does not happen, you may check pin#4 of the PIC, which should be normally at above 2.5V, and anything lower than this triggers the low batt warning indication. If an irrelevant voltage level is detected here check whether or not R55 and R54 are in a correct working order.

10) Next up it would be the overload tripping feature which would need to be confirmed. For testing you can select a 400 Wait incandescent bulb as the load and connect it with the inverter output. Adjusting VR2 the overload tripping should initiate at some point on the preset rotation.
To be precise, check the voltage at pin#7 of the PIC where under correct load conditions the voltage will be over 2V, and anything above this level will trigger overload cut-off action.
With a sample 400 watt, try varying the preset and try forcing an overload cut -off to initiate, if this does not happen, verify voltage at pin#14 of U5 (LM324) which is supposed to be higher than 2.2V, if not then check R48, R49, R50 and also R33 any of these could be malfunctioning, if everythings correct here simply replace U5 with a new IC and check the response.
Alternatively you can also try increasing the R48 value to around 470K or 560k or 680K etc and check if it helps solving the issue.

11) When the assessment of inverter processing is finished, experiment with the mains changeover.Keep the mode switch in inverter mode (keep CN1 open) switch-ON the inverter, hook up the mains wire to the variac, step up the variac voltage to 140V AC and check the inv to mains changeover triggering occurs or not. If you find no changeover in that case confirm the voltage at pin2 of microcontroller, it needs to be > 1.24V, in case the voltage is smaller than 1.24V then inspect the sensing transformer voltage (6V AC at its secondary) or take a look at the components R57,R56.

Now that the changeover shows up scale down the variac voltage to below 90V and examine the mains-to-inverter changeover action is established or not. The changeover ought to happen since now the voltage at pin2 of microcontroller is less than 1V.

12) Soon after the above assessment is completed, experiment with the mains-changeover in the UPS mode. Enabling the mode-switch in the UPS mode (keep CN1 shorted) start the inverter, link up the mains wire to the variac, increment the variac voltage to around 190V AC and observe the UPS-to-mains changeover strikes or not. Should there be no changeover action then simply take a look at the voltage at pin2 of microcontroller, it needs to be over 1.66V, as long as the voltage is lower than 1.66V then simply confirm the sensing transformer voltage (6V AC at its secondary) or perhaps inspect the elements R57,R56.

Right after the changeover pops up, scale back the variac voltage to 180V and find out whether the mains-to-UPS changeover comes about or not. The changeover ought to strike since now the voltage at pin2 of microcontroller could be witnessed to be over 1.5V.

13) Eventually take a look at the customized charging of the attached battery. Hold the mode switch in the inverter-mode, administer mains and step up the variac voltage to 230V AC, and determine the charging current which should rise smoothly in ammeter.

Fiddle with the charging current by varying VR3, so that the current variation could be witnessed varying in the middle of around 5-amp to 12/15-amp. Just in case the charging current is seen to be much higher and not in a position to be scaled down at preferred level then you may try increasing the value of R51 to 100k and/or if still that does not improve the charging current to expected level then perhaps you can try decreasing the value of R51 to 22K, please bear in mind that once the sensed equivalent voltage at pin5 of microcontroller becomes at 2.5V the microcontroller may be expected to regulate the PWM and consequently the charging current.

In the course of the charging mode remember that, precisely the lower branch of MOSFETs (M6 -M12 / M13 - M16) are switching @8kHZ while the upper branch of MOSFETs are OFF.

14) Additionally you can inspect the operation of the FAN, FAN is ON each time the inverter is ON, and FAN could be seen switched OFF whenever the inverter is OFF. In a similar manner FAN is ON as soon as Charging is ON and FAN will be OFF when charging is OFF

Available link for download

Read more »

Monday, October 24, 2016

MPPT Circuit using PIC16F88 with 3 Level Charging

MPPT Circuit using PIC16F88 with 3 Level Charging


An MPPT as we all know refers to maximum power point tracking which is typically associated with solar panels for optimizing their outputs with maximum efficiency. In this post we learn how to make a PIC16F88 microcontroller based MPPT circuit with a 3-stage charging.

This data was donated by: Mr. hisham bahaa-aldeen (hisham2630@gmail.com)



The optimized output from MPPT circuits is primarily used for charging batteries with maximum efficiency from the available sunshine.

New hobbyists normally find the concept to difficult and get confused with the many parameters associated with MPPT, such as the maximum power point, "knee" of the I/V graph etc.

Actually theres nothing so complex about this concept, because a solar panel is nothing but just a form of power supply.

Optimizing this power supply becomes necessary because typically solar panels lack current, but posses excess voltage, this abnormal specs of a solar panel tends to get incompatible with standard loads such as 6V, 12V batteries which carry higher AH rating and lower voltage rating compared to the panel specs, and furthermore the ever-varying sunshine makes the device extremely inconsistent with its V and I parameters.

And thats why we require an intermediate device such as an MPPT which can "understand" these variations and churn out the most desirable output from a connected solar panel.

You might have already studied this simple IC 555 based MPPT circuit which is exclusively researched and designed by me and provides an excellent example of a working MPPT circuit.

The basic idea behind all MPPTs is to drop or trim down the excess voltage from the panel according to the load specs making sure that the deducted amount of voltage is converted into an equivalent amount of current, thus balancing the I x V magnitude across the input and the output always up to the mark...we cannot expect anything more than this from this useful gadget, do we?

The above automatic tracking and appropriately converting the parameters efficiently is implemented using a PWM tracker stage and a buck converter stage, or sometimes a buck-boost converter stage, although a solitary buck converter gives better results and is simpler to implement.

In this post we study an MPPT circuit which is quite similar to the IC 555 design, the only difference being the use of a microcontroller PIC16F88 and an enhanced 3-level charging circuit.


MPPT Circuit using PIC16F88 with 3-Level Charging



The basic function of the various stages can be understood with the help of the following description:

1) The panel output is tracked by extracting a couple of information from it through the associated potential divider networks.

2) One opamp from IC2 is configured as a voltage follower and it tracks the instantaneous voltage output from the panel through a potential divider at its pin3, and feeds the info to the relevant sensing pin of the PIC.

3) The second opamp from IC2 becomes responsible for tracking and monitoring the varying current from the panel and feeds the same to another sensing input of the PIC.

4) These two inputs are processed internally by the MCU for developing a correspondingly tailored PWM for the buck converter stage associated with its pin#9.

5) The PWM out from the PIC is buffered by Q2, Q3 for triggering the switching P-mosfet safely. The associated diode protects the mosfet gate from overvolatges.

6) The mosfet switches in accordance with the switching PWMs and modulates the buck converter stage formed by the inductor L1 and D2.

7) The above procedures produce the most appropriate output from the buck converter which is lower in voltage as per the battery, but rich in current.

8) The output from the buck is constantly tweaked and appropriately adjusted by the IC with reference to the sent info from the two opamps associated with the solar panel.

9) In addition to the above MPPT regulation, the PIC is also programmed to monitor the battery charging through 3 discrete levels, which are normally specified as the bulk mode, absorption mode, an the float mode.

10) The MCU "keeps an eye" on the rising battery voltage and adjusts the buck current accordingly maintaining the correct Ampere levels during the 3 levels of charging procedure. This is done in conjunction with the MPPT control, thats like handling two situations at a time for delivering the most favorable results for the battery.

11) The PIC itself is supplied with a precision regulated voltage at its Vdd pinout through the IC TL499, any other suitable voltage regulator could be replaced here for rendering the same.

12) A thermistor can be also seen in the design this may be optional but can be effectively configured for monitoring the battery temperature and feeding the info to the PIC, which effortlessly processes this third information for tailoring the buck output making sure that the battery temperature never rises above unsafe levels.

13) The LED indicators associated with the PIC indicate the various charging states for the battery which allows the user to get an up-to-date information regarding the charging condition of the battery throughout the day.

14) The proposed MPPT Circuit using PIC16F88 with 3-Level Charging supports 12V battery charging as well as 24V battery charging without any change in the circuit, except the values shown in parenthesis and VR3 setting which needs to be adjusted to allow the output to be 14.4V at the onset for a 12V battery and 29V for a 24V battery.

The next article gives the access to the entire source code for the above discussed MPPT circuit using PIC16F88

Available link for download

Read more »

Saturday, October 22, 2016

Sinewave UPS Circuit using PIC16F72 Part 2

Sinewave UPS Circuit using PIC16F72 Part 2


In this post we study the mosfet switching stage built for the proposed sinewave UPS circuit using PIC16F72.

Data provided by: Mr. hisham bahaa-aldeen (hisham2630@gmail.com)


Sinewave UPS Circuit using PIC16F72 Part-1
 
Sinewave UPS Circuit using PIC16F72 Part-3
 
Sinewave UPS Circuit using PIC16F72 Part-4

Sinewave UPS Circuit using PIC16F72 Part-5






MOSFET Switching:



Check with MOSFET switching circuit diagram below:





In this case U1 (IR2110) and U2 (IR2110) high side / low side mosfet driver are employed, check with data sheet of this IC to understand more. In this the two MOSFET banks with high side and low side MOSFETs are intended for transformer’s primary side switching.

In this case we are discussing the functioning of bank (applying IC U1) only since the supplementary bank driving does not differ from from each other.


As soon as the inverter is ON the controller renders the pin10 of U1 is logic high which subsequently activates the high side MOSFETs (M1 - M4) ON, PWM for channel-1 from pin10 of CD4081 is applied to pin12 of the drver IC (U1) and likewise it is administered to the base of Q1 via R25.

While the PWM is logic high the pin12 of U1 is also logic high and triggers the low side MOSFETs of bank 1(M9 - M12), alternately it launches the transistor


Q1 which correspondingly renders the pin10 voltage of U1 logic low, thereupon turning OFF the high side MOSFETs (M1 - M4).


Therefore it implies that by default the high logic from pin11 of the microcontroller gets switched ON for the high side MOSFETs among the two the mosfet arrays, and while the associated PWM is high the low side MOSFETs are turned ON and the high side MOSFETs are switched OFF, and through this way the switching sequence keeps repeating.

Mosfet Switching Protection


Pin11 of U1 can be used for executing the hardware locking mechanism of each of the drivers units.

By standard fixed mode this pin may be seen fixed with a low logic, but whenever under any circumstance the low side MOFET switching fails to initiate (lets assume through o/p short circuit or erroneous pulse generation at the output), the VDS voltage of low side MOSFETs can be expected to shoot up which immediately causes the output pin1 of comparator (U4) to go high and become latched with the help of  D27, and render pin11 of U1 and U2 at high logic, and thereby toggle OFF the two the MOSFET driver stages effectively, preventing the MOSFETs from getting burnt and damaged.


Pin6 and pin9 is of +VCC of the IC (+5V), pin3 is of +12V for MOSFET gate drive supply, pin7 is the high side MOSFET gate drive, pin5 is the high side MOSFET receiving route, pin1 is the low side MOSFET drive, and pin2 is the low side MOSFET receiving path. pin13 is the ground of the IC (U1).

Available link for download

Read more »

Sunday, October 16, 2016

Sinewave UPS Circuit using PIC16F72 Part 4

Sinewave UPS Circuit using PIC16F72 Part 4


In this page we learn specifically about the battery charging operations using PWM technique as configured for the proposed sinewave UPS circuit using PIC16F72.


Data provided by: Mr. hisham bahaa-aldeen (hisham2630@gmail.com)


Sinewave UPS Circuit using PIC16F72 Part-1
 
Sinewave UPS Circuit using PIC16F72 Part-2
 
Sinewave UPS Circuit using PIC16F72 Part-3

Sinewave UPS Circuit using PIC16F72 Part-5

 

BATTERY CHARGING:



In the course of MAINs ON Battery charging may be seen initiated. As we may understand while in battery charging mode the system may be functioning using the SMPS technique, let us now understand the working principle behind it.


To charge the battery the output circuit (MOSFET and Inverter transformer) becomes effective in the form of a boost converter.


In this case all the low side MOSFETs of the two the mosfet arrays work in sync as a switching stage while the primary of the inverter transformer behave as an inductor.

As soon as all of the low side MOSFETs are switched-ON the electric power gets accumulated in the primary section of transformer, and as soon as the MOSFETs are OFF this accumulated electric power is rectified by the in-build diode inside the MOSFETs and the DC is kicked back to battery pack, the measure of  this boosted voltage would depend on the ON-time of the low side MOSFETs or simply mark/space ratio of the duty cycle used for the charging process.


PWM WORKING


While the equipment may be conducting in the mains-on mode, the charging PWM (from pin13 of micro) is progressively augmented from 1% to highest specification, in case the PWM raises the DC voltage to the battery, the battery voltage too increases which results in a surge in the battery charging current.

The battery charging current is monitored across the DC fuse and negative rail of the PCB and the voltage is additionally intensified by the amplifier U5 (pin8, ppin9 and pin10 of the comparator) this amplified voltage or detected current are applied to the pin5 of microcontroller.

This pin voltage is scheduled in software in the form of 1V, as soon as the voltage in this pin is rises above 1V the controller may be seen restricting the PWM duty cycle until finally its pulled down to below 1V, assuming the voltage on this pin is decreased to below 1V the controller would instantly begin improving the full PWM output, and the process may be expected to go on in this manner with the controller upholding the voltage on this pin at 1V and consequently the charging current limit.

Available link for download

Read more »

Tuesday, October 11, 2016

Using Wireless Network on Your Android Phone

Using Wireless Network on Your Android Phone



We should be living in a remote future, yet were not exactly there yet. Still, numerous things we do with links dont really require links any longer — you can run sans wire with only a couple changes.

There are still reasons you may feel you need to join your telephone to your PC or plug in a link, yet those can be kept away from with these traps.

Remote File Transfers

AirDroid can be utilized for some things, including messaging by means of your Android telephone on your PC like Apples iMessage. In any case, AirDroid likewise incorporates a document supervisor. That document chief permits you to remotely exchange records forward and backward — for instance, moving music documents to your telephone or exchanging photographs to your PC — by means of a web program or desktop application. Everything works totally remotely, and it can work completely over a nearby Wi-Fi association. It essentially transforms your Android telephone into a little web server when you have the application running.

Use Dropbox, Google Drive, OneDrive, and Other Cloud Storage Services

As opposed to utilizing an application like AirDroid, you can simply depend on your preferred distributed storage administration rather — that implies something like Dropbox, Google Drive, or Microsofts OneDrive.

Transfer a record to your distributed storage from your telephone — potentially utilizing the advantageous Android Share catches youll discover in about each application or a full-included document supervisor — and it can consequently match up to your PC. Add a record to your distributed storage on your PC and itll show up in the proper application on your telephone so you can get to it from that point.

Exchange Photos (and Screenshots) With Dropbox, Google Plus, OneDrive, and the sky is the limit from there

Photograph exchanges are significantly less demanding than document exchanges. Numerous applications can naturally transfer photographs you take to a distributed storage administration, where theyll be synchronized to your PC remotely. For instance, Dropbox and Microsoft OneDrive both have an "auto-transfer" include that will consequently transfer photographs you take, and theyll be synchronized straight to your PC so you can get to them where you require them. Google Plus additionally has a comparative programmed photograph transfer highlight, however the photographs you transfer will be sent to Google+ Photos and not downloaded naturally to your PC.

These applications treat screenshots the same, too. You can take a screenshot of your Android telephone and it will be naturally transferred to your distributed storage account and downloaded straight to your PC with no extra taps on your screen, a great deal less a link.

Use ADB Commands Over a Wireless Connection

RELATED ARTICLE

The most effective method to Install and Use ADB, the Android Debug Bridge Utility

ADB, Android Debug Bridge, is an order line utility included with Googles Android SDK. ADB can control your gadget over USB... [Read Article]

Indeed, even the ADB order — expected for engineers, additionally utilized by aficionados who need to open root and do different other intense things to their telephones — can be utilized remotely on the off chance that you dont need keep your telephone joined with a PC.

Sadly, this requires a link to set up the association. Be that as it may, after you have, you can disengage the link and keep utilizing adb summons remotely until you end the adb association. That implies you can control and control your telephone from your PC without the link.

Googles official adb documentation offers directions for utilizing adb remotely.

Charge Your Phone Wirelessly (or Use a Dock)

A significant number of Android telephones have fabricated in remote charging equipment, so you may not even need to connect to your telephone when its a great opportunity to squeeze up its battery. Simply get a good remote charger and place your telephone on the remote charger to charge it.

Telephones like Googles own particular Nexus telephones coordinate this, and there are approaches to add on remote charging regardless of the possibility that your telephone doesnt have it. Theres dependably the choice of a remote charging case — a case you put your telephone into increase remote charging — and Samsungs telephones with removable plastic backs and batteries can likewise regularly have their backs swapped out for equipment that is perfect with remote charging.

Remote charging is cool and advanced, yet it is less effective, slower, and shockingly finicky. You truly need to set the telephone on the charger in a sure place. You could simply skirt all that and get a dock you can embed your telephone into when its an ideal opportunity to charge.

Get Bluetooth Headphones

You may at present end up uniting a couple of earphones to your telephone when you have to listen to something, however you dont need to! You could utilize a couple of Bluetooth earphones or earbuds to listen to everything remotely and dodge all the tangled earphone links.

You will need to charge the Bluetooth earphones, which is the exchange off. In any case, Bluetooth earphones are showing signs of improvement and better. Because of advancements like Bluetooth low vitality, were currently beginning to see remote earbuds. A few organizations were demonstrating to them off at CES 2015, and theyll ideally come to showcase this year.

bluetooth earphones

On the off chance that you need to live in the without wire future, you can begin today. Whenever youre going to haul out a USB link — or even a charging link or earphone link — consider it for a minute.

Available link for download

Read more »

Friday, October 7, 2016

Sinewave UPS Circuit using PIC16F72 Part 1

Sinewave UPS Circuit using PIC16F72 Part 1


The proposed sinewave inverter UPS circuit is built using PIC16F72 microcontroller, some passive electronic components and associated power devices.

Data provided by: Mr. hisham bahaa-aldeen (hisham2630@gmail.com)


Sinewave UPS Circuit using PIC16F72 Part-2
 
Sinewave UPS Circuit using PIC16F72 Part-3
 
Sinewave UPS Circuit using PIC16F72 Part-4

Sinewave UPS Circuit using PIC16F72 Part-5

Main Features:

The main technical features of the discussed PIC16F72 sinewave inverter may be evaluated from the following data:

Power output (625/800va) fully customization and can be upgraded to other desired levels.
Battery 12V/200AH
Inverter Output Volt : 230v (+2%)
Inverter Output Frequency : 50Hz
Inverter Output Waveform : PWM Modulated Sinewave
Harmonic Distortion : less  than 3%
Crest Factor : less than 4:1
Inverter efficiency : 90% For 24v System, around 85% with 12v System
Audible Noise : less 60db At 1-meter


Inverter Protection Features

Low-battery Shut-down
Overload Shut-down
Output Short Circuit Shut-down


Low-battery Detection and Shutdown Feature

Beep Start initiated at 10.5v (beep At Every 3-sec)
Inverter Shut-down at around 10v (5 pulses of beep in every 2-sec)
Over Load : Beep Initiated at 120% Load (beep at the rate of 2-sec)
Inverter Shut-down at 130% Overload (5 pulses of beep in every 2-sec)


LED Indicators are provided for the following:
Inverter On
Low-battery - Flashing in Low battery mode with Alarm
Solid ON During Cut-OFF
Over Load - Flashing at Overload cut-off with Alarm
Solid ON During Cut-OFF
Charging mode - Flashing at Charging mode
Solid ON During Absorption
Mains Indication - LED On


Circuit Specifications

8-bit Microcontroller Based Control Circuit
H-bridge Inverter Topology
Mosfet Switching Fault Detection
Charging Algorithm : Mosfet PWM based switch mode Charger Controller 5-amp/15-amp
2-step Charging Step-1: Boost Mode (led Flash)
Step-2: Absorption Mode (led On)
DC Fan initialization for Internal Cooling During Charging/inv Operation

Circuit Diagram:




PIC Codes can be viewed HERE

PCB details are provided HERE


The following explanation provides the details of the various circuit stages involved in the design:

In Inverter Mode


As soon as mains fails, the battery logic is detected at pin#22 of the IC which instantly prompts the controller section to switch the system in the inverter/battery mode.

In this mode the controller begins generating the required PWMs via its pin#13 (ccp out), however the PWM generation rate is implemented only after the controller confirms the logic level at pin#16 (INV/UPS switch).

If a high logic is detected at this pin (INV mode) the controller initiates a fully modulated duty cycle which is around 70%, and in case of a low logic at the indicated pinout of the IC, then the controller may be prompted to generate burst of PWMs ranging from 1% to 70% at a rate of 250mS period, which is termed as soft delay output while in the UPS mode.

The controller simultaneously with the PWMs also generates a "channel select" logic through pin#13 of the PIC which is further applied to pin#8 of the IC CD4081.

Throughout initial time period of the pulse (i.e 10ms) the pin12 of the PWM controller is rendered high such that the PWM can be obtained from pin10 of CD4081 exclusively and after 10mS, pin14 of controller is logic high and the PWM is accessible from pin11 of CD4081, as a result using this method a pair of anti-phased PWM becomes accessible to switch on the MOSFETs.


Aside from that a high logic (5V) becomes accessible from pin11 of the PWM controller, this pin turns high each time inverter is ON and ends up being low whenever inverter is OFF. This high logic is applied to pin10 of each the MOSFET drivers U1 and U2, (HI pin) to activate the high side MOSFETs of the two the mosfet banks.


For upgrading the proposed Sinewave UPS using PIC16F72, the following data may be used and implemented appropriately.



 The following data supplies the full transformer winding details:






Feedback from Mr. Hisham:

Hi mr swagatam ,how are you? 


I want to tell you that pure sine wave inverter using pic16f72 schematic have some mistakes,220uf bootstrap capcitor should be replaced with a (22uf or 47uf or 68uf),,,a 22uf capacitors which is connected between pin 1 and pin2 of the 2s ir2110 is wrong and should be removed, also a hex code called eletech. Hex should not be use cause its make inverter shutdown after 15 seconds with low battery led and buzer beeps, if you have big dc fan so the transistors should be replaced with a higher current,for mosfets safety a 7812 regulator is recommended to be connected to ir2110...also theres d14,d15 and d16 should not be connected to ground.


I have tested this inverter and its really pure sine wave,i have run a washing machine and its running silently without any noise, i have connected a 220nf capcitor in the ouput instead of 2.5uf, refrigerator is working too, i will share some pictures soon.
Best regards

 



  The schematic discussed in the above article was tested and modified with a few appropriate corrections by Mr. Hisham, as shown in the following images, viewers can refer to these for improving the performance of the same:



Available link for download

Read more »

Thursday, October 6, 2016

Testing Alternator Current using Dummy Load

Testing Alternator Current using Dummy Load


The post explains a method of checking or verifying alternator maximum current delivering capacity using a shunt regulator as the dummy load and an ammeter. The idea was inquired by Mr. Joe.


Question

Hi Sir,
I need help designing an electronic dummy load that can handle high enough power from motorcycle alternator. I need to know how much power is available from the alternator because when I first time finished rewound the alternator, it shows me 7A of power from two winding set (my alternator is modified by adding another winding on outer layer of existing winding). But now it only shows about 4A of power from the two winding set. Is it best to use electronic dummy load or just simple resistive load as resistive load is only work in certain voltage range (thats what I know) to test the alternator.
Kindly need your help for the circuit design.

Thanks and regards,

Joe

My Reply


Hi Joe, did you try using your digital mulltimeter with a shunt regulator. You can set the meter to the maximum current range, normally this could be at 20Amp AC range and check the results by connecting its prods at the output of the shunt regulator and input of the shunt with the alternator winding output. This should provide you with the necessary information??

The Design

I have already discussed a simple shunt regulator circuit in one of my earlier posts, we can implement the same shunt regulator circuit as a dummy load for the proposed testing of alternator current, through an ammeter in series with the shunt device.

Although an ammeter can be directly connected with the alternator output for measuring its current capacity, a shunt regulator ensures a controlled measurement of the measurement over a specified voltage limit.

Meaning if the alternator is rated to generate a fluctuating voltage say from12V to 24v, the shunt regulator could be set to dump the excess voltage above 12V and control the alternator voltage at this level.

However for the meter this might have no notable effect except a little stress-free working due to the controlled voltage level.

The following circuit shows how to use a shunt regulator as a dummy load with a ammeter for testing alternator current safely and accurately.



Testing Alternator Curent using Dummy Load


Available link for download

Read more »