Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Re: Need Help In MOSFET Substitution--SOLVED on: April 20, 2013, 11:25:25 pm
I was just notified on the manufacturer's web forum that it is an AO3418 from Alpha Omega and in stock at Digikey.  Woo hoo!

Thanks for everyone's help all the same.
2  Using Arduino / General Electronics / Re: Need Help In MOSFET Substitution on: April 20, 2013, 11:15:13 pm
...that might not mean the replacement has to be soldered in exactly the same way. Eg, mount it up a bit and solder 3 wires,
etc. Jury rigs aren't always pretty, especially if they replace a marginal design with
something a lot better. The MOSFET I cited is tiny in comparison to a TO-220.
It was just a thought.

A great idea only the one you suggested seems too big if I comprehend the data sheet correctly.  But as you say I'm not committed to putting it exactly where the last one was.  Since my board was burnt up I really have nothing to lose trying another size as long as it works. 

My other issue is that up until a few days ago I didn't even know what a MOSFET was or how they work.  So I don't know how to evaluate if the new one will totally screw up the flight control despite its ability to withstand a higher current. 
3  Using Arduino / General Electronics / Re: Need Help In MOSFET Substitution on: April 20, 2013, 08:50:49 pm
A photo of the blown MOSFET.
4  Using Arduino / General Electronics / Re: Need Help In MOSFET Substitution on: April 20, 2013, 08:47:06 pm
what makes you think its a MOSFET?

I base it on other people fixing theirs with the IRLML6244TRPBF MOSFET; ie this RC Mini Quad Rotor thread post in which the guy has success in soldering on a new one.: http://www.rcgroups.com/forums/showpost.php?p=24308094&postcount=1448

We need the circuit or as much description as possible. I fly helis and we have a lot of problems with escs failing. Unfortunately most escs do not control their max current and just rely on things working as normal, but in fault conditions the current can go to very high values. Is the motor brushless or brushed. If brushless you will probably have other fets that are damaged as they are connected in three bridge circuits.

 I wish I could describe the circuit but my electronic skills are rather limited.  The craft uses brushed motors.  From my examination of the PCB it appears each motor has its own MOSFET.  The thing only costs $70 but I just want to try and fix it rather than buying a whole new quad or pitching it.  
5  Using Arduino / General Electronics / Re: Need Help In MOSFET Substitution on: April 20, 2013, 05:45:07 pm
But which MOSFET are you trying to replace??  Without knowing that we cannot guess the values of the "crucial parameters"...

Unfortunately I don't know the specifications of the MOFSET it is replacing.  The original has AKPV and 10 on its side.  In forum discussions about its replacement, no one was able to identify the original nor get info from the manufacturer.  If anyone can provide insight on this, I would really appreciate it.

Max current is still the same though, might be worth it to try to find something more
robust. Is there enough room to mount something a little larger than SOT-23? Eg,

http://www.digikey.com/product-detail/en/STB60NF10T4/497-7951-1-ND/1883514



The footprint only allows something like the SOT-23.  Although I have a little flexibility in this as one of the pads was burned away.  I think the configuration of the STM MOFSET is too big.

6  Using Arduino / General Electronics / Need Help In MOSFET Substitution--SOLVED on: April 20, 2013, 02:12:20 pm
I'm attempting to replace a blown MOSFET in an RC Logger Eye One mini quadcopter's flight control board.  I believe there was too much current flow due to a defective motor.  In a forum it was suggested to use a 20V, 6.3A, IRLML6244TRPBF MOSFET   http://www.irf.com/product-info/datasheets/data/irlml6244pbf.pdf.  However, they are out of stock at Mouser, Jameco, Digikey, etc. with stock times months away.  I don't know much about electronics so I need help in evaluating if there are alternatives that will work.  A discussion on the matter stated that the critical factors are the Rds(on) resistance, the switching speed and gate voltage. Would this MOSFET http://www.mouser.com/ProductDetail/Diodes-Inc/DMN2041L-7/?qs=tiksPeNXt0LSbn3jTreVOg%3d%3d match some of the critical parameters?  

