previous arrow
next arrow
  • Practical Arduino training workshop Frequently Asked Questions: (1/24/2019) by admin

    Q: What is this training about?
    A: This training is a basic course on Arduino for people with electronics background. Its objectives are:

    • To be able to appreciate and apply the essential capabilities of the Aduino
    • To be able to execute a project using Arduino in an actual application

    If you are an intermediate or advance user, this training may not be for you. See the coverage below:

    • Arduino Introduction
    • Development process and setup
    • Review: Arduino “language” essentials
    • GPIO’s
    • Driving large DC loads
    • Driving AC loads
    • External Interrupts
    • PWM Peripheral
    • ADC Peripheral
    • UART / Serial Port
    • Program Structuring for projects
    • HC-12 RF Transceiver
    • I2C Bus
    • Alphanuemric LCD with I2C interface
    • Servo Motor Control
    • Ultrasonic Sensor
    • Demostration of GSM monitoring & control
    • Demostration of two-wheeled robot control

    Q: Whom is the training for?
    A: The training is for:

    • People with electronics background wanting to start on Arduino or are just starting out on Arduino
    • People who have already done a number of projects but feel they lack the overall foundation to execute projects from scratch
      If you feel this is not for you, worry not, we will be having more trainings on different topics and levels this year.

    Q: When and Where?
    A: The training workshop will be held from 8:30am to 1:00pm on February 10 2019 at room B312 Lopez bldg “B”, Session rd., Baguio City.

    Q: How much does it cost?
    A: Layad Circuits shall charge a minimal fee of Php996.00. However, participants are required to provide for the Training Kit. The kit may also be bought from the store at a discounted rate of Php804 exclusive for participants only.

    Q: What are the contents of the Training Kit.
    A: The basic Training Kit shall contain as follows. Note that this is NOT the same as commercially available “Arduino Kits”. The contents have been selected to match the training requirements leaving out unncessary parts. Every participant must have at least have the following parts:
    1x Arduino Uno SMD
    1x USB cable
    1x 830-Point Breadboard
    10x Male-Male Connecting Wires
    4x Male-Female Connecting Wires
    1x 16×2 LCD with I2C backack
    1x 5mm LED
    3x 330ohm resistor
    1x RGB LED
    1x Traffic Light / 3-LED module
    1x Breadboard compatible potentiometer
    1x LM35 temperature sensor
    1x LDR
    1x 10K resistor
    2x 6×6 tact switch
    1x Active Buzzer

    Q: There are other parts to be used in the traning, who will provide them?
    A: Layad Circuits shall loan the other required components within the duration of the training. However, should a participant want their own, they may purchase or provide for the following:
    1x DC motor or DC fan with 200mA or less and accepts 5V
    1x mini Solenoid lock
    1x Saleng Tracker
    1x HC-SR04 Ultrasonic Module
    1x HC-12 RF Tranceiver Module
    1x Two wheel robot kit with controller and power
    1x Saleng GSM Shield (for demo only)
    1x Relay module
    1x AC load (for demo only)

    Q: Where and how do we reserve a seat?
    A: Drop by our Physical Store at B314 Lopez Bldg. B, Baguio City to deposit your fee and register. Those who are not currently in Baguio but are interested may also contact us for bank or online payments.

    Q: Are walk-ins allowed?
    A: The training requires preparation of materials and other activities and hence, only advance registration will be accepted.

    Q: Why limit seats?
    A: For optimum trainor-trainee ratio, only a few seats will be offered

    Need more information? Talk to us: 0916-442-8565, facebook.com/layadcircuits , info@layadcircuits.com or visit us at B314 Lopez Bldg B, Session Rd., Baguio City

  • NEMA17 + A4988 reference circuit and code (12/11/2018) by admin

    Someone bought NEMA17 motors from us and asked for a test, so we obliged and thought it may be better to post it here in case someone else needs it. The requirements was to use the following parts from our stock:

    • Saleng/Arduino Uno
    • NEMA17 Bipolar Stepper Motor
    • A4988 driver module

    We then needed to rotate the motor clockwise and counter clockwise to demonstrate its basic usage. Here is our wiring diagram:

    This is our test code:

    After uploading and correctly wiring, you should expect the motor to move one full revolution in both directions. Happy hacking!






  • Programming the AVR without using the Arduino IDE (10/10/2018) by CD Malecdan

    Most recently , a lot of students from a particular school has been asking if this is possible. It appears that they have been asked by their instructor to build robots but without using the Arduino IDE to discourage “copy-paste” programming. The problem arises when the instructor is unable to give direction as to how this is done.

    This quick article discusses the very basics in hope that the reader can pickup critical information and get a decent starting point.


    Almost all AVR’s are programmable or are supported byt the hardware and software tools we shall discuss. Your AVR should have the essential circuits already build and ready for use: regulated power , crystal oscillator if not using the internal one, and access to the ICSP pins: SCK, MISO, MISO, RESET, VCC and GND.


    What you can NOT use in this premise

    While some users complain of the lack of functionality, the Arduino IDE is a great in many ways in that it has the full package of compilers, linkers, editor etc. that are essential to do programming and that it is particularly simple, lightweight and open source. Other software have repackaged it into their own environment such as what is done in Visual Micro – a Visual Studio plugin that allows the Arduino IDE to be integrated into Visual Studio. There is also an Arduino plugin for Eclipse but again this uses the existing Arduino IDE core tools. Others simple repackage the editor such as in the case of the code editor in Fritzing .

    What we can use

    Before Arduino, there were several IDE’s that were floating around the internet. We can list some of them below:

    There are all capable IDE’s/tools suite with varying strengths and weaknesses. Some of these are paid software while some are freeware wit limitations. WinAVR is open-source however, it is not the friendliest of these bunch.

    Atmel/Microchip has released its official development IDE called the Atmel Studio, previously known as AVR studio. It is a very capable and professional tool suite for AVR’s. It works with C/C++ so it should not be too difficult for someone used to Arduino programming. In recent years, this IDE has improved by leaps that we could consider this as currently the best IDE, bar the Arduino environment,  for AVRs.


    Now that we have identified our software tool, we need a hardware tool to program (and debug) the AVR using the ICSP port. This tool sits in between the computer and your target AVR circuit and is responsible to uploading the bits and bytes of the machine code into the AVR’s flash. You may use any of the following:

    Atmel ICE – this is the official tool supported by Atmel Studio, highly capable but is the most expensive.

    AVRISP mk II – this is also an official tool but is nearing the end of its life. It is less than half the price of the Atmela ICE but is still capable  and supported in Atmel Studio 7 although no longer actively being maintained. This tool has been cloned and is found in many Chinese stores with mixed experience from users.

    STK500 and compatibles – Atmel has previously released the STK500 development board way back before Arduino and its programmer has been included in several compatible programmers such as that from Sparkfun or Olimex . To date, the original STK500 dev board from Atmel is still being sold.

    USBASP – One of the cheapest tool but several users have complained of the difficulty in using this tool with Atmel Studio and the support for newer AVR chips. Using this with the Atmel Studio should be fine, however, a proper guide from online may be necessary to use the pair. Note that this programmer tool appears to have stopped active maintenance of its firmware nor does Atmel Studio officially support it.

    USBISP – This is being sold by chinese outlets with some labled as USBASP. so care should be taken when doing so. While we have had success using this to flash AVR’s off a compiled hex file, we have not tried it with the Atmel Studio.


    The optiboot, used in some Arduino boards, is a powerful bootloader when we consider what it can do. The bootloader is pre-programmed into the AVR chip and works as a self-programming code that is able to fetch data from its UART (“serial” port) and write these into the chips program memory. This is why we do not use a special hardware programming tool when we use the Arduino as it is intended –  we simply use a USB cable.

    Granting that the students with this problem are at least allowed to use the optiboot , or any other bootloader, then the issue with programmers may be elimited following this sequence:

    • Burn the bootloader into the chip – this can be done with an Arduino board such as the Uno wired up to the target AVR. The firmware for the Arduino acting as a programmer is already build and is ready to use. Read more about it here. It should be noted that we will use the Arduino IDE and an extra Arduino board just to upload/burn the bootloader into the chip
    • Generate the machine code in Atmel Studio. Develop the code in C/C++ in Atmel Studio (or other IDE’s) and then compile it. You should be able to find the machine code as hex or bin file.
    • Download a software programmer. Atmel FLIP, AVRdude and several other tools downloadable from the internet or try Xloader, though it is not confirmed if it can support machine codes generated outside the Arduino IDE.
    • Upload the machine code into the target AVR using a USB-Serial converter (FTDI, Prolific, CP2102 or CH340G) via the Serial port, usually UART0 or D0 and D1 in most AVR’s

    Where to get the hardware programmers mentioned here

    Layad Circuits may get them for you. While they may not be onstock, we can import the tools from you direct from the manufacturers. Contact us today – 09164428565, info@layadcircuits.com, facebook.com/layadcircuits or visit our physical store at B314 Lopez bldg., Session Rd. Baguio City.

  • LC TIP # 9: Save on RAM using the F() Macro (7/3/2018) by admin

  • LED as Light Sensor (6/27/2018) by admin

    We all know that a LED emits light. But it also acts as a photodiode, that is, current flows through when the device is exposed to light and therefore producing a voltage drop across the terminals of the LED. The amount of light is proportional, although not linear, to the voltage across the terminals.

    In this article, we will demostrate how this is done using an ordinary red LED and a Saleng Uno. For display, we will use a 16×2 LCD module with a Kimat I2C backpack.





    Happy Hacking!

  • When to encase an Arduino (6/27/2018) by CD Malecdan

    Asked why one student would want to buy an Arduino acrylic casing for his fan-speed controller box , he quickly said “ginmatang da met amin, agalaak meten ah” [Everyone bought one, so I might as well get mine]. Sounds familiar? Well, that band wagon effect may have happened to you but let us be look closer at these popular enclosure.

    At first glace, a casing for your bare Arduino board would seem logical as it would provide a form of protection from the elements, ESD damage and other catastrophic possibilities like spilling coffee over your board. Again, this would sound reasonable…almost! In this article, we will breakdown some of the reasons why you need and why you might not really need an acrylic case for your Arduino board.

    Microcontrollers in Embedded Systems Applications – a lot of Arduino projects require embedding the board into the application and many times, we literally need to embed the board itself on a larger PCB or perhaps a larger box. Obviously, you do not need an enclosure for the Arduino since you are most likely to enclose the whole system in a bigger box. In such a case, what you need a proper enclosure or panel box.

    Arduino as a Development Board – If you are not permanently embedding your board and simply want it for experiments, then this is where you might need an enclosure. Afterall, the Arduino was meant as a development board. But here is one reason you may be better off not encasing your board – as an experiment board, you might want full access to everything on the board, from its components to the microcontroller pins. Before the rise of the Arduino, most of microcontroller development boards are bare without enclosures just like this Atmel AVR development board – the STK500 which, although first released more than a decade ago, is still being used and still without a casing even today.

    The benefit is obvious, as a developer, you will at some point require access of certain components within the board. For example, when an external circuit connected to an output pin is not behaving as expected, you may want to probe the voltage level directly at the microcontroller’s pin. Simple power tests, checking the regulator’s temperature, and probing signals are reasons why a casing may not be convenient for a development board

    Aesthetics – An Arduino enclosed by a transparent casing may be an eye-candy. But imagine a project where you use most of the pins. That would mean a lot of wire sticking out of the enclosure and then into other modules or PCB’s. If you have a few wires or perhaps with some slick wire management techniques, you might be able to get away with a good looking setup.

    So what for is this casing? – here are some reasons we’ve though an acrylic casing would really shine:

    • If you are using the board for frequent but light experiments that do not require extensive signal probe and the like.
    • Small projects with components that can be placed inside the casing or with only a few components outside the casing (e.g. a shield)
    • When it is used as a training board for different users with varying electronics knowledge. The case would be a good protection for clumsy fingers touching the sensitive electronics.

    So the next time you think about purchasing a casing, think about your application and judge for your self if it is really needed.

  • Determine if a BJT is NPN or PNP using a Saleng Uno (6/7/2018) by CD Malecdan

    While there are almost an infinite number of simple applications, a transistor tester appears to be uncommon in Arduino related materials. This simple project demonstrates the Saleng Uno as a BJT transistor type tester. A standard 16×2 LCD module displays if the result is NPN or PNP, a momentary button tells the Saleng Uno when it should start processing and the three 10K resistors are used as test circuit.



    Demo Video:

    We’ve based this project from this article. We’ve added an LCD and a start button and added some validation before displaying results.


  • Improvements made on the Saleng Uno (6/1/2018) by admin

  • LC TIP 008: Two Extra Analog Pins (5/31/2018) by admin

    Need more analog pins? If you are using an SMD version of the  ATMega328P, then you are in luck!

  • A closer look at the “R3” in Arduino Uno (5/31/2018) by admin

    You may probably wonder what the “R3” means in board titles such as “Arduino Uno R3”. It may be simpler than what you think.

    To start with, the R3 is a revision number of the PCB. This means there were earlier revisions such as R2 and the original board. So what is the difference between an R3 board and earlier PCB’s? Here are the two most significant ones we feel may affect your project:

    • Extra I2C Headers – the R3 has an SDA and SCL pins after the AREF pins. these are actually a duplicate of A4 (SDA) and A5(SCL) and was probably added to facilitate connection of two devices in the I2C bus.
    • The on board “L” led  controlled by pin 13 is buffered using an op-amp in the R3 while earlier boards directly connects the LED and resistor to pin 13. This eliminates degradation of pin 13’s performance especially when used as an input.

    There are other differences like the upgrade of the USB chip from an Atmega8U2 to Atmega16U2 but this is essentially of the same function and is not necessarily the only or the best solution for other Uno compatible boards. The rest of the differences are changes you may never notice or does not really affect performance such as the positioning of some components on the board.

    And while we are discussing these changes, it is worthwhile to note that almost all boards being sold today are using the R3 variant. Even Uno-compatible boards have now inherited the changes in R3 and with some  adding even better improvements.

Did you find our Learn section helpful? Consider donating here and help us keep the articles coming.