This is a continuation of the previous post where we have tried to run a servo using an Arduino motor shield. This was a simple task to do with the Arduino Servo library. Today we will push things a bit forward and drive the DC motor using the same motor shield. This motor shield can run small DC motors that require less than 0.6A of current and operating voltage is less than 25V. In my drawer, I found a small 12V motor that will fit this demo. Before we begin programming, we need to connect the motor to the Board. We are going to use the M1 connector.: Since the motor requires a 12V power supply, we are going to use an external power supply. It can be connected to the External power screw terminal. Be sure to remove the jumper as well.
Recently I’ve got an Arduino motor shield. It is based on ladyada first mshield circuit. It uses two famous L293D quadruple half-H divers. It is a cheap and reliable shield to drive various motors. These can be two hobby servo motors, four bidirectional DC motors, or 2 (unipolar or bipolar) stepper motors. The load current is limited to L293D chips. The specification says that each channel can provide a constant 0.6A and peak 1.2A. There is also a thermal shutdown to prevent the circuit from damaging. Motors can be externally powered using a voltage range from 4.5V to 36V. Each motor control channel is pulled down with a resistor to disable any motor at power-up. In this post, we are going to try servo motor control. There are a couple of connectors on the motor shield where you can connect two servo motors using a standard 3 wire connector (GND, VCC, and PWM).
Most of the 8-bit microcontrollers lack integrated DAC (Digital to Analog Converter) functionality. This is handy when you need to generate analog signals out of digital information. Adding DAC to any existing microcontroller is a piece of cake. But before you start, why not look at various options available. Embedded newbie provides a review of Arduino DAC solutions. Beginning with the R-2R ladder solution list goes through multiple ways of converting digital to analog. Depending on your needs and the speed required, a PWM DAC converter is nothing more than a digital signal passed through a low pass filter. This is how motor control works. It’s relatively slow, but serial that gives an advantage when small pin count microcontrollers are used. On the other hand, if signal speed is an issue, then parallel DAC – same R-2R ladder probably with an output buffer circuit. And lastly, there is always an option to use specialized DAC chips that can be interfaced through one of the available interfaces like SPI. These save space and MCU pins and still provide high resolution and speed.
Probably everyone knows Arduino and perhaps using it. This development platform is worth its popularity. Probably the best thing about it is open-source ideology. Indeed it is an excellent development platform that includes software and hardware solutions where even non-electronics guru can master great projects. In a few years, Arduino has grown in a great community around the world. And that is great – this means that you have access to endless resources, endless project ideas and lots of members willing to help if you are stuck with something. All the necessary information you can always find in https://www.arduino.cc/. OK, enough of talkies. Let’s see what we have here. Thanks to SparkFun electronics, Arduino Duemilanove stands on my table fully assembled and ready to work. I decided to give a try on Arduino Ethernet shield based on Wiznet W5100 chip. It has a library, so you don’t need to think of details how Ethernet chip is controlled. Few lines and you have some info in your favorite browser.
Arduino is a well-known platform among electronics hobbyists because of its simplicity, robust and intuitive design, and ease of use even for non-electronics enthusiasts. Instead of introducing new PCB variants or different microcontrollers on board, they made some significant upgrades in the Arduino concept. Recent changes came with two new Arduino boards, so-called Uno and Mega2560. Probably the most significant difference is the USB to serial converter. They decided to replace seemed to be hard-positioned FTDI chip FT232RL with microcontroller Atmega8U2 that has a hardware USB interface. With this upgrade, the Arduino board becomes much more flexible as a microcontroller driver can be configured more than a simple USB to serial converter. It also can convert Arduino to a standard keyboard, mouse, MIDI, and mass storage device. So, there are much more ways to use Arduino now. But this is not over yet. Arduino decided to change the bootloader too with the new Optiboot firmware that brings some improvements as well. The new bootloader occupies 1.5kB less code space leaving it for applications and loads firmware to flash faster.