Pral2a
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    Electronics concepts ==================== ## Input devices #1 [Guillem] **:date: 28/03/2019** ### Core ideas * Why we need sensors * Neurons, I/O and Bio indicators * Sensing the environment * Close loop systems * Inferring metrics * Bike speed from counting wheel turns * Water tank distance from distance from above * Composed sensors * Radar: emitter (output) and receiver (input) working in sync * Complex post processing: Compur vision * From a list of colors (pixel matrix) to meaningful data (i.e. object location based in color tracking) ### How to choose and use a sensor _The section is aimed at **INPUTS** (sensors) but many concepts work also for **OUTPUTS** (motors, LEDs)_ * How to choose sensor? * Integrated circuits, breakout boards, and off-the-shelf devices * [IC Component](https://eu.mouser.com/ProductDetail/Bosch-Sensortec/BNO055) * [Adafruit IMU Breakout](https://www.adafruit.com/product/2472) * [Wii Nunchuck](https://en.wikipedia.org/wiki/Wii_Remote#Nunchuk) (check in Wallapop, Cash converters, Ebay...) * How to wire a sensor? * We will always look for well documented sensors [learn.sparkfun.com](https://learn.sparkfun.com/), [learn.adafruit.com](https://learn.adafruit.com/) * Download the EAGLES from the Breakout boards to help you, [example](https://github.com/adafruit/Adafruit-GUVA-Analog-UV-Sensor-Breakout-PCB) * Electronic recipes * [Voltage dividers](https://learn.sparkfun.com/tutorials/voltage-dividers/all) * [Pull up and pull down resistors](https://learn.sparkfun.com/tutorials/pull-up-resistors/all) * How to code for a sensor? * [Fab Academy sensors](http://academy.cba.mit.edu/classes/input_devices/index.html) * Sensor interfaces: * Is it on? [DigitalRead](https://www.arduino.cc/reference/en/language/functions/digital-io/digitalread/) * What's the voltage? Analog to Digital Converter [AnalogRead](https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/) * How many times on? [Pulses](https://www.arduino.cc/reference/en/language/functions/advanced-io/pulsein/) * Tell me so[Digital Communication](https://learn.sparkfun.com/tutorials/serial-communication/all): [Serial / UART](https://www.arduino.cc/en/reference/serial), [SPI](https://www.arduino.cc/en/Reference/SPI), [I2C](https://www.arduino.cc/en/reference/wire) :warning: *We will always use an specific sensor library implementing the comunication* ## Input devices #2 [Guillem] **:date: 29/03/2019** ### Playing with your Hello Board * [Code Examples] https://github.com/fablabbcn/arduino-workshops/tree/master/Hello%2044 ### When the ATtiny is not enough: Other microcontrollers! _The ATtiny can do amazing things but will require us to optimize the code to an uncessary level when we just want a protoype..._ * [ATtiny44](https://www.microchip.com/wwwproducts/en/ATtiny44) * Example board: [HelloBoard](http://academy.cba.mit.edu/classes/embedded_programming/index.html#echo) * FLASH 4KB * RAM 256B * **Pro:** Digital and Analog Inputs and Outputs * **Con:** No Hardware I2C or Serial * [ATtiny84](https://www.microchip.com/wwwproducts/en/ATtiny44) * Example board: [HelloBoard](http://academy.cba.mit.edu/classes/embedded_programming/index.html#echo) * FLASH 8KB * RAM 256B * **Pro:** Digital and Analog Inputs and Outputs * **Con:** No Hardware I2C or Serial * [ATMEGA328](https://www.microchip.com/wwwproducts/en/ATmega328) * Example board: [FabDuino](http://fabacademy.org/archives/2015/doc/projects/fabkit-0.4.html) * FLASH 32KB * RAM 2KB * **Pro:** Hardware I2C, Serial and SPI * **Con:** No USB Hardware (requires an FTDI) * [ATSAMD21G18](https://www.adafruit.com/product/3405) * Example board: [Adafruit Feather M0](https://www.adafruit.com/product/2772) * FLASH 256KB * RAM 32KB * **Pro:** Multiple I2C, SPIs, Serial and full speed USB * **Con:** No WIFI or Bluetooth * [ESP32](https://www.espressif.com/en/products/hardware/esp32/overview) * Example board: [ESP32 Feather Board](https://www.adafruit.com/product/3405) * FLASH 4MB * RAM 520KB * **Pro:** WIFI and Bluetooth * **Con:** No USB Hardware (requires an FTDI) ## Output devices #1 [Victor] **:date: 04/04/2019** * Actuating, closing the loop. * Controlling electricity to generate movement or light. ### Types of actuator ![](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/DoorBell_001.jpg/1920px-DoorBell_001.jpg =200x) ![](https://upload.wikimedia.org/wikipedia/commons/9/95/Electric_Bell_animation.gif =200x) * Electromagnetic * DC motors * Brushless motors * Servo motors * Stepper motors * Relays, solenoids, valves, etc * Speakers * Electroluminescence * Leds * RGB * Addressable * LCD's (polarized light and liquid crystal) * Piezoelectric * Buzzer and speaker. * [Fab Academy sensors](http://academy.cba.mit.edu/classes/output_devices/index.html) ### Controlling outputs * LED's * One color, PWM for intensity * RGB, PWM * Addressable -> libraries [guides](https://learn.adafruit.com/adafruit-neopixel-uberguide) * Charlieplexing [image](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3d/3-pin_Charlieplexing_with_common_resistors.svg/1920px-3-pin_Charlieplexing_with_common_resistors.svg.png) * DC motor * H-bridges ![](https://cdn.sparkfun.com/assets/learn_tutorials/1/9/3/h-bridge-circuit-600w.gif =200x) * Brushless motor * Search * Stepper Motor * Unipolar * Bipolar * [IC Component](https://www.digikey.com/product-detail/en/allegro-microsystems-llc/A4982SETTR-T/620-1340-1-ND/2237994) * [Step stick](https://www.pololu.com/product/1182) * Buzzer and Speaker * Arduino Tone function * Amplifiers ### How to wire an output? * We will always look for well documented output [learn.sparkfun.com](https://learn.sparkfun.com/), [learn.adafruit.com](https://learn.adafruit.com/) * Download the EAGLES from the Breakout boards to help you, [example](https://github.com/adafruit/Adafruit-TB6612-Motor-Driver-Breakout-PCB) * Electronic recipes * [Voltage dividers](https://learn.sparkfun.com/tutorials/voltage-dividers/all) * [Power Transistors](https://learn.sparkfun.com/tutorials/transistors/all) * Integrated Circuits: H-Bridges, Darlington Arrays... ### How to code for an output? * Output interfaces: * On/Off: [DigitalWrite](https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/) * Pulse With Modulation: [AnalogWrite](https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/) * [Pulses](https://www.arduino.cc/reference/en/language/functions/advanced-io/pulsein/) * [Digital Communication](https://learn.sparkfun.com/tutorials/serial-communication/all): [Serial / UART](https://www.arduino.cc/en/reference/serial), [SPI](https://www.arduino.cc/en/Reference/SPI), [I2C](https://www.arduino.cc/en/reference/wire) :warning: *We will always use an specific sensor library implementing the comunication* ### More outputs recipes ![](https://i.imgur.com/uug5r4L.jpg) ![](https://i.imgur.com/AjcJBRI.jpg) ![](https://i.imgur.com/i4KVRjS.jpg) ![](https://i.imgur.com/db4IDdg.jpg) ![](https://i.imgur.com/a2DAcQR.jpg) ![](https://i.imgur.com/ntOaYfM.jpg) ![](https://i.imgur.com/kFhHwv3.jpg) ![](https://i.imgur.com/cIRinZX.jpg) ![](https://i.imgur.com/wfHSsG7.jpg) ![](https://i.imgur.com/ZfaGMG9.jpg) ![](https://i.imgur.com/sObt2x4.jpg) ![](https://i.imgur.com/gzf5pUh.jpg) ![](https://simple-circuit.com/wp-content/uploads/2018/10/arduino-uinpolar-stepper-motor-control-uln2003a-circuit-1024x453.png) ![](https://i1.wp.com/www.circuitspecialists.com/blog/wp-content/uploads/2012/01/bipolar-vs-unipolar-stepper-motors-circuit-specialists-blog.gif?resize=451%2C305&ssl=1) ## Debugging inputs and outputs [Victor] **:date: 05/04/2019** * Divide and conquer. * Always subdivide the system as much as posible. * Metodic tests ### Hardware * Prototyping before building ![](http://3.bp.blogspot.com/-OlQldAQqZq0/TyeizTbznNI/AAAAAAAAAEU/E8HemqLdZqg/s1600/IMG_0633.JPG =100x) vs ![](https://i.redd.it/5zigf4c0ilwz.jpg =100x) * Multimeter checks * Continuity before and after soldering components * Voltages * Isolating hardware parts, cutting traces, solder bridges, jumpers, designing for debug. * Unconsistent tests --> heat or power problems. ### Software * Creating small sketches for testing specific parts * Using Serial print. * Using defines to build a better Serial Print debug * Using comments to disable code * Structuring the code in functions * Always review compiler error messages. * Get someone else to review your code ## Advanced inputs and outputs recipes and coding [Guillem] * Notes [here](https://hackmd.io/Uw1XxGa7S3qNrL7nChGrcA)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully