Show Posts
Pages: [1] 2
1  Using Arduino / General Electronics / Re: MOSFET + PWM wont give me full voltage on: August 18, 2013, 10:16:59 am
No, it does NOT do that.

You have a constant voltage of 12V.  What does that 12V go in to?  And please don't say "The MOSFET"...

I put a fan in and now i get between 3.5 and 12v. Why cant i get lover?
2  Using Arduino / General Electronics / Re: MOSFET + PWM wont give me full voltage on: August 18, 2013, 09:16:10 am
That circuit is not switching 0-12V, it is turning a ground connection on and off.

Yes using PWM to aquire a specific voltage between 0v and 12v. Only im geting just between 12.2 and 11.8 for some reason..
3  Using Arduino / General Electronics / Re: MOSFET + PWM wont give me full voltage on: August 18, 2013, 09:04:24 am
We need to know the actual components

Which MOSFET?

Which solenoid?

The one in the fritz diagram is logic level and low Rds(on), which matters.

Sorry, for the lack of information. Im not using the solenoid just the rest of the setup.

http://www.uni-kl.de/elektronik-lager/413916 Thats is the MOSFET it's a logic-level MOSFET.

Im not using -60 +60. Im using 12v and 0v.
How can you not be using the solenoid (or something else that is switched on and off)?  The "rest of the setup" is designed to switch something.  What is it you are switching?  It can't be "nothing", or there will be a big hole in your circuit and it's no wonder it's not working.

Please show the actual circuit you are working with, not the circuit that you based your circuit on.

Im building a variable Power supply. Are you telling me i can't messure 0-12v without load on the circuit??
4  Using Arduino / General Electronics / Re: MOSFET + PWM wont give me full voltage on: August 18, 2013, 08:41:59 am
I haven't had a 'good' thought in years... All of mine are Magnificent. Much too good to share with the great unwashed.

Good for you i guess.. Not sure how that's relevant to the thread though?
5  Using Arduino / General Electronics / Re: MOSFET + PWM wont give me full voltage on: August 18, 2013, 08:40:10 am
We need to know the actual components

Which MOSFET?

Which solenoid?

The one in the fritz diagram is logic level and low Rds(on), which matters.

Sorry, for the lack of information. Im not using the solenoid just the rest of the setup.

http://www.uni-kl.de/elektronik-lager/413916 Thats is the MOSFET it's a logic-level MOSFET.

Im not using -60 +60. Im using 12v and 0v.
6  Using Arduino / General Electronics / MOSFET + PWM wont give me full voltage on: August 17, 2013, 07:01:43 am
My setup wont give me low voltage either. The orignal problem uses 12.2v and a downstream N-channel MOSFET. That setup will only go from 12.2 down to 11.8.

Im using this setup (not the same MOSFET, but a type that worked before).

http://bildr.org/blog/wp-content/uploads/2012/03/rfp30n06le-arduino-solenoid.png

My code is real simple

Code:

#define voltageP     3

int voltage(int voltage)
{

    analogWrite(voltageP, voltage);
 
}

void setup()
{
}


void loop()
{
 
 
 voltage(255);
 
}
 

So to solve the problem i did the same setup on a lab board. This setup runs the arduino 5 volts and power an LED. This setup, with the same code will only go between 2 and 4 volts...

Any good thoughts?
7  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 28, 2013, 08:54:59 am
Sooo...  smiley-roll

First i would like to thank you for all yout help.

The problem is now solved. Last time I checked the soldering between the pins on I2C and the LCD i found that one had i glitch so i soldered it better. I was getting ready to remove the I2C and keep going with my project. But i thought that i should check the pins once more. I foud that V0 and RS didn't connect att all..

So, what can we learn from this thread? The picture sends a clear message...
8  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 27, 2013, 11:37:53 am
I found some new code, updated on the suppliers page (I2C supplier)

Quote

definitions in LiquidCrystal_I2C.cpp are incorrect and must be changed

#define LCD_BACKLIGHT 0x08
#define LCD_NOBACKLIGHT 0x00

#define En B00000100 // Enable bit
#define Rw B00000010 // Read/Write bit
#define Rs B00000001 // Register select bit

void LiquidCrystal_I2C::send(uint8_t value, uint8_t mode) {
 uint8_t highnib=value&0xf0;
 uint8_t lownib=(value<<4)&0xf0;
 write4bits((highnib)|mode);
 write4bits((lownib)|mode);
}



Still no mention of what library to use. I have sent a mail asking though..

So, beeing a newbie, could anyone explain to me what im supposed to do with this? smiley

EDIT: I searched through the mentioned file and changed about half of it until i reliazed i whould probably ask you guys first the values i FMs lib did not match the ones in my quote...
9  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 25, 2013, 08:34:49 am
Quote
Resistors are 4k6

How did you determine this?

Don

I used a multimeter.. And the engineer i got them from told me :-)
10  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 25, 2013, 03:33:42 am
I have not used that library but this line looks strange.


puttelino,
If the pin numbers between the LCD and the PCF8574
in your table are correct then the bit numbers you used in the constructor appear to be correct.

What value is the pullup resistor?
To me the photo it looks like
Yellow/Orange/Black = 43 ohm?
Or possibly
Yellow/Red/Black = 42 ohm?

Which is too low. I think min is like 1k.
Have you measured the resistors just to verify that they
are what you think they are?


With the blinking in the sketch
Are you saying the backlight is now blinking at 1 second intervals?
If you change the delays  in loop() does it change accordingly?



