Exploring Single-Board Computers and Microcontrollers for DIY Projects

computers are free well really really cheap n.w
1 / 27
Embed
Share

Delve into the world of single-board computers like Arduino and Raspberry Pi, and microcontrollers, to unleash your creativity with DIY projects. Learn about the differences, applications, and capabilities of these devices as tools for innovation and experimentation in electronics and programming. Discover how hobbyists are embracing these affordable technologies for diverse projects, from voice controllers to fermentation monitoring.

  • DIY Projects
  • Single-Board Computers
  • Microcontrollers
  • Electronics
  • Programming

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Computers are Free (Well, really really cheap) Paul Lourd WB2JVB GNARC May 2016

  2. Agenda Microcontrollers vs Single Board Computers Arduino Raspberry Pi And the Kangaroo

  3. Why have hams taken to this? 1 Hams love to tinker with new things, especially things with a low entry price! 2 It requires programming (which many hams have done at one time or another) 3 Electronics knowledge is usually required. Simple concepts to us, like Ohms s law, voltage, current, resistors, caps, etc are foreign to many people.

  4. What can you do with Arduinos or Raspberry Pis? Jasper Voice Controller powered by Rpi https://jasperproject.github.io LED Cube - http://www.instructables.com/id/Led-Cube-8x8x8/ Flamethrower Jack-O-Lantern - http://www.instructables.com/id/Flamethrowing-Jack-O-Lantern/ Arduino RC- Lawnmower http://www.instructables.com/id/Arduino-RC-Lawnmower/ Fermentation Monitoring - https://www.sparkfun.com/tutorials/131 Raspberry Eye - https://hackaday.io/project/865-raspberry-eye 4

  5. Single-Board Computer vs Microcontroller What is the difference? Single-board Computers Microcontrollers 5

  6. Single-Board Computer vs Microcontroller Single-board computer Lots of processing power Has operating system (Linux, Android, Windows 10) Multitask Video Connection USB, Networking, etc But, it also has GPIO pins (connect/control things!) Microcontroller Devoted to having GPIO pins Low memory, slow processor Low power, quick boot Single Task Cheap and Reliable 6

  7. Single-Board Computer vs Microcontroller Arduino Uno Rasp Pi 3 Processor Speed 16 Mhz 1.2 Ghz + Onboard Storage 32 Kb Flash, SD cards ~Gb Memory (RAM) 2 Kb ~ 1 Gb Power Consumption 12 mA 500 mA+ (2200 mAh battery -> 183hr) (2200 mAh battery-> 4.4 hr) Reboot Time <1 sec ~ Multiple seconds Other Features Operating system Extendable Storage WIFI/USB/BT Connection

  8. Digital Input/Output Pins Pins with ~ are PWM [Analog Output] Transmitter/Receiver Serial Connection GRD P I N S ! USB 7-12 v 3 v 5 v GRD Analog Input Pins 8

  9. Did I Say Cheap?

  10. But Buy a Real One

  11. So now what? Do hams ever buy anything they don t really need? So what are you going to build? Blinkie lights get boring Many sample projects on the net are silly (Flamethrowing Pumpkin) Find something you need to do In my case, it was model train stuff

  12. Controlling Lego train with IR LED Problem: Train uses batteries - show is on all day need to pause trains (See video now) Solution: Use Arduino to run trains on a schedule Choices: Use a servo to turn the orange wheel, or generate the IR directly

  13. I Found the LEGO IR protocol

  14. Libraries to the Rescue (don t reinvent the wheel) The Arduino community is very active, and there are libraries for almost anything you can think of: Servo control Stepper motor RF applications LCD Display I2C protocol GPS etc. And of course, there was some nut who wrote the Lego Protocol !! lego.SingleOutput(0, PWM_FWD4, BLUE, CH1) Sets the engine on Blue/Channel 1 to speed 4 On to the Demo ..

  15. Arduino daughter boards (Shields) Additional functionality is added with hardware shields: Wifi, Ethernet, Bluetooth, TFT displays, GPS, Motors, Sound/Music Designed to snap on

  16. Getting started Think of a project other than blinking LEDs! Buy a kit from: www.adafruit.com or www.sparkfun.com You will get a breadboard, lots of components and jumpers Run through the tutorials and examples Review some coding examples if you are not a coder. It is not hard, but it is precise Read a book! $85

  17. Microcontrollers Many Choices Advice for newbies: Stick with the Arduino Texax Instruments LaunchPad Nanode Beetle Pinguino PIC32 Freescale Freedom Teensy Ruggeduino Gamebuino 18

  18. Raspberry Pi As we have discussed, it s a full blown (small) computer running Linux distribution called Rasbian (based on Debian) Some other operating systems as well, like stripped Win 10 You can use it for controlling things, like GPIO pins, but it might be overkill Or keep in the shack to leave web pages running (weather, spotting, etc). New Pi 3 has lots more connectivity. No longer requires USB hubs to get things done 1.2 Gig processor and 1gig RAM, HDMI, WiFi, BT, CSI Cam port, 10/100 LAN Micro CD card for the OS and storage (issues with corruption) And still painful to use for anything heavy. Audio and video not the best for streaming.

  19. Interfacing Options GPIO (General Purpose Input/Output) GPIO pins can be configured to be input or output GPIO pins can be enabled/disabled Input values are readable (typically high=1, low=0) SPI (Serial Peripheral Interface) A synchronous serial data link, that operates in full duplex mode It is used for short distance, single master communication, for example in embedded systems, sensors, and SD cards SCLK / MOSI / MISO / SS Serial Clock (output from master) Master Output, Slave Input (output from master) Master Input, Slave Output (output from slave) Slave Select (active low, output from master) I2C (Inter-Integrated Circuit) I C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL)

  20. Prototyping Aids

  21. All sorts of ways to measure your environment Sensor Approx Price TMP36 Temperature Sensor 1.50 BMP180 Temperature & Pressure 8 Triple Axis Accelerometer 7-20 Adafruit Ultimate GPS Breakout 34 Digital Light / Luminosity / Lux Sensor 8 Passive IR Motion Sensor 7 IR Distance Sensor (10-80cm) 10 IR Receiver 2

  22. Programming is with Python import RPi.GPIO as GPIO import time # blinking function def blink(pin): GPIO.output(pin,GPIO.HIGH) time.sleep(1) GPIO.output(pin,GPIO.LOW) time.sleep(1) return # Use Raspberry Pi board pin numbers GPIO.setmode(GPIO.BOARD) # Set up GPIO output channel GPIO.setup(7, GPIO.OUT) # Blink GPIO17 10 times for i in range(0,10): blink(7) GPIO.cleanup()

  23. Too many examples, here is a cool one def ModifyWatering(): print "\nLast rain from forecast timestamp: " + str(lastRain) print "Current Time: " + str(time.time()) print "Days since last rain: " + str((time.time() - lastRain)/86400 ) print "Seconds since last rain: " + str(time.time() - lastRain) print "Days disabled in seconds: " + str(daysDisabled * 86400) print "Has NOT rained within daysDisabled range: " + str(time.time() - lastRain >= daysDisabled * 86400) if(rainForecasted == False and time.time() - lastRain >= daysDisabled * 86400): print "Hasn't rained in a while, and not expected to rain. Watering enabled." GPIO.output(7,False) ## Turn off relay switch, enable watering GPIO.output(13,True) ## Turn on green light GPIO.output(15,False) ## Turn off red light else: GPIO.output(7,True) ## Turn on relay switch, disable watering GPIO.output(13,False) ## Turn off green light GPIO.output(15,True) ## Turn on red light if(rainForecasted): print "Rain is forecasted, or raining today. Watering Disabled" else: print "Rain not in forecast, but it has rained recently. Watering Disabled"

  24. There are others Same Concept Beaglebone Black Beaglebone Black Processor 1GHZ 2GB 8-bit eMMC on-board storage Flash Memory RAM 512MB DDR3 Open Hardware Architecture 1x USB port 92x GPIO pins Other Features Price (approx, USD) $45.00 http://beagleboard.org/ 26

  25. The Best Deal Going for a Utility PC Full Windows 10 computer. - USB WIFI Bluetooth HDMI 2 gig memory 32 gig SSD Micro SD slot - $99 when in stock at NewEgg $139 at Amazon - No learning UNIX, everything runs on it! - But not for controlling devices no GPIO pins

More Related Content