Any elementary assistance in evaluating these types of components would be greatly appreciated.
7  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 11, 2012, 06:04:12 pm
Then how does the "if ((time_running == 1) || (time_running == 2))" work in your sketch?
8  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 05, 2012, 11:50:25 pm

Code:
...
  if ((time_running == 1) || (time_running == 2))  // fencing time is counting down or delay time is counting down
  {
    ...

Is this where your button press is a factor?  If so, how do you make your sketch send these values?
9  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 05, 2012, 04:28:03 pm

Something like this for example:

I don't see what the switch statement is achieving there.

What it was acheiving for me was making the structure simpler for me to understand.  Yet it lacks a time function which might be the complicated part.  As some one new to all this I'm still trying to figure out how to meld all these functions to produce a coherent system.

All you need is to apply range checks to the time value to decide which display format to use, followed by a call to the corresponding output function. You already have the range checks in the code there, and if you throw away the switch and simply run through the sequence of if / else if statements it should do what you want.

OK.  I'll work on my if/else functions some more to figure this out.  Last night I tried different approaches using my limited skills and I think I bruised my brain. 

Quote
Should I lean in that direction?

That approach is a lot easier to code and provides better brightness - as the display is essentially is static.


The sketch I referred to only confused me (more so than the cluster I'm dealing with now).  Since I don't have a CD4021 this is a last resort.  Plus my display is plenty bright.  In fact I had to set the brightness at the lowest level to prevent burning my retinas.

No, your approach fine. I did similar, recoginizing the various situations and rolling over the upper digits as needed:...

The buttons & stuff can be read during the intervals when it is Not time to decrement the 1/10th second counter:
Code:
if (100mS elapsed){
// do the digit changing & display updating stuff via MAX7219 SPI.transfer commands
//
}
// rest of the time, read buttons, do other stuff - there is a lot to processing time left to do that stuff.
Lots of things will happen when time is not running - incrementing the score, the period counter, buzzing the score indicator, etc.

So did use use all the millis() if statements to do your timeline or some other timing method?

Thanks everyone,
Steve
10  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 05, 2012, 12:28:24 pm
I've been experimenting with breaks and my while loops and cleaned up my sketch a bit but it is very likely my timer and display functions could be simplified further.  As I mentioned above I have five timer display situations depending on the time elapsed.  Instead of running a bunch of while statements would a switch statement be more clean and efficient?

Something like this for example:

Code:
switch (FUNCTION X) //some sort of clock signal every 100 microseconds
{
case 0:
if(minutes_t > 0); //Time is 20:00-10:00
updateDisplay ();  //Display 00:00 format
case 1:
if(minutes_t <= 0 && minutes_u >= 1)  //Time is 9:59-1:00
updateDisplayUnderTenMinutes();  //Display 0:00 format
case 2:
if(minutes_t == 0 && minutes_u == 0 && seconds_t >= 1); //Time is :59-:10
updateDisplayUnderOneMinute();  //Display 00.0 format
case 3:
if(seconds_t == 0);  //Time is :09.9-:00.0
updateDisplayUnderTenSeconds();  //Display 0.0 format
case 4:
if(tenths_u == 0 && seconds_u == 0 && seconds_t == 0 && minutes_u == 0 && minutes_t == 0) //time up operation - flashing 00:00
timeUp();
         
}

I just need to figure out how to do FUNCTION X and integrate buttons and other controls.  I'd prefer to use the Arduino's internal clock rather than an external clock though. 

A guy who made a similar scoreboard used a CD4021 shift register and an external clock for various controls such as time out, reset, advancing score and such.  I've steered away from his design because his sketch was hard to understand at my current stage.  Should I lean in that direction?
11  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 04, 2012, 01:28:44 pm
First of all, I cribbed this code from someone else so I can't take credit.  However, I can assume blame for aggravating any of its weaknesses.  Basically I took a countdown sketch and attempted to shoehorn my application into it.  I'm new to programming and electronics but I have above average technical skills so I'm hoping to tackle this with guidance. 

It would help if you put each { on a new line, use Tools + Auto Format.
I've never known about this feature but I'll do this when I get home later to clean things up.

In delaySet(), you have an infinite loop with no way to exit it. countDown() should NOT be called from delaySet(). Instead, where the call to countDown() is should be a break statement. That will exit the infinite loop in delaySet(), allowing delaySet() to end, and control to return to loop.
I am familliar with the principals of break statements but have not written any.  I will try my hand at putting one together and give it another shot. 

The countDown() function contains another infinite loop. There is no way that I can see (admittedly, the code structure makes it hard to see, so I might have missed it) to stop the "timer". There is code to suspend the "timer" for 10 seconds, but it's hard to see where that fits in the while loop.
 
These infinite loops are likely preventing my attempts to stop the timer.  I just pasted the code in the sketch at various places and crossed my fingers (this should be an indication of the programming expertise you are dealing with).

Dhenry,
I have to do some research to understand your suggestions.  Are there example sketches you could point me to that illustrate these principals?  I'm sure I've seen some but I'm still learning to understand code.

Thanks, Steve
12  Community / Gigs and Collaborations / Re: Need Help Integrating 7 Segment LED Timer With Switches, Sensors, Audio, Etc. on: December 04, 2012, 10:08:42 am
I'm in the Chicago area.  Your comments on the other thread are very helpful and I'll continue matters there.  Thanks.
13  Community / Gigs and Collaborations / Need Help Integrating 7 Segment LED Timer With Switches, Sensors, Audio, Etc. on: December 03, 2012, 05:47:17 pm
I’m in need of mentoring in making a table hockey scoreboard that incorporates game time, score, and periods with 7 segment LED displays.  This is for personal use as I’m looking to customize a table for my family.   Once I get it set up on a breadboard I will move on to creating a PCB to mount it.

I’ve been able to make a 4 digit LED countdown timer with a Max7219 integrated circuit based on sketches found online.  But I am frustrated by my current inability to stop and start the clock or figure out how to get switches and other stuff to work with it.  The Arduino community is a terrific resource but in the short time I’ve been involved in this I often don’t understand the answers of the questions I ask.  Since there also seems to be countless ways to accomplish the same task I never know what is the best obtion. So for the sake of continuity I’d prefer to deal with one person who is knowledgeable in this area.   Although I certainly like the satisfaction of figuring something out on my own, it isn’t the most efficient way to learn. 

My scoreboard will interact with switches in each of the goals in order to sense the puck entering the net.  Then the switch will trigger the scoreboard to stop the clock, advance the score and play audio.  I have other related functions in mind but for the sake of brevity I wont go into that here.  I’ve mapped out a step by step logic of how, what and when my scoreboard will do what I want it to do.  I just need guidance in how to integrate switch functions, clock functions, display functions and audio functions.

This post is an example of my work (or lack of it) so far:  http://arduino.cc/forum/index.php/topic,135193.0.html

Thanks, Steve

14  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 01, 2012, 09:18:14 pm
Actually I no longer have the display of 09:59 but there is still an image of the zero flashing for a brief time. 

I'm thinking stopping and starting the clock should be so simple but I can't get any of my attempts to work.

Also my ultimate goal is to integrate displays to show scoring, periods, and sound  files to start and stop play.  My current code takes 4672 bytes.  I'm afraid I might run out of memory for the sketch.  Any suggestions on how to simplify what I have at this point?
15  Using Arduino / Project Guidance / Re: Need Guidance on Pausing and Resuming 4 Digit 7 Segment LED Countdown Clock on: December 01, 2012, 06:54:50 pm
Code as promised:

Code:
[code]/////////////////////////////////
// 4-DIGIT TIMER USING MAX7219 //
//       By BulletMagnet83     //
/////////////////////////////////


#include "LedControl.h"


LedControl lc=LedControl(12, 11, 10, 1); //data, clock, load, number of devices

int minutes_t = 0;
int minutes_u = 0;
int seconds_t = 0;
int seconds_u = 0;
int tenths_u  = 0;

void setup () {
  lc.shutdown(0, false);    //wake-up MAX7219
  lc.setIntensity(0, 1);    //medium display intensity
  lc.clearDisplay(0);       //blank display
  pinMode(A5, INPUT);       //minutes button
  pinMode(A4, INPUT);       //seconds button
  pinMode(A3, INPUT);       //start
  digitalWrite(A5, HIGH);   //set pull-up
  digitalWrite(A4, HIGH);   //set pull-up
  digitalWrite(A3, HIGH);   //set pull-up
 
  pinMode(A2, INPUT);       // not really necessary, pins default to INPUT anyway
  digitalWrite(A2, HIGH);   // turn on pullup resistors. Wire button so that press shorts pin to ground.


}

void delaySet () {          //allow user to preset delay time

  while(1) {                  //infinite-loop this block while delay is being set

    lc.setChar(0, 0, minutes_t, false);   //display tens of minutes
    lc.setChar(0, 1, minutes_u, true);    //display ones of minutes, with decimal point
    lc.setChar(0, 2, seconds_t, true);   //display tens of seconds
    lc.setChar(0, 3, seconds_u, false);   //display ones of seconds

    if(digitalRead(A5) == LOW) {          //read input from minutes button
      minutes_u++;                        //increment value by 1
      delay(150);                         //short delay to debounce input, can hold button without it going mad
      if(minutes_u > 9) {                 //this block of statements controls counting
        minutes_t++;
        minutes_u = 0;
      }
      if(minutes_t > 5) {
        minutes_t = 0;
        minutes_u = 0;
      }

    }

    if(digitalRead(A4) == LOW) {          //same here but for seconds
      seconds_u++;
      delay(150);
      if(seconds_u > 9) {
        seconds_t++;
        seconds_u = 0;
      }
      if(seconds_t > 5) {
        seconds_t = 0;
        seconds_u = 0;
        minutes_u++;
      }


    }

    if(digitalRead(A3) == LOW) {

      countDown();            //begin countdown
    }



  }

}

void error() {

  lc.clearDisplay(0);               //blank display
  lc.setChar(0, 1, 'E', false);     //this block writes "Err" to display
  lc.setRow(0, 2, 0x05);
  lc.setRow(0, 3, 0x05);
  tone(7, 700, 10);
  delay(50);
  tone(7, 700, 10);
  delay(50);
  tone(7, 700, 10);
  delay(300);
  delaySet();                       //return to delay set function, previous entry is remembered
 

}


void updateDisplay () {  //displays minutes and seconds in 00:00 format

  lc.setChar(0, 0, minutes_t, false);   //display tens of minutes
  lc.setChar(0, 1, minutes_u, true);    //display units of minutes and lower decimal point
  lc.setChar(0, 2, seconds_t, true);   //display tens of seconds and upper decimal point
  lc.setChar(0, 3, seconds_u, false);   //display units of seconds
}

void udateDisplayUnderTenMinutes(){  // displays minutes and seconds 0:00 format
  lc.setChar(0, 0, ' ', false);   
  lc.setChar(0, 1, minutes_u, true);   //display units of minutes and lower decimal point
  lc.setChar(0, 2, seconds_t, true);   //display tens of second and upper decimal point
  lc.setChar(0, 3, seconds_u, false);  //display units of seconds
}

void updateDisplayUnderOneMinute(){  // displays seconds and tenths of seconds in 00:0 format
  lc.setChar(0, 0, seconds_t, false);   
  lc.setChar(0, 1, seconds_u, true);   //display units of seconds and lower decimal point
  lc.setChar(0, 2, tenths_u, false);   //display tenths of second
  lc.setChar(0, 3, ' ', false);


void updateDisplayUnderTen() {  // displays seconds and tenths of second in 0.0 format
  lc.setChar(0, 0, ' ', false);   
  lc.setChar(0, 1, seconds_u, true);   //display ones of seconds and lower decimal point
  lc.setChar(0, 2, tenths_u, false);   //display tenths of second
  lc.setChar(0, 3, ' ', false);
}

void timeUp () {

  for(int i = 0; i < 6; i++) {

    lc.clearDisplay(0);
    delay(100);
    lc.setChar(0, 0, 0, false);
    lc.setChar(0, 1, 0, true);
    lc.setChar(0, 2, 0, true);
    lc.setChar(0, 3, 0, false);

  }
  seconds_u = 0;    //initialise all variables back to zero
  seconds_t = 0;
  minutes_u = 0;
  minutes_t = 0;
  delaySet();       //return to delay set function

}

void countDown() {

  if(seconds_t < 1 && minutes_u == 0 && minutes_t == 0) {        //user cannot select a delay of less than 10 seconds
    error();
  }
  else {

    while(1) {                  //infinite-loop this block while timer is running unless all digits equal to zero

      static unsigned long lastTick = 0;

      if(millis() - lastTick >= 100) {
        lastTick = millis();
        tenths_u--;
       }
       
      if(tenths_u < 0) { 
        seconds_u--;
        tenths_u = 9;
        updateDisplay();
       }

      if(seconds_u < 0) {
        seconds_t--;
        seconds_u = 9;
        updateDisplay();
      }

      if(seconds_t < 0) {
        minutes_u--;
        seconds_t = 5;
        updateDisplay();
      }

      if(minutes_u < 0 && minutes_t > 0) {
        minutes_t--;
        minutes_u = 9;
        updateDisplay();
      }
      if(tenths_u == 9 && seconds_u == 9 && seconds_t == 5 && minutes_u == 9 && minutes_t == 0) { // display shifts to 9.59 minutes
        udateDisplayUnderTenMinutes();
       
        while(1) {                 
     
           if(millis() - lastTick >= 100) {
           lastTick = millis();
           tenths_u--;
          }
       
          if(tenths_u < 0) { 
          seconds_u--;
          tenths_u = 9;
          udateDisplayUnderTenMinutes();
          }

          if(seconds_u < 0) {
          seconds_t--;
          seconds_u = 9;
          udateDisplayUnderTenMinutes();
          }

          if(seconds_t < 0) {
          minutes_u--;
          seconds_t = 5;
          udateDisplayUnderTenMinutes();
          }
         
        if(tenths_u == 9 && seconds_u == 9 && seconds_t == 5 && minutes_u == 0 && minutes_t == 0)  {  // display shifts to 59.99 seconds
      // At this point the first digit flashes 0 -- !@#%?
        updateDisplayUnderOneMinute();
     
        while(1) {                 
                 
            if(millis() - lastTick >= 100) {
            lastTick = millis();
            tenths_u--;
            updateDisplayUnderOneMinute();   
            }   
           
            if(tenths_u < 0) {
              seconds_u--;
              tenths_u = 9;
              updateDisplayUnderOneMinute();
            }
           
            if(seconds_u < 0) {
              seconds_t--;
              seconds_u = 9;
              updateDisplayUnderOneMinute();
            }
              if(tenths_u == 9 && seconds_u == 9 && seconds_t == 0 && minutes_u == 0 && minutes_t == 0)  {   //display shifts to 9.99 seconds 
                 updateDisplayUnderTen();
         
            while(1) {             
                 
            if(millis() - lastTick >= 100) {
            lastTick = millis();
            tenths_u--;
            updateDisplayUnderTen();   
            }   
           
            if(tenths_u < 0) {
              seconds_u--;
              tenths_u = 9;
              updateDisplayUnderTen();
            }
             
   if (digitalRead(A2) == LOW){   //Button to stop clock - delay it actually
     delay(10000);
      }
            if(tenths_u == 0 && seconds_u == 0 && seconds_t == 0 && minutes_u == 0 && minutes_t == 0)  {   //time up operation - flashing 00:00
        timeUp();
         }  // time up if bracket
        }  //while bracket   
       }  // display shifts to 9.99 if bracket
      }  // 59.99 while bracket   
     }  // display shifts to 59.99 seconds if bracket
    }  // 9.59 while bracket
   } // display shifts to 9.59 minutes if bracket
  }  ////infinite-loop this block while timer is running unless all digits equal to zero bracket
 }  //else bracket
}  //void countdown bracket

void loop () {
  delaySet ();

   
}
[/code]
Pages: [1] 2