Not that it will matter in this case but
I would use the newer constructor that includes the bit number of the backlight and the polarity
and not use the setBacklightPin() - that function it is obsolete.
I'd also not use the setBacklight() function particularly with the value HIGH.
HIGH is for digitalWrite() and not for this function. setBacklight(brightvalue) is to set the
intensity of the backlight, which this hardware does not support.
If it did, it would be very dim when a value of 1 is used.
A better function to use would be backlight() and noBacklight().
Using those ensures that the code will work correctly even on interfaces
that do support dimming as those function are guaranteed to turn the backlight
on full bright or completely off regardless of whether the hardware supports dimming.

--- bill
Resistors are 4k6

Yes the backlight does what the codesays. I will post more at home!
11  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 24, 2013, 06:10:19 pm
I have not used that library but this line looks strange.

LiquidCrystal_I2C    lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

If I were writing the library I would have arranged it with En and Rs swapped to match the device itself.

LiquidCrystal_I2C    lcd(I2C_ADDR,Rs_pin,Rw_pin,En_pin,D4_pin,D5_pin,D6_pin,D7_pin);


Don

Seem logical. Sadly it made no difference...
12  Using Arduino / Displays / Re: Only blobs, using nano and Emall-4u backpack. on: March 24, 2013, 12:11:03 pm
Code:
#define I2C_ADDR    0x20  // Define I2C Address where the PCF8574A is
Well something is wrong here since the 'A' version of the device has addresses between 0x38 and 0x3F.

Don

The comment is not up to date. I got 0x20 from the supplier and I2C-detected it aswell..

Edit: It's a PCF8574T BTW..
13  Using Arduino / Displays / [SOLVED] Only blobs, using nano and Emall-4u backpack. on: March 24, 2013, 11:04:03 am
Im using a nano board v3.0
Malpartida v1.2.1 library

This is the backpack I2C im using:
http://www.ebay.com/itm/390527388644?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2648

The LCD itself is a 20x4 (J204A):
http://www.ebay.com/itm/290703654171?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2648


So far, the LCD lights up, gives me blobs on rows 1 and 3 (Not initializing). I ha no problems getting the LCD up without I2C.

I traced the pins. *(Pin on the chip)

BACKLIGHT_PIN     3 (7)*

En_pin   2  (6)
Rw_pin  1  (5)
Rs_pin   0  (4)  
D4_pin   4  (9)
D5_pin   5  (10)
D6_pin   6  (11)
D7_pin   7  (12)

For now im running this code. It does turn the light on and off.

Code:

#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR    0x20  // Define I2C Address where the PCF8574A is
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{

  lcd.begin (20,4);
  // Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home ();                   // go home

  lcd.print("SainSmart I2C test");  
  lcd.setCursor ( 0, 1 );        // go to the next line
  lcd.print("F Malpartida library");
  
  

  
 }

void loop()
{
  
    delay(1000);
    lcd.setBacklight(LOW);
      delay(1000);
    lcd.setBacklight(HIGH);
}
14  Using Arduino / Displays / Re: How to use this PCF8574 board from "emall-4u" on: March 24, 2013, 06:57:43 am
So i traced all the pins. Seems the thread starter has the right combination for my setup aswell. Now what?

Edit: I2C-detec finds an adress att 0x20 aswell...

So you are saying you have traced all the connections from PCF8574 pins to the LCD?
Can you list each of the pin numbers on the PCF8574 that connect to the LCD and then
which LCD pins they connect to?

What about the backlight? How is it wired up?
Is there a transistor? If a transistor what type, NPN or PNP and how is
is wired up to the LCD?
What does the backlight jumper do?

If it is the same as TomKi's board, then
use the newer constructor that TomKi provided that includes the backlight bit and the backlight polarity.
Then initialize it using:

Code:
lcd.begin (20,4);  // initialize the lcd
You shouldn't use lcd.setBacklightPin() that is a legacy api function.
The constructor now contains all the needed information.

Then it should work.
If the board supports backlight control you can try turning on/off the backlight using
lcd.backlight() and lcd.noBacklight()

That should do it.
If not, then there might be a i2c communication issue.
Do you have pullups on the i2c signals?

--- bill


I traced the pins to *(Pin on the chip)

BACKLIGHT_PIN     3 (7)*
En_pin   2  (6)
Rw_pin  1  (5)
Rs_pin   0  (4) 
D4_pin   4  (9)
D5_pin   5  (10)
D6_pin   6  (11)
D7_pin   7  (12)

This code makes the backligt turn on and off still get blobs though...

Code:
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>

#define I2C_ADDR    0x20  // Define I2C Address where the PCF8574A is
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7

int n = 1;

LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

void setup()
{

  lcd.begin (20,4);
  // Switch on the backlight
  lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);
  lcd.setBacklight(HIGH);
  lcd.home ();                   // go home

  lcd.print("SainSmart I2C test"); 
  lcd.setCursor ( 0, 1 );        // go to the next line
  lcd.print("F Malpartida library");
 
 

 
 }

void loop()
{
 
    delay(1000);
    lcd.setBacklight(HIGH);
      delay(1000);
    lcd.setBacklight(HIGH);
}

Removing the baklight jumper kills the baklight. Seems the connect to VCC.

I have been using Malpartidas lib all along (v1.2.1). I have pullups (4k6)
15  Using Arduino / Displays / Re: How to use this PCF8574 board from "emall-4u" on: March 23, 2013, 02:18:17 pm
So i traced all the pins. Seems the thread starter has the right combination for my setup aswell. Now what?

Edit: I2C-detec finds an adress att 0x20 aswell...
Pages: [1] 2