Notifications
Clear all

[Sticky] Introduce Yourself  

Page 41 / 42
  RSS

Jimw
 Jimw
(@jimw)
New Member
Joined: 4 weeks ago
Posts: 3
2020-06-19 2:35 am  

@joelyddon Yes, Thank you. I watched that one on youtube. thats the one that  got me to join.


ReplyQuote
jaapspijkerman
(@jaapspijkerman)
Active Member
Joined: 2 weeks ago
Posts: 5
2020-06-26 9:06 am  

Hi everyone,

 

My name is jaap i come from the netherlands

I am 36 years old.

My goal is to get smarter, i have lots of ideas with arduino

But i just got started so i am running into some small issues hopefully someone that is experienced can help me out to solve some issues.

My hobby is to build RC boats.

 


ReplyQuote
adrian
(@adrian)
Active Member
Joined: 2 weeks ago
Posts: 8
2020-06-26 5:30 pm  

Hi,

I'm Adrian and I'm in the security engineering industry. Dusted off some of my electronics books from college to build a few diy projects and found Bill's videos invaluable. Looking forward to help and be helped by the community here!


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 1 year ago
Posts: 660
2020-06-26 6:20 pm  

@adrian

Welcome Adrian!

Perhaps you can help Jaap with his PIR sensor problem.  We're all here to help one another.

SteveG


ReplyQuote
ISH
 ISH
(@ish)
New Member
Joined: 2 weeks ago
Posts: 2
2020-06-29 7:55 am  

Good Morning all,

I am ISH from South Africa. I joined this site because I came across Bills videos on YouTube. I am a new comer to robotics and electronics, with limited basic knowledge thereof. I have a lot of structural and mechanical knowledge. I really would like to learn more about robotics and electronics so that I may design and build my own gear shifter for a automatic transmission.

 

Anxious to get started.

 

Regards

ISH

 

 

ISH


ReplyQuote
MikeL
(@mikel)
New Member
Joined: 2 weeks ago
Posts: 1
2020-06-29 12:37 pm  

High,  I am a 75 year old and am just trying to learn about electronics so am pretty green.  I set my first project as a Father Christmas that lights up when someone walks near, then wave his arm and winks. I thought this might be a fairly easy project to start using an arduino uno. I find Bills videos really helpful but am sure I am going to need assistance as I get further into the project. Look forward to talking to you in the future.  I should add I am from the UK.

 

Regards

Mike


ReplyQuote
Christine86
(@christine86)
Active Member
Joined: 4 weeks ago
Posts: 11
2020-07-02 10:54 am  

Hi,

I'm an electrical engineer, having gone to university for 4 years, & now working for a comms company.

I’m new to this forum, & also to Arduinos & (attempting) to use MOSFETS & Arduinos together to control real world objects.

I wanted to use an arduino to control the current through a load, by leveraging the conductive range of a IRF540 MOSFET between 2.0Volts to saturation at 4.0volts. The idea being that at 2 volts the mosfet ‘appears’ to the load as a high value resistor, till 4.0 volts when the resistance disappears & the MOSFET appears to be closed switch.

To play around with this, I took 5v from the 5v line, ran it through a 220 ohm resistor, then through an LED. I then ran a lead from the other side of the LED to pin 2 of the IRF510. Pin 3 of the IRF510 goes to GND. From pin 4 of the arduino I ran a lead to pin 1 of the MOSFET via a 220ohm resistor (to limit current to the gate).

I thought that by using a PWM signal on pin 4 of the arduino, using values between 103 (about 2V) to 202(about 4V), the LED would go from NOT being lit, to full brightness.

This works as expected, but with any value above zero PWM output, the LED is dimly lit, until a PWM output goes over 102 when the LED begins to brighten.

What am I doing wrong? Am I supposed to have a resistor between Gate & Source, or something else?

Hope someone can help,

Christine


ReplyQuote
JoeLyddon
(@joelyddon)
Reputable Member
Joined: 10 months ago
Posts: 273
2020-07-02 7:17 pm  

@christine86

Welcome aboard!

You will LOVE how you can get educated on this forum!

This may help you with your LED control:

 

Enjoy!

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


ReplyQuote
JoeLyddon
(@joelyddon)
Reputable Member
Joined: 10 months ago
Posts: 273
2020-07-02 7:19 pm  

@mikel

Welcome aboard!

You are going to the MOST FUN here...  getting help, etc. !!

Enjoy!

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


ReplyQuote
JoeLyddon
(@joelyddon)
Reputable Member
Joined: 10 months ago
Posts: 273
2020-07-02 7:21 pm  

@ish

Welcome Aboard!

You have come to the right place for your goals!

Enjoy!

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


ReplyQuote
JoeLyddon
(@joelyddon)
Reputable Member
Joined: 10 months ago
Posts: 273
2020-07-02 7:24 pm  

@adrian

Welcome Aboard!

You will enjoy this forum!

Bill, as you know, is doing a Fantastic job on his videos!

He will blow your mind with goodies you can do!

Enjoy!

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


ReplyQuote
JoeLyddon
(@joelyddon)
Reputable Member
Joined: 10 months ago
Posts: 273
2020-07-02 7:30 pm  

@jaapspijkerman

Welcome aboard!

You WILL get smarter here!

Checkout Paul McWhorter here...  he takes you from Ground Zero, knowing absolutely Nothing and get you up to speed FAST...

https://forum.dronebotworkshop.com/introductions/introduce-yourself/paged/28/

Enjoy!

 

 

Have Fun,
Joe Lyddon

www.woodworkstuff.net


ReplyQuote
ISH
 ISH
(@ish)
New Member
Joined: 2 weeks ago
Posts: 2
2020-07-03 5:32 am  

@joelyddon

 

Thank you for the welcome. Just received my goodie back yesterday. Anxious to get going. Played around last night, just with the breadboard and Arduino, getting a few leds to light up via a switch etc. by-passing pc control, as I had a few issues with my laptop that I hope to sort out today.

 

ISH

ISH


ReplyQuote
zezo999
(@zezo999)
New Member
Joined: 2 weeks ago
Posts: 1
2020-07-03 9:37 am  

Hello everybody, I'm zuhair, mechanical/mechatronics engineer.It is pleasure to join you in this platform and i wish success for everyone.  Thanks


ReplyQuote
Christine86
(@christine86)
Active Member
Joined: 4 weeks ago
Posts: 11
2020-07-03 11:07 am  

@joelyddon

Thanks Joel, I found the video enlightening(he he).

I'm trying to make a NiMH battery charger, using an Arduino mega. I know there re a myriad of boards that do the job for you, but wanted to learn a little about Arduino while doing it myself.

I'm OK with LEDS, I've managed to program a 3.5# HVGA TFT display, & to change the output via interrupts.(see code below) But, I'm having no end of trouble trying to get a IRF540 MOSFET, to alter the charging current. I've substituted a resistor/LED pair(as a substitute for the battery) to brighten or dim by using the VGSmin(2v) & VGSmax(4v) by applying voltages in that range to the gate of the IRF540. THIS is where I'm stuck! ny idea where I could find out more on that aspect of mosfets

Thanks for the help!

Christine

 

/******************************************************
* Written by Christine Whybrow from June 12, 2020 *
* *
* This project will ultimately charge both *
* Ni-MH & LiPo4 Batteries, with seperate Holders for *
* each type. I'm going to make a *
* HVGA 3.5" 480 x 320 Display for the *
* Arduino MEGA 2560. *
******************************************************
*/

// These are the pin settings for my Display, yours may be different!!
// CS CD WR RD RST D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15
//Arduino Mega 40 38 39 / 41 37 36 35 34 33 32 31 30 22 23 24 25 26 27 28 29

#include <LCDWIKI_GUI.h> //Core graphics library
#include <LCDWIKI_KBV.h> //Hardware-specific library
#include <mcu_16bit_magic.h>
#include "Battery_Holder.h"

//Define pins for my MEGA 2560
#define CS 40
#define CD 38
#define WR 39
#define RD 44
#define RST 41

//Start an instance of the Display Class
LCDWIKI_KBV mylcd(ILI9486,CS, CD, WR, RD, RST); //model,cs,cd,wr,rd,reset

//define some 16 bit colour values.
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
#define MAGENTA 0xF81F
#define YELLOW 0xFFE0
#define WHITE 0xFFFF
#define GRAY 0x8410

