buyer beware
play

Buyer Beware $0.95 Is it worth it? Buyer beware I purchased these - PDF document

T HE A RDUINO M ICROCONTROLLERS Presented by: Forest Shick, WA2MZG For those who dont know me I am Forest Shick, WA2MZG. I have been a ham for about 50 years. Ground rule ask questions on the current slide First, I will briefly cover


  1. T HE A RDUINO M ICROCONTROLLERS Presented by: Forest Shick, WA2MZG For those who don’t know me I am Forest Shick, WA2MZG. I have been a ham for about 50 years. Ground rule – ask questions on the current slide First, I will briefly cover other microcontroller boards - quickly 1

  2. Buyer Beware $0.95 Is it worth it? Buyer beware – I purchased these connectors from Adafruit. This picture shows 3 connectors. They lasted about 10 insertion removal cycles. Spend the money and buy a good connector 2

  3. Qualifications Did you ever wonder Why is this person presenting? I do!! I am an electronics engineer. I have been designing and developing hardware and software for microcontroller based products since 1980. The first product I designed with a microcontroller was the hand held terminal on the left – in assembly language for RCA CDP1802 microprocessor. My next project was the battery-operated printer in 1982. My last 2 projects, around 2014, were the remote-controlled lights and the electronic beer tap. Those were written in C language and each had a different microcontroller from Motorola / Freescale. For these products I did the electronic and software design and development. The beer tap also had software for a PC and a PDA with network, USB and IR communications. I have designed products with microcontrollers from RCA, Motorola, Freescale, Microchip, Atmel, Texas Instrument and a DSP from Analog Devices 3

  4. Single Board Computers Asus.com/us/single-board- Beagleboard.org Raspberrypi.org computer/tinker-board Just to acknowledge the existence of other devices – Arduinos are not the only hobbyist microcontrollers, here are 3 single board computers from Beagle board, Raspberry Pi and Asus. The Pi is a decent entry level product for the beginner - from a software point of view because of the support. The Beagle Bone Black is a superior product relative to the Pi but is not as well supported. The Asus – I have seen very little info on in the hobbyist market or anywhere else – only one article stating it was better for ft8 than the Pi because it was faster. 4

  5. Other Microcomputer Modules Pjrc.com/teensy/ 3.2 – 72MHz Cortex M4 3.6 – 180MHz Cortex-M4F 4.0 – 600 MHz ARM Cortex M7 NANO – 16MHz 8 bit Teensy 3.2 Teensy 4.0 Arduino NANO Teensy 3.6 Here is a less popular competitor to the Arduino. It claims it is compatible with the Arduino Integrated Development Environment – after adding additional files. I have not had any experience with these boards, but they appear to have much the same capabilities but with a much faster microcontroller. Notice the speed difference – The NANO is the slowest. 5

  6. What is an Arduino? These may be the 3 most popular Arduino boards: UNO, NANO & MEGA. The UNO and NANO are very similar. The slide shows the relative size of the board. Each has its own advantage: NANO – size MEGA – capability and features UNO – compatibility with Arduino shields There are many vendors selling their own version of the Arduino boards and you can get them very inexpensively on- line from “unknown” vendors. As always – buyer beware. Remember the 2 nd slide! 6

  7. Other Arduino Modules If you are purchasing an Arduino – beware – 6 of the smaller boards are all NANOs but with different functionality. The other 4 boards are just examples of the many boards available in the Arduino product line 7

  8. Arduino Shields There are also other boards or modules called shields available for the Arduino. They will be plug compatible with the UNO and possibly the MEGA but not the NANO. They will work with the NANO but you will have to wire them together. There are many different shields from Arduino and other vendors. There are motor driver shields, sensor shields, prototyping shields, SD card shields, GPS shields, robot and touch screen LCD shields and more 8

  9. What is an Arduino good for? • Weather station • Station control / accessories • Keyer • Rotor controller • Home automation • Station 24 Hr Clock • Use your imagination • Robot • Steppingstone to the • Light Controller Raspberry Pi and other more • Simple Security System powerful devices • Having fun • Homebrew test equipment • Saying – “ I DID THAT ”!! • Game design – remember Simon? The big question is WHAT IS AN ARDUINO GOOD FOR? Within limits – use your imagination. You are not going to make an SDR transceiver, but you could make a VFO. See my projects on the table. 9

  10. Prototyping Let’s stop for a quick look at prototyping technique that might be useful. Using a simple breadboard prototyping strip you can build many of your ideas. Notice the blue, red and green lines – they show which contacts are connected. The black lines show the break A 1/4W resistor is a good source of jumpers. Cut the wires off at the body of the resistor and they fit perfectly. Old solid conductor phone lines make good jumpers. Of course you can buy ready-made jumpers: M-M, F-F, M-F 10

  11. Projects – Direct Conversion Receiver NANO controls the LCD and the DDS chip – the VFO in this direct conversion receiver Samples of projects using different Arduino boards. This uses a NANO This is a project from N6QW A direct conversion receiver I did a presentation on this Sept 2015, I believe 11

  12. Projects First steps in an SSB transceiver. This uses an UNO. Using an UNO to control the VFO, BFO, LO and display. This is the evolution of the direct conversion receiver shown on the last slide into a SSB transceiver. It never was completed 12

  13. Projects – Morse Code Tool The Arduino MEGA was used because the SD card required a lot of memory space – program and RAM Details are in a previous issue of the RAG Using a MEGA This is what happens when you start a project and don’t stop. I have 2 more options for this: CW transmitter and morse code decoder but came to my senses and stopped. 13

  14. Let’s Get Started • To be fair – there is more relevant material than we can cover in 1 hour • We will start with an overview of the NANO • We will investigate the more common / easy to use features first • Initialization • Digital IO • Analog Conversion • As time permits, we will do a 10,000 ft view of as many features as possible 14

  15. Comparison UNO NANO MEGA Microcontroller ATmega328P ATmega328 ATmega2560 Digital IO 14 22 54 Analog IO 6 8 16 PWM 6 6 15 UART 1 1 4 Flash 32K 32K 256K RAM 2K 2K 8K EEPROM 1K 1K 4K Clock 16MHz 16MHz 16MHZ LED_BUILTIN 13 13 13 Pins 28 32 100 This is a chart of some of the highlights of the 3 popular Arduino boards. As you can see the UNO and NANO use the same microcontroller. • Digital IO – these are logic level inputs and outputs basically used to set a condition or test a condition using only 2 states – ON and OFF or 1 and 0 or 5 volts and 0 volts • Analog IO – Inputs to a 10 bit A/D converter – 0 to 1023 • PWM – Pulse Width Modulator • UART – used for serial IO It appears as if there are 26, 36, 85 available signals – there are not! These functions share common pins for example D0 & D1 are also UART RX & TX. • Flash – program storage • RAM – variable and stack storage • EEPROM – non-volatile data storage (data is not lost when power is removed) • LED_BUILTIN – D13 on each board has a resistor and LED attached to it. 15

  16. Microcontroller Block Diagram ATmega328 ATmega2560 Block diagram for comparison of the 328 and 2560 microcontrollers Notice the increased complexity of the 2560 We do not have the time to examine each block in detail, but I will try to cover highlights of many of the blocks – enough so you can get started giving the Arduino boards a try. Notice that each block diagram has a block titled AVR CPU. This is where the work is done 16

  17. ATmega328 Data Sheet BUT Arduino has done a great job of getting you started There are 294 pages in without having to depend this data “book” on this book. At some level of The Arduino web site has project complexity much to offer if you have many of these pages the time to look through it. will be important to your project TAKE THE TIME NOTE: I have not found a hardware description – it could be there somewhere! Let’s take a quick look at the data sheet for the ATmega329 There are 27,489 sqin of specifications – happy reading! 17

  18. AVR CPU Core and Sample of Instruction Set On the left is a block diagram of the AVR CPU. The structures inside the heavy black line are memory and calculation hardware. The structures to the right of the black line are the interface hardware to all the external I/O – digital, analog, etc. On the right is a peek at some of the 130+ assembly language instructions which are common to both micros. A good reason to start with the Arduino IDE – it hides these instructions from you. That is NOT C. These are the instructions higher level languages, like C, get compiled down to before they are assembled into code the micro can run. NOTE: In the RARA Academy, we will be programming in C and using many of the Arduino predefined functions. 18

Recommend


More recommend