Project #12: Robotics - MOSFET - Mk28

Project #12: Robotics - MOSFET - Mk28

https://www.donluc.com/?p=4392

https://www.youtube.com/watch?v=mWxGzeSVdPg

#DonLucElectronics #DonLuc #Arduino #MOSFET #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

Crowtail - MOSFET

Crowtail - MOSFET enables you to control higher voltage project, say 50 Volt DC, with low voltage, say 5 Volt, on microcontroller. MOSFET is also a kind of switch. There are two screw terminals on the board. One for input power source and the other for device you want to control. Crowtail - MOSFET will pass the power from one end to another when closed. But if outer power source is absent, your device can still draw power from microcontroller via the Crowtail interface.

Crowtail - Mini Fan 2.0

This is a Crowtail mini fan with the mini motor driver which use the whole analog circuit.

DL2504Mk04

1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - MOSFET 2.0
1 x Crowtail - Mini Fan 2.0
1 x 2 AAA Battery Holder with On/Off Switch
1 x Crowtail - Rotary Angle Sensor 2.0
1 x Crowtail - LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable

Crowduino Uno - SD

SCL - A5
SDA - A4
POT - A0
MOS - 5
LEDG - 6
VIN - +5V
GND - GND

DL2504Mk04p

DL2504Mk04.ino

CODE
/****** Don Luc Electronics © ******
Software Version Information
Project #12: Robotics - MOSFET - Mk28
DL2504Mk04p.ino
DL2504Mk04
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - MOSFET 2.0
1 x Crowtail - Mini Fan 2.0
1 x Crowtail - Rotary Angle Sensor 2.0
1 x Crowtail - LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable
*/

// Include the Library Code
// EEPROM library to read and write EEPROM with unique ID for unit
#include <EEPROM.h>
// Wire
#include <Wire.h>
// Liquid Crystal
#include "LiquidCrystal.h"

// MOSFET
int mosfetPin = 5;

// Liquid Crystal
// Connect via i2c
LiquidCrystal lcd(0);

// LED Green
int iLEDGreen = 6;

// Rotary Angle Sensor
int iPot = A1;
// Change Your Threshold Here
int Threshold = 0;
int zz = 0;

// EEPROM Unique ID Information
String uid = "";

// Software Version Information
String sver = "12-28";

void loop() {

  // isMOSFET
  isMOSFET();

  // Display MOSFET
  isDisplayMOSFET();

  // Delay
  delay( 500 );

}

getDisplay.ino

CODE
// getDisplay
// Crowbits - OLED 128X64 UID
// Display UID
void isDisplayUID(){

  // Set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  // Cursor
  lcd.setCursor(0, 0);
  lcd.print("Don Luc Electron");
  // Cursor
  lcd.setCursor(0, 1);
  // Print a message to the LCD.
  lcd.print( sver );

}
// Display MOSFET
void isDisplayMOSFET(){

  // Clear
  lcd.clear();
  // Set the cursor to column 0, line 0
  lcd.setCursor(0, 0);
  lcd.print( "MOSFET" );
  // Set the cursor to column 0, line 1
  lcd.setCursor(0, 1);
  lcd.print( zz );
  
}

getEEPROM.ino

CODE
// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

getMOSFET.ino

CODE
// MOSFET
// isMOSFET
void isMOSFET(){

  // Rotary Angle Sensor
  // Threshold => 0~255
  zz = analogRead( iPot );
  Threshold = map( zz, 0, 1024, 0, 255);

  // MOSFET
  // Threshold
  analogWrite(mosfetPin, Threshold);

}

setup.ino

CODE
// Setup
void setup()
{
 
  // Delay
  delay(100);
  
  // isUID EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);
  // LED Green
  digitalWrite(iLEDGreen, HIGH);

  // Delay
  delay(100);

  // Rotary Angle Sensor
  pinMode(iPot, INPUT);
  
  // Delay
  delay(100);

  // Declare the motorPin as an OUTPUT:
  pinMode(mosfetPin, OUTPUT);

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 5 Second
  delay( 5000 );

}

People can contact us: http://www.donluc.com/?page_id=1927

Electronics, IoT, Teacher, Instructor, R&D and Consulting

-Programming Language
-Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc...)
-IoT
-Wireless (Radio Frequency, Bluetooth, WiFi, Etc...)
-Robotics
-Automation
-Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
-Unmanned Vehicles Terrestrial and Marine
-Machine Learning
-Artificial Intelligence (AI)
-RTOS
-Sensors, eHealth Sensors, Biosensor, and Biometric
-Research & Development (R & D)
-Consulting
-Etc...

Follow Us

Luc Paquin – Curriculum Vitae - 2025
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

icon DL2504Mk04.zip 229KB Download(0)
License
All Rights
Reserved
licensBg
0