//Settings for display
#define LANDSCAPE 3
#define PORTRAIT 4
#define HEADING 4
#define SUBHEADING 3

//********************************Type of Holder detected**********************
const int No_Battery_Holder = 0;
const int NiMH_Battery_Holder = 2;//Connected to pins 2 & 3
const int Lithium_Battery_Holder = 3;
int Type_Of_Batteries;

//******************Each Slot has a unique interrupt pin attached to it********
const int Battery_Slot1 = 18;// Each batery slot will have it's own interrupt attached to it
const int Battery_Slot2 = 19;// slot 1 to 18, slot2 to 19 etc
const int Battery_Slot3 = 20;// We can detect when a battery is installed or removed
const int Battery_Slot4 = 21;
bool Debounced = false;

//******************Each type of battery has it's own charging voltage*******************************************
const float Lithium_Charge_Volatage = 4.2;//this voltage is constant while charging
const float NiMH_Charge_Voltage = 1.6;//each type of battery
float Lithium_Charge_Current;
float NiMH_Charge_Current;

//***************************************************************************************************************
//* Determines if an interrupt has settled(debounced) *
//***************************************************************************************************************
bool interrupt_Debounced(int Debounce_Time)
{
static unsigned long Last_Interrupt_Time = 0;
unsigned long Interrupt_Time = millis();
Serial.println(Interrupt_Time);

// If interrupts come faster than 500ms, assume it's a bounce and ignore
if(Interrupt_Time - Last_Interrupt_Time > 500)
{
return true;
}
Last_Interrupt_Time = Interrupt_Time;
return false;
}

//***************************************************************************************************************
//* Draw battery at battery location *
//***************************************************************************************************************

void draw_Battery(int Battery_No, float Battery_Charge)
{

int Width = 60; //Battery thickness
int Height = 160;// battery height
int X_Point;
int Y_Point = 110;
int Battery_Bump_X;
int Battery_Bump_Y;

switch (Battery_No)
{
case 0:
X_Point = 60;
break;

case 1:
X_Point = 160;
break;

case 2:
X_Point = 260;
break;

case 3:
X_Point = 360;
break;
}

Battery_Bump_X = X_Point +24;
Battery_Bump_Y = Y_Point - 10;
Serial.print("Drawing Battery Number ");
Serial.println(Battery_No + 1);
Serial.print("X Point = ");
Serial.println(X_Point);
Serial.print("Y_Point = ");
Serial.println(Y_Point);
Serial.print("Width = ");
Serial.println(Width);
Serial.print("Height = ");
Serial.println(Height);
Serial.println("\n");

// Draw yellow battery outline for battery and top bump
mylcd.Fill_Rect(X_Point, Y_Point, Width, Height, YELLOW);// x coordinate, y coordinate, width, height, colour
mylcd.Fill_Rect(Battery_Bump_X, Battery_Bump_Y, 10, 12, YELLOW);// Outer Yellow battery lip
mylcd.Fill_Rect(X_Point + 4, Y_Point + 4, Width - 8, Height -8, BLACK);//Inner battery outline
}

//***************************************************************************************************************
//* Draw numbers at bottom of screen *
//***************************************************************************************************************

void draw_Numbers()
{

int Battery_No_YCoordinate = 280;//Y coordinate for battery numbers
mylcd.Set_Text_Size(HEADING);
mylcd.Set_Text_colour(WHITE);
mylcd.Set_Text_Back_colour(BLUE);
mylcd.Print_String("1", 80, Battery_No_YCoordinate);
mylcd.Print_String("2", 180, Battery_No_YCoordinate);
mylcd.Print_String("3", 280, Battery_No_YCoordinate);
mylcd.Print_String("4", 380, Battery_No_YCoordinate);
}

//***************************************************************************************************************
//* Change Heading to reflect currently installed Holder *
//***************************************************************************************************************

