×

Dagu Micro Magician V2

Rp327.800

Micro Magician Arduino Bootloader ATMega328 KR03020 with MMA7361 A3906

4 in stock




📍 Self Pickup : Ciledug, Kota Tangerang
Produk juga tersedia di :
🛍️ Shopee | 🛍 ️Tokopedia | Sewa | 💬 WhatsApp
Layanan tersedia :
👨‍🏫 Tutorial | 👥 Konsultasi | 👨‍🔧 Toy Repair <style>

Description

Micro Magician Robot Controller using ATMEGA328 KR03020

Download manual

Download microM Library for Arduino

The Micro Magician V2 is an amazing board from Dagu that has loads of great features that you’ll be able to use for a huge variety of robot projects.

Essentially this is an Arduino, with an onboard dual channel motor controller, a 3-axis accelerometer, an IR receiver and a port that can be used to attach a bluetooth transceiver. This means you can build a robot and drive its motors with just one board, you don’t need any extra shields. Also, the really cool thing is that Dagu have managed to cram all of these features onto a board measuring just 6cm x 3cm, that’s nearly half the area of an Arduino Uno!

The full list of features are

  • Arduino compatible – recognised as an Arduino Pro or Arduino Pro Mini (3.3V, 8MHz) w/ ATmega328
  • Built in dual FET “H” bridge with current limiting (set to 910mA per channel), motor stall detection and electronic braking
  • Microcontroller runs at 3.3V, so it’s safe to connect this board to a Raspberry Pi
  • Built in 3-axis accelerometer with 0G detection and selectable ±1.5G and ±6G ranges
  • Built in 38KHz IR receiver providing 128 virtual buttons when using the Sony IR protocol
  • 4 pin female communications header for 3.3V wireless transceivers (Bluetooth or Xbee)
  • Accepts input voltage from 3.6V to 9V
  • Built in LDO +5V, 1A regulator (input voltage must be at least 5.5V) to power external 5V devices
  • Built in LDO +3.3V, 500mA regulator
  • Reverse polarity protection rated at 6A for protecting servos and motor driver IC
  • Reverse polarity protection rated at 3A for logic and other 3.3V devices
  • Built in USB using the CP2102 interface IC
  • 8x digital I/O pins terminated with 3 pin male header and selectable supply voltage for logic / driving servos
  • 3 pin male headers on analog inputs to provide 3.3V power for sensors
  • ISP socket for bypassing the bootloader and programming the processor directly
  • Power, Rx, Tx, D13 and IR signal indication LEDs
  • Software library provides functions for IR decoding, angle / impact detection, motor control

Examples video :

This example line follower robot :

Source Code Line Follower :
/*
   Basic line follower.

   Goal in life...
      Finding lines to follow :-)

   Written by Scott Beasley - 2015
   Free to use or modify. Enjoy.

   NOTES: Before starting the bot up, place it where the CENTER sensor is on the
   line and the left and right is off.
*/a

/*
   Uses the MicroM library for the Micro Magician robot contoller board.
   Download from top link
   Unzip and copy to your Arduino library folder or follow the instructions
   here: http://arduino.cc/en/guide/libraries
   Uses the Metro libary as well. See http://playground.arduino.cc/code/metro
   for downloading and more infomation.
*/

#include "microM.h"
#include "Metro.h"

// Sensor pin defines
#define SENSOR_L A3 // Left sensor pin
#define SENSOR_M A4 // Middle sensor pin
#define SENSOR_R A5 // Right sensor pin

// Speed defines
#define ONLINESPEED 110 // Speed to move when the bot in on the line
#define FORWARDTURNSPD 100 // Turning forward speed
#define BACKWARDTURNSPD -85 // Backup turning speed

// Micro Magician uses 0 for no brake and 1 for brake
#define BRAKEOFF 0
#define BRAKEON 1

/*
   Globals area. Try to keep them to a minimum :-)
*

/ Create the motor and Metor objects with use to interface with
Metro sensorrd = Metro (5); // Timer for every 5ms

// Storage for the "calibation" numbers. Only using the online_avg
// but you may want to look at the offline one for compairing sake.
int online_avg = 0, offline_avg = 0;

void setup ( )
{
   // Do a SIMPLE calibration. Not a great one, but one.
   for (int i=0; i < 20; i++) {
      offline_avg += analogRead (SENSOR_L);
      offline_avg += analogRead (SENSOR_R);
      online_avg += analogRead (SENSOR_M);
   }

   online_avg = online_avg / 20;
   offline_avg = offline_avg / 40; // Average of the Left and Right sensors

   // Start moving the bot forward.
   microM.Motors (ONLINESPEED, ONLINESPEED, BRAKEOFF, BRAKEOFF);

   Serial.begin (9600);
}

void loop ( )
{
   // Read the sensors every 5ms and act upon it.
   if (sensorrd.check ( ) != 1) {
      return;
   }

   // Read all 3 senors and return line position condition
   byte direction = read_sensors ( );

   switch (direction) {
      case 0: // On the line Middle sensor. Keep moving forward.
         microM.Motors (ONLINESPEED, ONLINESPEED, BRAKEOFF, BRAKEOFF);
         Serial.println ("moving forward");
         break;

      case 1: // On the line Left sensor. Move right forward.
         microM.Motors (FORWARDTURNSPD, BACKWARDTURNSPD, BRAKEOFF, BRAKEOFF);
         Serial.println ("moving right");
         break;

      case 2: // On the line Right sensor. Move left forward.
         microM.Motors (BACKWARDTURNSPD, FORWARDTURNSPD, BRAKEOFF, BRAKEOFF);
         Serial.println ("moving left");
         break;

      case 3: // Lost! Move right (spin).
         microM.Motors (BACKWARDTURNSPD, 0, BRAKEOFF, BRAKEOFF);
         Serial.println ("lost!");
         break;
   }
}

// Read all the sensors and figure out where the line is
byte read_sensors ( )
{
   byte sensors = 3; // Init with lost setting and change otherwise.

   // Read Sensor in middle
   int mid_read = readSensor (SENSOR_M, 2) - online_avg;

   // Read Sensor on Left
   int left_read = readSensor (SENSOR_L, 2) - online_avg;

   // Read Sensor on Right
   int right_read = readSensor (SENSOR_R, 2) - online_avg;

   // Figure out line postion in regards to the 3 sensors
   // The sensor with the largest number wins!
   if (mid_read > left_read && mid_read > right_read)
      sensors = 0;
   else if (left_read > right_read)
      sensors = 1;
   else if (left_read < right_read)
      sensors = 2;

   // Return postion found or '3' if no line was found
   return sensors;
}

// Read sensor n times and return an average reading
int readSensor (int analog_pin, int sample_rate)
{
    int sum = 0;

    for (int i = 0; i < sample_rate; i++) {
       sum += analogRead (analog_pin);
    }

    return (sum / sample_rate);
}

Additional information

Weight 0,1 kg
Skill Programming

Level 3

Skill Elektrikal

Level 3

Skill Robotika

Level 2

Skill DIY - Do it yourself

Level 1

Skill Soldering

Level 3