Show Posts
Pages: [1] 2 3 4
1  Using Arduino / General Electronics / PWM P channel MOSFET on: September 07, 2014, 11:33:13 pm
I am working on a project for my car and currently want to control the speed of the blower on the HVAC system. I ran into the problem that the negative is tied to ground. My solution... I hope is to use a P channel MOSFET. I have  several IRF9540 and having issues pulling up the gate. The MOSFET gets hot without a load... first one started smoking so I trashed it.

I tried to drive the MOSFET directly with the Arduino and using a NPN transistor 2N3904.

I am trying to find a p channel with a logic gate I am considering get the FQP27P06 but I am not sure if that is going to work better.

I am a hobbyist and I am still learning how to read datasheets. I will try to attach schematics tomorrow to help explain what I have setup.
2  Using Arduino / Installation & Troubleshooting / Replacement diode Mega 2560 D1 on: August 03, 2014, 02:39:01 pm
I am not sure if this is the right place to post this.  I ended up frying the diode off the external power connector on my Arduino Mega 2560 and I am looking for a replacement. I am having a hard time trying to find this on Digikey or Mouser. The value is M7 on the Eagle file but I can't find a part number.
3  Using Arduino / Programming Questions / Re: What is needed for FTDI on: May 04, 2014, 01:04:28 pm
I have a 3RD pro mini that programmed successfully and was able to repeat the outcome. I am still unsure what is the issue is with the other two. Might be a poor connection with the header. Thank you everyone for the help.
4  Using Arduino / Programming Questions / Re: What is needed for FTDI on: April 22, 2014, 10:43:28 pm
My old sketch is still running so I am assuming the bootloader is still on there. I tried another mini that I have successfully programmed via ISP and receive the same error. I read that the FTDI might be flashed with the wrong settings so I downloaded Mprog and reflashed the eeprom with the default settings. then I read and parsed to verify everything was successful. I've also tried re installing the drivers several times.

5  Using Arduino / Programming Questions / Re: What is needed for FTDI on: April 18, 2014, 01:20:24 pm
I am assuming Arduino does have power the LED is lit; The middle pad and +5v are now solder together. I was able to program the mini using an Arduino Mega but now I am using the Mega for a permanent project and thats why I bought the FTDI programmer. More than likely the FTDI programmer is a clone.

Using a meter I verified TX pin to TX on the IC and the same for RX. I check both on the FTDI chip and the atmega328.

6  Using Arduino / Programming Questions / What is needed for FTDI on: April 18, 2014, 12:05:28 am
Hey guys,
Just bought a USB FTDI programming board. Having some issues with programming my arduino mini.  AVRDude
Below is how I have it connect.
FTDI Board - Mini
TX - RX1

