top of page

Search Results

109 items found for ""

  • SolidStateRelay | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    Solid State Relay / Switch Most of the times you may require to control gadgets/equipments (like motors, bulbs, heaters) working on 230VAC (mains) supply, using electronic circuit or micro-controller. Normally, relays are used for on/off control for the mains operated gardges. Due to electromagnetic operation, the contacts move and makes noise during on/off the mains circuit. The circuit used here can switch on/off the mains circuit silently and does not have any moving parts. The project consists of three sections for safe working and isolation from the mains supply. 1) Triac section consists of BT136 with heatsink and discrete components to control (on/off) the load on mains power supply side. 2) Reistor Network consists of 4 resistors in series to control using any of 3.3VDC / 5VDC / 9VDC / 12VDC supply. 3) Isolation is obtained from IC MOC3021 , which has an LED and DIAC concealed in 6 pin DIP package. ​ The full circuit diagram of Solid State Relay / Switch is shown below: The circuit is simple and almost self explanatory as per the three sections listed above. Scrubbers (resistance and capacitors in series) are added wherever required for Triac and Diac. Care and safety should be observed, while wiring the mains power lines. Never touch the circuit (mains side), while power is on. ​ Working Principle: ​ The LED in the MOC3021 glows (or switched on), due to appropriate DC power supply (marked in the circuit). through resistance network. Due to LED light falling on the Diac, inside the MOC3021, the Diac starts conducting and Triac (BT136) gets triggered. This makes flow of current through the Triac and completes the AC mains circuit loop, which switches ON the connected load. ​ For control (switch on/off) more current or wattage, use BTA16 or BTA41 Triac. In addition to same pin outs (as marked in the circuit) and high power control, the BTA Triacs have tab insulation also (so, more safe). ​ Maximum allowed Current flow through BT136 is 4A, BTA16 is 16A and BTA41 is 41A. So you may select appropriate Triac to suit your requirements. ​ CAUTION: 1) Never touch the circuit, when mains power is ON. 2) Use 6 pin IC base for MOC3021 and test any leakage between the pins, before inserting the IC. 3) Use mica insulation between Triac and heat sink.

  • SonarRadar | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    Sonar RADAR The Sonar RADAR, is to find any obstacle within a distance range by oscillating Ultrasonic Sensor fitted on a Stepper motor shaft. The distance of obstacle(s) are read by the ATMEGA16 micro-controller for each step of Stepper Motor and the distance is proportionally represented as a ray on GLCD (Graphical Liquid Crystal Display). ​ ATMEAG16 is 40 pin Micro-controller is selected for the project, since GLCD requires more pins for its display system. ATMEAGA16 works on 1MHz default clock frequency, is heart of the system. ​ GLCD (JHD12864E) display used in this project, has good viewing size of pixel size (0.48mm x 0.48 mm) and screen area (66mm X33mm approx.) with 128 x 64 pixel resolution, works on 5VDC supply. It has 20 pins, out of which 2 for power supply, another 2 for back-light LED, on extreme ends. 8 pins are used as data lines and 6 pins for control lines and two pins (3 and 18) are for contrast adjustment. The screen is logically divided into two panes as 64X64 pixels on left side and 64X64 pixels on right side, which makes 128X64 pixels in total. The left side pane is selected using CS1 pin and similarly right side pane is selected using CS2 pin. The data and command to GLCD is transmitted in 8 bit format by selecting RS pin setting high/low. The following two functions are used to write pixels and lines as rays, on the GLCD in source code. GLCD_writePixel ( int x, int y ) GLCD_showRay ( long dist, float xstep ) ​ ​ Working Concept/Description: The circuit shown below should be made on a general purpose PCB, except, Stepper Motor and Ultrasonic sensor (HC-SR04). The Ultrasonic Sensor should be placed above the Stepper motor shaft, using proper wheel and fixing arrangement ( view video ), so that, the ultrasonic sensor, rotates to a particular angle, matching to stepper motor shaft. ​ The ATMEAG16 continuously generates/reads signals and process them in the following order in a while loop: 1) Rotates the Stepper motor in a specified steps. 2) Sends Trigger pulse to Ultrasonic Sensor. 3) Reads the Echo pulse timing 4) Calculates the distance. 5) Draws a line (ray) proportional to the distance. 6) Once the motor rotates required number of steps, then, it rotates in opposite direction, which makes oscillations of ultrasonic sensor. The DC power supply (8V to 12V) is connected to Stepper motor driver. A 5VDC is derived from the same board, which is used as power supply for micro-controller, ultrasonic sensor and GLCD. In case, the board does not have the 5VDC output, then use separate 5VDC supply through IC 7805. ​ Full circuit-diagram is available below: ​Initial Setup and Usage: After assembling the circuit on a PCB, connect 8V to 12V DC power supply to the stepper motor control board and switch ON the power switch SW_1 Then load/burn the SonarRadar.hex file to the Micro-controller (ATMEGA16) using AVR programmer. You may connect Stepper motor, Ultrasonic sensor and GLCD before or after writing HEX file to ATMEGA16. Once you upload and switch ON the power supply to the circuit board, two types of triangular patterns will be displayed for a while, which is a self-test for the GLCD, then the radar system starts. Then, the stepper motor rotates with fixed steps, which changes the angle of ultrasonic sensor direction, for each step. The ATMEGA16, reads the distance using ultrasonic sensor at that angle and a line is drawn like a ray on the GLCD proportional to the calculated distance. ​ In case, the stepper motor is not rotating to the required direction, then change the input and/or output connections of the stepper motor, until it rotates to match the direction of rays drawn on the GLCD. CODING: The code is developed using C language and compiled using AVR studio 4. The code may be uploaded/ written to ATMEGA16 microcontroller (MCU) using any suitable AVR programmer through ISP port as shown in the circuit. All the Variables and functions are named for easy identification of purpose using prefix name for easy identification of the controlling component The user define variables are defined initially in the SonarRadar.C file like, #define STEPPER_DELAY 25 // delay to settle the stepper #define STEPPER_STEPS 3 // number of step signals sent to stepper driver So, the value may be varied as per requirement and recompile using AVRstudio4 (or next version) and upload to ATMEGA16. click the link / attachment to download the file and rename as SonarRadar.HEX , then upload to ATMEAGA16 using any suitable AVR programmer. SonarRadar.HEX For source code (in C-language), (SonarRadar.C) please send message through contact form . The code will be sent to your e-mail. Knowing is not enough; we must apply Willing is not enough; we must do – johaan wolfgang von goethe

  • LEDs | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    LEDs: LED (means L ight E mitting D iode) is a semiconductor, works like a normal diode, but emits light in forward bias mode. It means LED releases energy in the form of photons when current flows through it. The flow of current is blocked when it is connected in reverse bias mode. The voltage drop across an LED is about 2.0V to 3.0V in forward bias (when the LED glows), depends on size, colour of the light it emits and manufacturer. ​ The maximum (or safe) current limit, in milliAmps, for an LED depends on its diameter (size) and approximately equal to its diameter in forward bias. eg: 3mm LED = 3mA, 5mm LED = 5mA and 10mm LED = 10mA etc. The brightness of light emitted depends on the current flowing though it. ​ To limit current flowing in an LED, connected at higher voltage than its forward bias, a resistor is used in series. The resistor value in series should be such that, the voltage across the LED should be approximately equals to voltage required to glow the LED and should not exceed the safe current limit of the LED. ​ eg: Assume an LED is to be connected across 12VDC in forward bias (for glowing as indicator). The voltage drop across the LED is about 2.7V and current flow through the LED is 3 mA (i.e. 0.003A). ​ sol: The voltage should be shared by the LED and resistor. since LED requires 2.7V, the remaining voltage should be dropped across the resistor. i.e., 12V – 2.7V = 9.3V. ​ Using ohm’s law, R = V / I , required resistance, R = 9.3V/0.003A. therefore, Resistance required = 3100 ohms. since, the resistance value is not a standard one, we may select 3300 ohms (3.3Kohms) resistor. ​ Once, resistance value is set, now the actual current may be calculated using formula I = V / R, i.e., 9.3 / 3300 = 0.0028A (2.8 mA). The resistance power requirement may be calculated by multiplying Voltage and Current across the resistor. so, 9.3V x 0.0028A =0.026W (26mW or above). The LED should NOT be connected in reverse bias above its breakdown voltage. The breakdown voltage depends on model and manufacturing company. In general, the breakdown voltage for an LED may be considered as 5V, but, some LEDs may withstand up to 20V in reverse bias (refer datasheets). The following coloured lighting may be available on various LEDs: Red, Green, Yellow, Blue, Amber, White, Infrared etc. Some LEDs have the same body colour of light called Diffusion LEDs and some LEDs have transperent (glass like) body, but, emits various colours of light. Multi-coloured LEDs: Some multiple colour light emitting LEDs are concealed in to a single LED and identified with more than two leads connection. ​ In general Red-Green LED have three leads, one for red (anode) another for green (anode) and third one is common (cathode) to both. They are available in common anode and common cathode models. ​ Similarly, Red-Green-Blue LED have four leads, three for three colours and forth one is common. ​ Some LEDs have two leads, but, built-in chip with three colored (RGB) LEDs, which changes their colour automatically in a fixed time period. More varieties of LEDs are available now-a-days. i.e., Infra-Red rays emitting (IR) LEDs , UltraViolet rays emitting (UV) LEDs etc., which are explained in Sensors section. ​ Power LEDs: Power LED is similar to normal LED in operation, except its high current carrying capacity. Power LEDs emit more and bright lighting. Power LEDs are available in 0.5W, 1W, 2W etc. To know its current requirement of a power LED, divide the Power by the Voltage drop across the LED. eg: 2W LED requires 2W/3V = 0.667A (667 mA) approximately. Some power LEDs are available along with heat sink fitted beneath them LED Strip: A number of LEDs are connected in series with a resistance as a set on a flexible strip, which may connected directly to a particular voltage (say 12VDC). These sets are again connected in parallel to make a long (infinite) strip, so that all sets may be connected to a single DC power supply. SMD LED: LEDs are available in SMD (Surface Mount Devices) size also. They are tiny in size, anode (+ve) and cathode (-ve) are marked on the LED.

  • MicroController | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics


  • SmartDesktopPowerSupply | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    Smart All in 1 Desktop Power Supply The Smart All in One Desktop Power Supply is a dream project of an electronics hobbyist and also useful for the persons, who repairs electronic gadgets. The following features are available with the Smart All-in-1 Desktop Power supply: 1) + and - 3V 5V 8V 12V 15V Fixed DC supply 2) + and - 30V Variable/Adjustable DC supply 3) + and - 50V DC voltmeter and 5A ammeter 4) USB Port power supply (5VDC) for Arduino projects 5) ZENER METER for knowking actual voltage drop against zener or diodes 6) Continuity Meter to check wires, diodes, LEDs etc., 7) AC mains power supply socket and control switch 8) TRIAC controlled AC power supply 9) Convenient Soldering Stand placement 10) Flexible Focus light using 12VDC LED strip 11) Magnet placing for holding small screws etc. 12) Top flat space for keeping Multimeter and project items 13) Bottom slot for keeping frequently used items, like soldering related items etc. ​ The project uses multiple modules in one cabinet. Each module is explained separately in the website and the links for modules are available at the end of the page. ​ The connections and usage of the modules are shown and explained as separate circuit diagrams. Refer circuit diagrams used in the project: The A.C. mains wiring is one of the main circuit shown here. All the modules will receive power from mains. Here, two AC power sockets are provided. Power for one socket is controlled directly through a switch and another socket is through a switch and a Triac (BTA41) circuit. ​ LED indicators are provided each switch control to know the status of switch and output AC power at AC power sockets. ​ A transformer having dual outputs (24VAC-0-24VAC and 0-12VAC , 5A max.) is used for this project. ​ Separate bridge rectifiers and filter capacitors are used for the dual outputs to get -35V, +35v and +17V D.C. outputs (when no load condition). ​ Dual Variable DC output module and combined Voltmeter and Ammeter Module are used in the project, which are very useful to get positive and negative variable power supplies and the Voltage and Current values may be known instantly. A stepped D.C. power supply module is used to have -15V, -12V, -8V, -5V, -3V, +3V, +5V, +8V, +12V and +15V. ​ LM337 and LM317 circuits are used as prefix to reduce the incoming voltage from 35V to 20V for both positive and negative volages. ​ The rectfied 17V is used for power supply to Zener Meter, USB power supply (+5V, useful for Arduino boards), a 12V LED strip light (flexible focus light) and for simple continuity tester. ​ The Voltmeter-cum-Battery Monitor module is changed as Zener meter, by changing the maximum voltage reading value from 50V to 25V in the code. So, when the voltage is read from the +35VDC through 12K resistor, it displays squares. When an LED or diode or Zener (with reverse polarity) is connected across its terminals, the voltage drop across the component is displayed. click here for SHARED DUAL VARIABLE/ADJUSTABLE D.C. POWER SUPPLY. ​ click here for SIMPLIFIED BI-POLAR VOLT AMP METER. ​ click here for STEPPED DESKTOP D.C. POWER SUPPLY. ​ click here for SLEEK VOLTMETER -cum- BATTERY MONITOR ​ click here for SUPERB POWER CONTROLLER BTA41-600B (TRIAC CONTROL) For source codes (in C-language) for any or all modules , please send message through contact form . The code will be sent to your e-mail.

  • About Author HSN | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    About . . . Author HSN... Mr. HSN is a Mechanical Engineer and developed interest in Electronics as hobby. He is interested in Automation and Robotics projects. Some of his projects are published in electronics magazines and on-line blogs.

  • AVR_PROGRAM | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    AVR - Programming: You have read concepts and required basic theory in previous sessions. Now, we are moving towards practial programming of an AVR micro-controller. A Personal Computer or laptop, which can run atleast Office programs/tools (like word / spread sheets etc.) is essential for programming AVR micro-controller. ​ For, testing and practice, you may select any AVR micro-controller. But, due to availability of four ports, having most of the communication types, more ADC channels and having ISP (In-System Programming) pins of programming port at one place (ease and convenience in soldering on PCB), ATMEGA16 is selected for explanation. The actual ATMEGA16/32 micro-controller board developed for testing and pinouts of ATMEAGA 16/32 are shown here for conenience. Many ATMEAGA 16/32 development boards are available in the market, but, making a board for yourself, makes you easily understand concepts of working, more space for practice and proto-typing in future. The most important advantage is more flexibility , while developing your own project. Programming of AVR micro-controller has two parts. 1) Software or Coding 2) Hardware or programmer. Software or Coding: You may use any programming software available, by downloading from internet. Most of the softwares are free (or limited or GPA agreement) to download and program for personal or educational use. The program logic and sequence are almost same for all softwares, but, syntax of the statement(s) may vary. ​ Here, we use AVR Studio 4 (uses C-language for coding, which is easy to understand for starters) which is easy to install, understand and requires less disk space. You have to download the AVR Studio 4 software and tool chain package Then install both the softwares on your system (PC) consecutively as per your OS (Operating System). Once you are comfortable and understand the programming, you may use next versions or other softwares for programming AVR. ​ Link to AVR softwares download page (courtacy Microchip): Using AVR Studio: Once installed AVR Studio 4, click the shrotcut for AVR Studio 4, available on the desktop. Then, follow the 4 steps as shown below: Now, start writing the code in C-language, where space is provided. Once, your code typed, then select "Build All" from "Build" menu on the top. Don't forget to save the project and files. After compiling the source code (written in C-language), the output files will be generated. Out of which the .HEX file is to be written (or burn) to the AVR micro-controller using AVR programmer, which is explained below. The .HEX file is available at project-path\project-name\default\project-name.HEX Hardware or Programmer: AVR programmer is required, to write the HEX code generated by the AVR Studio to the flash memory of the AVR micro controller. AVR may be programmed many ways like, Parallel programming, JTAG, ISP etc., You may use any programmer available in the market. Most of the programmers use USB port for programming. ​ For new programmers, USB-ISP programmer is suggested for its simplicity, availability and uses less number of pins of micro-controller while programming. These programmers come with USB connector one side and 6 or 10 pin connector for ISP port on the other side with a small module / board is connected in between. The requied drivers and programming software (IDE) matching to the hardware has to be installed on the system (PC). ​ The pinouts / orientation of three types of headers available are shown below. The first one being widely available, I feel the third one is more comfortable for programming AVR in ISP mode. The header connections may be modified as 6 pin straight model (like third one), using 6 pin relimate connector with wires. The reason for straight header is, out of 6 pins, most of the AVR contans atleast 3 pins in series and matches the sequence of the MOSI-MISO-SCK. ​ For the ATMEGA 16/32, all the six pins matches the pinouts/sequence of the third ISP header. Using the USB Programmer: When you purchase any AVR programmer , an installation software is supplied along with it or supplier provides link to download the required software. Otherwise, many USB programmers are available on-line to download, like AVRDUDE, WINAVR, USBASP, BURN-O-MAT, PROGISP, PONYPROG etc.. These are simple and easy to install and use softwares for programming AVR micro controllers. One of the AVR programmer (IDE) software, which is easy to install and use is PROGISP is explained here. Once downloaded and installed the PROGISP, then run executable file (progisp.exe) or the other software downloaded and installed by you. Change the port to USB, if required or indicated in installation procedure of the particular programmer. Press calibration button once, if available in the menu and let the software check and match the programming frequiencies. For some softwares, these steps may be optional or not required at all. ​ For any AVR programmer, first, select the type of AVR micro controller is to be programmed (eg: ATMEGA16 or ATTINY13 etc.). Then select "Load Flash" or equivalent option from the menu. Now, select the HEX file from your computer, which was generated by the AVR Studio (on compiling and building the code). The HEX code will be loaded to the programmers buffer memory. ​ Now, press "Erase Chip" and "Write Flash" , consecutively. Most of the AVR programming softwares, Erase the Chip before Writting the Flash to AVR by default. Then, a progress bar or status is displayed, while programming the AVR micro-controller. Once, the HEX code is written/burnt to the AVR micro controller, the status window shows "Success" message or "Error" message with error code. ​ Once, the HEX code is written to the AVR micro-controller, then the AVR starts working as per the HEX code loaded to it. Now, disconnect the AVR programmer hearder from the project AVR board. In case of error, go through the error message and correct the settings or code, if any. Now, try writting the code to the AVR micro-controller once again. SUMMARY: The above explained process is to be done initially. Once, installed all softwares and drivers as required, then, every time write your code with your own logic using AVR Studio and create HEX code. Then write/burn the HEX code to the AVR micro controller using the AVR programmer. That's all. BEST OF LUCK. ​

  • INSTRUMENTS | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    INSTRUMENTS The instruments necessary for Make-at-Home projects are listed below with comment as Basic or Important or Optional keyword, which means that, BASIC : very much required and affordable IMPORTANT : having this tool is advantageous OPTIONAL : may be purchased later STEEL RULE: A measuring scale made up of Stainless Steel is generally called as Steel-rule. The steel rules are generally available in standard lengths of 150mm (15cm) or 300mm (30cm) or 500mm (50cm) or 1000mm (1m). ​ The steel rules are more comfortable for measuring lengths, than plastic scales. The steel rules are also helpful to cut general purpose PCBs, card boards, plastic sheets, foam sheets etc., while making cabinets for circuits. ​ The most convenient and useful size is 300mm (12") steel rule shown below. (BASIC) ELECTRICAL TESTER : The electrical tester, seems to be a small screw driver, is one of the important tool for testing the presence of mains power supply. It is also useful to check leakage of mains power (phase line) to any component of the circuit( like transformer core, output lines etc.). You have to connect the tip (test probe) of the electrical tester to the mains (phase) and touch the other end. A light in the transparent sleeve glows to indicate the presence of the high voltage. This is very useful tool to check the leakage into your circuit, if the circuit is connected to mains power. (BASIC) CONTINUTITY TESTER : A continuity tester, as its name implies, tests the continuity between two ends of conductors (wires). It is simple in construction and usage. One end of the continuity tester holds a small battery, an LED and resistance in series, with a probe. The other end is connected to another probe with a flexible wire. When the two probes are connected to two ends of conductor to be tested, the LED glows, if there is no breakage , in between, else the LED does not glow, if there is dis-continuity in the conductor. (BASIC) MULTI-METER : The highly used and useful instrument in electronics is, no doubt, a Multi-meter. As the name implies, the multi-meter can be used for testing multiple parameters and its values ​ The following parameters can be tested, using a general/standard multi-meter. 1) AC volts 2) DC volts 3) DC current 4) Resistance 5) Continuity (with beep) etc. ​ Some multi-meters have more features than listed above, like; 1) Frequency 2) Transistor 3) Capacitance 4) Inductance etc. ​ The selection of parameters with accuracy and range of values varies for the multi-meters. The price of a multi-meter depends on the number of features / parameters it can measure and accuracy in displaying the measures value. Again, the price is also dependent on selection of range, like manual selection or auto selection. ​ As a novice, a basic model with manual selection multi-meter is sufficient for the purpose. (BASIC) For an expert, more features / parameters with higher accuracy and auto range selection is preferred. (IMPORTANT) ​ A manual range selection and auto range selection multi-meters are shown below as reference: LOGIC PROBE : A Logic probe is very useful instrument to know the status of digital circuits and its behavior by reading input and output of any component in a circuit. The power supply for the logic probe is used from the circuit under test and the test probe is touched to the required point on the circuit to know the logic state. LED indicators are used to show the logic state on the logic probe. Some logic probes can save the logic data, which may be used for analysing it afterwards. (IMPORTANT) OSCILLOSCOPE : An Oscilloscope is very useful instrument to know the wave-forms. But, it is costly instrument and requires basic knowledge in electronics. It is not required for the new learners (novice). It becomes essential for experts to have exact behavior of output w.r.t. input signals. (OPTIONAL) The secret of getting ahead is getting started. - Mark Twain

  • SanitizerFullAutomatic | Simple Mechatronics| Simple MECHATRONICSsimple mechatronics

    Sanitizer - Full Automatic In the COVID-19 (CORONAVIRUS) pandamic, an automatic Hand Sanitizer is very essential and useful. This Sanitizer may be used at home or office entrance. A 9VDC or 12VDC (500mA) Adapter may be used as power supply for the circuit through the Arduino Uno DC jack. The basic working of the circuit is, an Ultra-Sonic sensor (HC-SR04) sends signal continuously and checks for any obstruction (say your hand) and sends the pulse based on the distance of the obstruction. If the distance measured is in between 20cm and 40cm, then the Arduino Uno sends the signal to Servo motor (MG995) to operate its shaft. The lever connected to the servo motor shaft in turn pulls the lever of the Sanitizer Bottle, which sprays the liquid available in the bottle. The Nozzle of Sprayer bottle has two options, wide spray or narrow spray by rotating the tip of nozzle to 180 degrees. ​ Refer full circuit diagram: Initial Setup / Testing : Some components, like 7805 (a fixed 5V voltage regulator) and berg strips for easy connections to Servo motor and Ultrasonic sensor are soldered on a general purpose PCB. The connections to the PCB are made such that the berg strip pins are soldered on opposite side of the PCB and matched the pins of Arduino Uno board. So, the PCB may be directly placed on the Arduino Uno board. The servo motor requires up to 400 mA current (at 5V). So, a separate 5VDC power supply is provided through the 7805 IC. ​ Once the circuit is ready, then the sketch (Sanitizer_USsensor.ino ) may be compiled and uploaded to the Arudino Uno board using Arduino IDE. ​ Now, connect 9VDC (8VDC to 12VDC, 500mA) power supply to Arduino Uno board through its DC jack. Two separate debugging elements are provided on the PCB. ​ 1) TEST BUTTON: To test and adjust the stroke (angle of rotation ) for the servo motor, a Test Button is provided. By pressing the Test Button, the servo motor rotates as per the angle set in the sketch. So, you may adjust the angle or tension of the pulling wire of the lever. ​ 2) SENSOR LED: An LED will glow, whenever the Ultrasonic sensor is sending pulse which matches to the required distance range (set 20cm to 40cm here). The range may be modified in the sketch as per your requirement. ​ All THE BEST. ENJOY. FINAL ASSEMBLY : FRONT & BACK VIEWS For source code (arduino sketch), (Sanitizer_USsensor.ino) please send message through contact form . The code will be sent to your e-mail.

bottom of page