void draw_Heading(char *Text_To_Write)//writes to the top banner of the screen
{
//Setting x, y, height, width for rectangular filled rectangle
int x = 0; // x corodinate
int y = 0; // y coordinate
int h = 80; // Height of Top Banner
int w = 480; // Width of screen

mylcd.Set_Rotation(PORTRAIT);
mylcd.Fill_Rect(x, y, h, w, WHITE);
mylcd.Fill_Rect(x+5, y+5, h-10, w-10, GREEN);//This gives a border
mylcd.Set_Text_colour(BLACK);
mylcd.Set_Text_Back_colour(GREEN);
mylcd.Set_Rotation(LANDSCAPE);
mylcd.Set_Text_Size(HEADING);
mylcd.Print_String(Text_To_Write, 14, 25);
}

//***************************************************************************************************************
//* On startup, is there a Holder already installed? *
//***************************************************************************************************************

int check_Holder()//Determine whether a battery holder is installed, & which it is
{
for(int test_Pin = NiMH_Battery_Holder; test_Pin <= Lithium_Battery_Holder; test_Pin++)
{
if (digitalRead(test_Pin))
return test_Pin;//Found a holder
}
return No_Battery_Holder;//There is no holder installed
}

//***************************************************************************************************************
//* Check for a Lithium Holder *
//***************************************************************************************************************

void lithium_Holder_In()// Here we determine what to do when the holder changes
{
if (interrupt_Debounced(200))
{
attachInterrupt(digitalPinToInterrupt(Lithium_Battery_Holder), Lithium_Holder_Out, FALLING);//Holder can be removed
turnOn_Interrupts();//All batteries can now be inserted
Serial.println("Detected Lithium Holder being inserted\n\n");
char s[] = " Lithium Holder ";
draw_Heading(s);
Type_Of_Batteries = Lithium_Battery_Holder;
}
}

//***************************************************************************************************************
//* Interrupt for a Lithium Holder being removed *
//***************************************************************************************************************

void Lithium_Holder_Out()//here we catch the REMOVAL of the Lithium Holder (leaving NO holder)
{

if (interrupt_Debounced(200))
{
attachInterrupt(digitalPinToInterrupt(Lithium_Battery_Holder), lithium_Holder_In, RISING);//Holder can insert again
turnOff_Interrupts();// batteries can't be insered while there's no holder!
Serial.println("Detected Lithium Holder being removed\n\n");
char s[] = " No Holder Present";
draw_Heading(s);
}
}

//***************************************************************************************************************
//* Interrupt to Check for a NiMH Holder being inserted *
//***************************************************************************************************************

void NiMH_Holder_In()// Here we determine what to do when the holder changes
{
if (interrupt_Debounced(200))
{
attachInterrupt(digitalPinToInterrupt(NiMH_Battery_Holder), NiMH_Holder_Out, FALLING);//Holder can be removed
turnOn_Interrupts();//All batteries can now be inserted
Serial.println("Detected NiMH Holder being inserted\n\n");
char s[] = " NiMH Holder ";
draw_Heading(s);
Type_Of_Batteries = NiMH_Battery_Holder;
}
}

 

//***************************************************************************************************************
//* Interrupt for a NiMH Holder being removed *
//***************************************************************************************************************

void NiMH_Holder_Out()//here we catch the REMOVAL of the NiMH Holder (leaving NO holder)
{
if (interrupt_Debounced(200))
{
attachInterrupt(digitalPinToInterrupt(NiMH_Battery_Holder), NiMH_Holder_In, RISING);//Holder can insert again
turnOff_Interrupts();
Type_Of_Batteries = No_Battery_Holder;
Serial.println("Detected NiMH Holder being removed\n\n");
char s[] = " No Holder Present";
draw_Heading(s);
}

}

//***************************************************************************************************************
//* Interrupt to Check for a Battery being inserted *
//***************************************************************************************************************

void battery_In()// Here we determine what to do when a battery is inserted in Slot 1
{
/* if (!Type_Of_Batteries) // if there are no holders, ignore interrupts here
{
return;
}
*/
if (interrupt_Debounced(5))
{
//detachInterrupt(digitalPinToInterrupt(Battery_Slot1));
Serial.println("Detected Battery being inserted\n\n");
char s[] = " Battery inserted ";
draw_Heading(s);
}
}

//***************************************************************************************************************
//* Function to turn on Battery Interrupts *
//***************************************************************************************************************
void turnOn_Interrupts()
{
attachInterrupt(digitalPinToInterrupt(Battery_Slot1), battery_In, RISING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot2), battery_In, FALLING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot3), battery_In, FALLING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot4), battery_In, FALLING);
}

//***************************************************************************************************************
//* Function to turn off Battery Interrupts *
//***************************************************************************************************************
void turnOff_Interrupts()
{
detachInterrupt(digitalPinToInterrupt(Battery_Slot1));
detachInterrupt(digitalPinToInterrupt(Battery_Slot2));
detachInterrupt(digitalPinToInterrupt(Battery_Slot3));
detachInterrupt(digitalPinToInterrupt(Battery_Slot4));
}

//***************************************************************************************************************
//* *
//* Set up for main program *
//* *
//***************************************************************************************************************

void setup() {

Serial.begin(9600); //Open the serial port to the PC

int Type_Of_Batteries = No_Battery_Holder;//At first we assume there are no holders or batteries installed

//****************************************Initialize the LCD**************************************************
mylcd.Init_LCD();
mylcd.Fill_Screen(BLUE);

//************************************Write heading to screen*************************************************
char Text_To_Write[] = "Battery Charger 1.0";
draw_Heading(Text_To_Write);

//*********************************Call battery drawing function**********************************************
for (int i=0; i<4; i++)
draw_Battery(i, 0.0);

//*********************************Call number drawing********************************************************
draw_Numbers();

delay(2000);//Let the display be visible,
//before actually starting the chrging process

//********************************Get the Arduino pins ready**************************************************
pinMode(NiMH_Battery_Holder, INPUT);
pinMode(Lithium_Battery_Holder,INPUT);

pinMode(Battery_Slot1, INPUT_PULLUP);// These are interrupt pins for the
pinMode(Battery_Slot2, INPUT_PULLUP);// individual slots of the battery holders
pinMode(Battery_Slot3, INPUT_PULLUP);// You can place the battery in ANY slot
pinMode(Battery_Slot4, INPUT_PULLUP);// & there's no need to double up!!!

//******************************Call the function to set interrupts for Battery Slots*************************

//***************************Now attach our Battery INTERRUPTS to their pins**********************************
attachInterrupt(digitalPinToInterrupt(Battery_Slot1), battery_In, FALLING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot2), battery_In, FALLING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot3), battery_In, FALLING);
attachInterrupt(digitalPinToInterrupt(Battery_Slot4), battery_In, FALLING);

noInterrupts();//Let's check if there's a holder first

//assume no holder present
int this_Holder = check_Holder();
Serial.print("Returned battery holder ");
Serial.println(this_Holder);
char holder_Type1[] = " No Holder Present";
char holder_Type2[] = " NiMH Holder ";
char holder_Type3[] = " Lithium Holder ";

switch (this_Holder)
{
case No_Battery_Holder:
draw_Heading(holder_Type1); //Now attach our Battery Holder Type INTERRUPTS to their pins
attachInterrupt(digitalPinToInterrupt(NiMH_Battery_Holder), NiMH_Holder_In, RISING);
attachInterrupt(digitalPinToInterrupt(Lithium_Battery_Holder), lithium_Holder_In, RISING);
break;

case NiMH_Battery_Holder:
draw_Heading(holder_Type2);
attachInterrupt(digitalPinToInterrupt(NiMH_Battery_Holder), NiMH_Holder_Out, FALLING);
attachInterrupt(digitalPinToInterrupt(Lithium_Battery_Holder), lithium_Holder_In, RISING);
break;

case Lithium_Battery_Holder:
attachInterrupt(digitalPinToInterrupt(Lithium_Battery_Holder), Lithium_Holder_Out, FALLING);
attachInterrupt(digitalPinToInterrupt(NiMH_Battery_Holder), NiMH_Holder_In, RISING);
draw_Heading(holder_Type3);
break;
}
interrupts();//Turn them on again

/* if(this_Holder == No_Battery_Holder)
{
char Text_To_Write[] = " No Holder Present";
draw_Heading(Text_To_Write);
}*/
}

void loop() {

}

/*class Battery_Holder:: public Holder
{

}
*/


JoeLyddon liked
ReplyQuote
Page 41 / 42