I am running on Windows 8.1 using Arduino version 1.0.5,
Com Driver is CDM 10.00(the latest from have the set the com port to 7 and check the "Set RTS on Close"
I have Pro Mini 328 5V selected. I am unsure of what programmer to select I do not have an option for FTDI

I am getting avrdude: stk500_getsync(): not in sync: resp=0x00 as my error which I believe is communication error.

Please help
7  Using Arduino / Programming Questions / Re: error: invalid types 'char[int]' for array subscript on: February 16, 2014, 09:18:35 pm
I actually found a better library that serves my purpose
8  Using Arduino / Programming Questions / error: invalid types 'char[int]' for array subscript on: February 16, 2014, 03:25:13 pm
I found this a while back not sure if it was originally written in c or c++... been trying to convert it to work with Arduino. I am just trying to make this bit work and will add some more in the future.

I keep getting the error: invalid types 'char[int]' for array subscript  on this line " encrypted += original[temp] ^ (int(key) + temp) % 255;"

char original = 'put me in a box, a box of worms';
char key = 'z';
char end;
char getKey;
int temp = 0;
String encrypted = "";
String unencrypt = "";

void setup(){
  end = original ^ key;
  getKey = original ^ end;

void loop(){
void c(){// add variable in future
  temp = 0;
  while(temp < sizeof(original)){
    encrypted += original[temp] ^ (int(key) + temp) % 255;
  Serial.print("Encrypt: ");

void d(){
  temp = 0;
  while(temp < sizeof(original)){
    unencrypt += encrypted[temp] ^ (int(key) + temp) % 255;
  Serial.print("Decrypt: ");
9  Using Arduino / Programming Questions / Re: Help with TFT Display on: February 10, 2014, 07:50:40 am
Check out

Also... which arduino are you using
10  Using Arduino / Programming Questions / Re: TFT LCD analog gauge on: February 09, 2014, 03:46:32 pm
I have something working now with a pot as my "sensor" I am getting a pretty interesting flickering wave effect. I've added delayMicroseconds; it helps a little. I might end up adding something where it just draws a line over the last position and see if that helps. Below is what I have so far.
#include <UTFT.h>
extern uint8_t SmallFont[];
UTFT myGLCD(ITDB32S, 38,39,40,41);   // Remember to change the model parameter to suit your display module!

void setup(){
  myGLCD.setBackColor(50, 50, 50);
double mD(double x, double in_min, double in_max, double out_min, double out_max)//Map double
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
void drawNeedle(int sensor,int pos_x, int pos_y){

  double pi = 3.14159265;
  double x = 0; // setting variable to 0 is not needed, it will be written over anyways, it just looks good.
  double y = 0;// same as above
  double cur = mD(analogRead(sensor),0,1023,0,pi);
  int rad = 50; // radius 50 pixels
  x = pos_x + sin(cur + (pi/2)) * rad;
  y = pos_y + cos(cur + (pi/2)) * rad;
  myGLCD.drawLine(pos_x,pos_y,x, y); // (cx, cy, calculated x, calculated y)
  myGLCD.printNumF(cur,2,CENTER,10);//used for debugging 
void loop(){
  delayMicroseconds(30000);//Added to reduce flickering
11  Using Arduino / Programming Questions / Re: TFT LCD analog gauge on: February 08, 2014, 02:12:45 pm
Thanks that helped a lot.
12  Using Arduino / Programming Questions / TFT LCD analog gauge on: February 06, 2014, 10:51:31 pm
I am using the library from to interface with my TFT LCD.  I want to make an virtual level gauge with an arm that pivots a center point like your gas gauge or pressure gauge. The sensor I am using is on A0 and A1. If there is already a post on this please point me in that direction... anything will help.

13  Using Arduino / Programming Questions / Re: analogRead convert to voltage analogReference question on: November 18, 2013, 12:36:37 am
Thanks everyone for the feedback, after playing around I finally got something to work.
using Wikipedia and modified the map function
this is pretty much right on.

float R1 = 98100;
float R2 = 9750;

//VIN -----[R1]--+---[R2]---GND
//               |
//               A0

float Vout = 5; //max volt for analog pin
int minVolts = 0; //min volts
float maxVolts = Vout/(R2/(R1+R2)); // calculate voltage divider
// VOUT = (R2/(R1+R2))*VIN
// VIN = VOUT/(R2/(R1+R2))
// R1 = ((R2*VIN)/Vout)-R2
// R2 = R1/((VIN/Vout)-1)
const int batteryPin = 0;//analogPin

void setup(){

void loop(){
  int val = analogRead(batteryPin);
  float volts = mapFloat(val,0,1023,minVolts,maxVolts);

float mapFloat(float x, float in_min, float in_max, float out_min, float out_max)
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;

14  Using Arduino / Programming Questions / analogRead convert to voltage analogReference question on: November 11, 2013, 01:43:22 pm
Hello Everyone,
I have a couple of questions... I using a scale voltage divider to read the value of a car battery. Below is a rough schematic and code that I am using. the voltage I am reading with the arduino between sensorValue and GND does not match the voltage I am reading with my Multimeter.  I am assuming the default analogReference is External is this correct?
In the code below if I change the refVolt to what I read on my multimeter between aRef and GND then the voltage matches, but I notice the voltage on Aref is constantly changing.
In another part of my circuit(not shown below) I have a +5V Fixed-Voltage Regulator. is there a way I could set aRef to be a fixed 5 volts?

                                100k         10k
~12-15VDC --------^^^^-----^^^^-----GND
                                     sensorValue (A0)
float refVolt = 5.0;
void loop(){
// read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (refVolt  / 1023.0);
  // print out the value you read:

15  Using Arduino / General Electronics / Semi-automatic transmission on: August 19, 2013, 11:08:59 am
If there is a post already about this please let me know.

has anyone tried making a Semi-automatic transmission( with Arduino and their existing automatic transmission? I know there are a few kits out there, but I think this might be a good open source project.
Pages: [1] 2 3 4