![]() LYNX will use 10 servos (6 for robotic arm, 2 for Sensor Head pan & tilt module and 2 for camera pan & tilt module). So in worst case if your project involves more than 36 servos then out of 15 PWM-capable digital outputs only 4 will be able to output PWM signal. And finally, if 37 to 48 servos are in use then pins 2, 3, 5 are to be added to this list of PWM disabled pins. If your project involves more than 24 servos then pins 6, 7, 8 will be unavailable for PWM in addition to pins mentioned above. If you need to control more than 12 servos then in addition to pins 44, 45, 46 the pins 11 and 12 will also be unavailable for PWM signals. Using this library disables outputting PWM signals to pins 44, 45, 46 on Mega 2560 board. LYNX robot will use several servos and to control these we will need Servo library. ![]() We have already mentioned PWM, let’s now review it in more detail. Serial port should be connected to RS-232 via TTL-to-RS232 converter otherwise the Arduino board will be damaged. Serial ports are operating in the range of 0 to +5 V while RS-232 is operating in range of -25 to +25 V. Serial communication is basically RS-232, but with exception to voltage levels. TX/RX port is accessible via pins 0 and 1, and consequently we will not be able to use these pins for general I/O purposes as well as for PWM.Īttention! Don’t connect Serial port directly to computer RS-232 port. There are four hardware UARTs available on Mega 2560 and one of these (TX/RX) will be used for communication with the computer. As was mentioned above LYNX will communicate with computer over Serial port. Sounds complicated? Unfortunately it is complex if you never used Arduino before. There are 4 Serial ports (4 in-chip integrated UARTs), so we can waste one port (TX1/RX1) in favour of interrupts as LYNX will need only one Serial port to communicate with the computer and three other ports will be used for digital I/O functionality. There are 15 PWM-capable pins and LYNX doesn’t need so many of them, so we can easily use pins 2 and 3 for interrupts. LYNX robot will need I☬ bus to communicate with several sensors (compass, for example) and with Raspberry Pi meaning that we can’t use pin 20 for interrupt INT3 and pin 21 for interrupt INT2. And all these pins are also shared with standard digital I/O functionality. ![]() Mega 2560 has 6 external interrupts tied to pins 2 (INT0), 3 (INT1), 18 (INT5), 19 (INT4), 20 (INT3) and 21 (INT2). Pins 2 and 3 are shared with PWM, pins 18 and 19 are shared with Serial (TX1/RX1) and pins 20 and 21 are shared with I☬ communication bus. LYNX robot will utilize SPI to communicate with RFID tag reader, so we can’t use these pins for digital I/O functionality. On LYNX we will use this on-board LED for diagnostics purposes and won’t attach anything else to pin 13.Īrduino boards have SPI and on Mega 2560 it occupies pins 50, 51, 52 and 53. Should you use pin 13 as digital input please consult Arduino page for know-how. Most Arduino boards (and Mega 2560 is not an exception) have LED connected via resistor to pin 13 that complicates the usage of this pin as digital input. We will start from easier issues and move to more complex ones. Let’s review how sharing functionality affects LYNX. However don’t become mislead by these numbers, – most digital pins have shared functionality and this complicates the whole thing. Mega 2560 has an impressive I/O capability: 54 digital I/O pins and 16 analog input pins. Now let’s look at I/O, interrupts, timers and PWM. Different types of RS-232 cables and interfaces are explained here. The basics of I☬ are well explained in the article written by spookymelonhead, SPI – in the article written by John Boxall and RS-232 – by Avinash here. The easiest question to answer is about supported communication protocols which are I☬ ( Inter-Integrated Circuit), SPI ( Serial Peripheral Interface) and Serial ( RS-232 compatible). Other types of resources are insignificant for LYNX robot. ![]() The main resources we are interested in are inputs and outputs (I/O), interrupts, timers, ability to generate PWM signals and supported communication protocols. General description of the board is available at Arduino website. Here we will focus on the resources that this board has to offer. Arduino is programmed in C/C++ that is a nice feature of this low-cost microcontroller. Arduino are a low-cost microcontrollers and Mega 2560 board is positioned as applicable for robotics. In this post we are reviewing the resources of Arduino Mega 2560 R3 board and their applicability to LYNX robot platform.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |