First appearance: Visuino Obstacle Module, Hoofer Centrifugal, OLED Lcd, DRV8825 Driver

In this tutorial we will use stepper driver DRV8825, Organic light-emitting diode lcd, IR sensor faculty, led, buttons, resistors, stepper motor, Arduino Mega and Visuino to pop/period when obstacle is detected by IR sensor. Watch a demonstration video.

Step 1: What You Wish Need

  • Arduino MEGA (can be some other Arduino)
  • Breadboard (surgery breadboard buckler)
  • Jumper wires
  • RED LED (or any other color)
  • IR sensor module
  • OLED lcd
  • 4X Pull-up resistance (50k ohm)
  • Stepper motor 28BYJ48 (can be whatever other high stepper, just now make sure that you know how to cable it along controler)
  • DRV8825
  • Condenser 100qF/16V
  • Visuino program: Download Visuino

Step 2: The Electric circuit

  • Connect GND from Arduino to the breadboard pin(-)
  • Connect 5V from Arduino to the breadboard pin(+)
  • Connect IR sensor pivot(vcc) to bread board fall(+)
  • Connect IR sensor pin(gnd) to breadboard pin(-)
  • Link up IR sensor pin(AO) to Arduino pin(2)
  • Connect pin(13) from Arduino to the resistor
  • Connect resistor to LED(+)
  • Get in touch LED trap (-) to breadboard pin(-)
  • Unite OLED Liquid crystal display pin(vcc) to bread board pivot(+)
  • Relate OLED Liquid crystal display pin(gnd) to breadboard pin(-)
  • Plug in DRV8825 RESET and SLEEP pin to breadboard positive fall
  • Connect DRV8825 GND pin to breadboard negative pin
  • Connect DRV8825 DIR pin to Arduino immobilize (5)
  • Connect DRV8825 STEP pin to Arduino peg (6)
  • Link up Power Supplying for the motor to DRV8825 VMOT and GND
  • Associate Capacitor crossways VMOT and GND
  • Connect stepper motor as shown happening the picture.

(note that this centrifugal is UNIPOLAR but the driver is old for Janus-faced motors, so we will wire this motor as information technology would be BIPOLAR, this means that we will left one wire unconnected) **if the motor is humming and not moving when you run the electric circuit, it means that the wires of the motive are non connected aright **To check what wires are A1,A2 operating theatre B1,B2 on a motor use multimeter (beep function) and link wires to information technology, if it beeps it means you take over found the right pair

Step 3: Start Visuino, and Take the Arduino MEGA Board Type

To bulge programming the Arduino, you will need to have the Arduino IDE installed from Hera: http://www.arduino.mil/.

Please Be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you set up 1.6.7 or higher, otherwise this Instructable wish non work!

If you have not done fall out the steps in this Instructable to setup the Arduino IDE to political platform E.S.P. 8266! The Visuino: https://www.visuino.EC also needs to be installed.

Start Visuino as shown in the first picture Click on the "Tools" clitoris on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino MEGA 2560" as shown on Picture 2

Step 4: In Visuino Tot Components

  • Add Pulse Generator, set frequency to 200
  • Add Inverter component
  • Total AND Logic gates
  • Add Led component
  • Bestow ObstacleAvoidance component
  • Contribute Delay component and set interval to 50
  • Add OLED display component
  • Double click OLED component adver in the dialog (right)select "Fill screen" embroil it to the left side subordinate properties set color to tmcBlack
  • prize "Attract Bitmap" drag it to the left-wing side under properties "Bitmap" load wanted bitmap (like stoppage sign), under properties "X" set IT to 40, and "y" to 20
  • select "Draw Text" drag it to the left side and nether properties "Text" type "CLEAR Elbow room", low-level properties "X" position it to 10
  • superior "Draw Text" drag IT to the left broadside and under properties "Text" typewrite "DETECTED OBSTCALE", under properties "X" Set it to 10

Step 5: In Visuino: ​Conjunctive Components

  • Connect Impulse Generator pin Out to logic gate1 factor pin [1]
  • Connect logic gate1 component pin [out] to Arduino pin appendage [7]
  • Connect Led1 pin [out] to Arduino pin member [13]
  • Connect ObstacleAvoidance1 pin [out] to logic gate1 component pin [0]
  • Connect ObstacleAvoidance1 pin [proscribed] to inverter1 portion pin [in]
  • Connect Inverter1 tholepin [out] to LED1 pin[in]
  • Connect Inverter1 pin [out] to OLED Fill Screen1
  • Connect Inverter1 pin [out] to Delay1 pin [bulge out]
  • Connect Delay1pin [down] to OLED Draw Text1
  • Connect Delay1pin [out] to OLED Disembowel Bitmap1
  • Connect ObstacleAvoidance1 immobilise [out] to Organic light-emitting diode Take in
  • Touch base ObstacleAvoidance1 pin [out] to Fill Screen1
  • Connect Arduino pin serial[0] to Oled LCD pivot[in]
  • Link Arduino pin digital out[2] to ObstacleAvoidance1 personal identification number [in]
  • Connect Arduino pin digital out[2] to Arduino pin sequent[in]
  • Touch base OLED lcd I2C peg [out] to Arduino I2C peg [in]

Step 6: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Construct" Tab, make a point the correct port is elect, past click connected the "Compile/Build and Upload" button.

Step 7: Play

If you might the Arduino Mega faculty, the Oled LCD will start screening text "Clear-cut way" and the stepper will rotate, once you put any obstacle infront of IR sensor, the stepper causative bequeath stop and LCD will show "obstruction detected".

Extolment! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.European Economic Community

Be the First to Parcel

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022