Show Posts
Pages: [1] 2 3 ... 16
1  Using Arduino / Project Guidance / Need advice for my Battery powered DC-DC power supply/ Battery discharger on: August 27, 2014, 12:59:16 am
Always want to build a digital power supply, have tried many times, but all failed terribly, and this would be my fourth attempts. want to get some help from expert out there. Please if you can spot some potential problem, let me know.

Here is what my Power supply should be able to do:
-1.3-20V adjustable regulated output (Spent few hours hacking a step Up/Down board just for it to do that; tested, 4 amp output at 20V)
- Current monitor using a 5W 1 ohm resistor ( 1mv drop = 100ma )
- Constant current control (Using above current read out to finely adjust the PWM feeding to the P-Channel mosfet (with this affect my voltage output?? ))
-Battery dicharger/Test at different discharge rate ( Using the same 5W resistor to discharge a battery through a NPN resistor with its base connect to a PWM pin)
2  Using Arduino / Project Guidance / Re: Battery powered DC lab bench power supply controlled by arduion on: August 26, 2014, 08:24:48 am
you could use http://www.farnell.com/datasheets/1639075.pdf Ic for application

Since controller require few mA current , SO i don't think you must use high rated regulator. I would like to interface your microcontroller . Can u share us simple connection diagram of interface.



I have bought some mini booster/buck modules, hacked them, and build my power supply based on that. This is easier for me.

For that failed project shown in the picture; Basically, it consists a hacked 5v mini lithium portable supply circuit for powering my arduino and recharge my lithium battery ; the main board with arduino nano brain, a digital pot for controlling the voltage of the booster, a 5W resistor for measuring the current, a temp resistor for high temp shut down and some wires for 3 buttons, 2 control pins for PWM for control the current, few pins for the LCD. On the left, are a heat-sink with the booster/buck modules with 1 NPN, and 1 Mosfet;  I don't have the diagram that I draw on a paper anymore.  It didn't work because some how the digital pot burned down by the high voltage of the booster for no reason, 10K digital pot, only 40V max output.
3  Using Arduino / Project Guidance / Battery powered DC lab bench power supply controlled by arduion on: August 26, 2014, 06:43:16 am
I always want to have those huge bench power supply with adjustable voltage of 1-30V and current of 0-5 amp, but they are too expensive and too bulky to me, and so I have always wanted to build one by myself.  I think 1-20V @  around 1.5 amp is all that I need.

I have tried many times, burned 2 nano boards, 1 min pro board and some dollar components, and spent more than 2 weeks getting nowhere. The attached photo is one of them.

Any tips will be great!
4  Using Arduino / Installation & Troubleshooting / Re: Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 25, 2014, 09:12:58 am
When A5 and A4 are always used as inputs, use resistors of 4k7 to those analog input pins.

Pin A4 and A5 are also used for I2C, perhaps you can use other analog pins ? to be able to add I2C later.

Drawing a schematic is best done with Eagle. It is hard to get to know, but afterwards it was worth it.
http://www.cadsoftusa.com/download-eagle/freeware/

To have something to start with, you can download the Eagle schematics from the Arduino pages.
http://arduino.cc/en/Main/arduinoBoardNano

great! thanks. I will be working on that. Eagle seems promising to me
5  Using Arduino / Installation & Troubleshooting / Re: Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 25, 2014, 04:11:53 am
Yes, half-broken is possible. I remember that others blow the analog section. But since you don't know what else is damaged, you have to replace it.

Can you make a schematic ?
When you are only measuring with those pins, you can add a protection resistor of 1k or 4k7 to the Arduino input pins (analog or digital). The input will be protected, and the accuracy is almost the same.

Okay. I don't have another nano, but I do got few atmega823 chips. I am going to build my own board from now on. any tips? I want this to be breadboard friendly. the attached kk photo is the simple schematic.  can you recommend me a free easy to use schematic  making software? I use "Quite Universal Circuit Simulator" to make this schematic, but I don't like it.
6  Using Arduino / Installation & Troubleshooting / Re: Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 25, 2014, 01:24:35 am
Hi,

Regardless of what you did and what the damage is, damaging an analog input does not necessarily requires new board.
I had boards with damaged analog, where I simply switched to another analog input. Normally not all are in use, and this will only require minor change in software.
Try other inputs. They are probably still OK.

I know; I have tested all analog pins already; all the same.
7  Using Arduino / Installation & Troubleshooting / Re: Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 24, 2014, 11:44:41 pm
Was it a capacitor ? That has almost unlimited current.
A capacitor with a voltage near 6V could indeed damage (a part of) the microcontroller.
So yes, your Arduino Nano is probably broken  smiley-cry 
(considering that half-broken is broken).

Did you build a project ? Which one ? I would like to see the schematic. Measuring a capacitor while the capacitor is not empty is an easy to make mistake. There should be some protection.

I think it's half-broken too, but is it even possible, half-broken?... I am measuring super capacitor of 100f 2.7 volt. I am using a DC-dc booster circuit to charge the capacitor through a 1 Ohm resistor, and by simply measure the voltage drop of that resistor, I can get how many current is getting in the capacitor, and then I just removed the power supply, and discharge the capacitor using the same 1 ohm resistor and measure the current as well.

guess, I need to get another one board again. Having broken 2 already.
8  Using Arduino / Installation & Troubleshooting / Re: Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 24, 2014, 06:29:06 pm
The 5.5V is not very high, are you sure it wasn't more ?

Which Arduino board are you using ?
When an analog input is damaged, the whole analog section can be damaged. That is possible.
I don't know about the timer.

maybe 6.0v, but definitely not higher than 7v.  I am using nano; everything seems to be fine, except the 2 observed problems.

There are the code. a simple program with LCD for capacitor discharge testing.
Code:
#include "ClickButton.h"
#include <LiquidCrystal.h>

LiquidCrystal lcd(7,6,5,4,3,2);

//------------------------------------------------------------------------------------------------------
byte battery[8] = {
  0b01010,
  0b11111,
  0b10001,
  0b11111,
  0b10001,
  0b11111,
  0b10001,
  0b11111
};

ClickButton ba(9, LOW, CLICKBTN_PULLUP);
ClickButton bb(8, LOW, CLICKBTN_PULLUP);

int sec=0;
int Min=0;
int hr=0;
int halfDay=0;
int day=0;
int AmPm=0;
char* APM="AM";

int capPercent=0;
float capV=0;
int amp=0;
int mah=0;
long total=0;
float ref=0.80;

unsigned long nowtimer=0;
unsigned long pretimer=0;

//------------------------------------------------------------------------------------------------------
void setup()
{

  lcd.begin(16,2);
  lcd.createChar(1, battery);

  ba.multiclickTime = 50;
  bb.multiclickTime = 50;   

}


//------------------------------------------------------------------------------------------------------
void loop()
{
  ba.Update();
  bb.Update(); 

  if(AmPm==0) APM="AM";
  else APM="PM";
 
 
 
 
  float shunt = analogRead (A3);
  amp= shunt*5.0/1024.0*1000.0*ref;
 
  capV= analogRead (A5);
  capPercent= capV/1024.0*5.0/2.7*100.0*ref;
 
 
  mah=total/3600;
 
 

  nowtimer=millis();
  if(nowtimer-pretimer>=1000) {
    sec++;
    pretimer=nowtimer;   
 
 total= total + amp;   
   
  char buffer[17];
  sprintf(buffer, "A:%04d C:%02d %04d", amp, capPercent, mah);
  lcd.setCursor (0,1);
  lcd.print (buffer);   
 
 

  char yyy[17];
  sprintf( yyy, "%c %02d:%02d:%02d:%02d %s", 0x01, day, hr, Min, sec, APM);
  lcd.setCursor (0,0);
  lcd.print ( yyy );   

 
  } 

  if(sec==60){
    Min++; 
    sec=0;
  }
  if(Min==60){
    hr++; 
    Min=0;
  }
  if(hr==12){
    AmPm=!AmPm;
    halfDay++;
    hr=0;
  }
  if(halfDay==2){
    halfDay=0;
    day++;
  } 


  //=====================

 



  //================================ 

  if(ba.clicks==1) sec=0; Min=0;
  if(bb.clicks==1) total=0; 

  if(ba.clicks==-1) ;
  if(bb.clicks==-1) ;

}

//------------------------------------------------------------------------------------------------------

9  Using Arduino / Installation & Troubleshooting / Is my arduino dead? 5.5v applied to a4 pin for a sec on: August 24, 2014, 06:07:43 pm
The cause
during an experiment, I accidentally applied about 5.5 volt to an analog input pin for a few second. Everything seems to be fine, and I have a LCD hooked up to my arduino all the time and it still displays texts in the way I programmed, and I am able to upload sketch to the board.

The problem:
1, one of the input reading never goes to 0, even after I connected it to the ground.
2, I have a clocked timer running, but when it goes up to 60 second, it doesn't advance to 1 minute.

The question:
Is my arduino dead, bad or whatever it's now, and is there a way for me to fit it up?
10  Using Arduino / Programming Questions / Re: Steady Analog Reading goes up and down on: August 24, 2014, 06:45:21 am
Quote
I am measuring voltage drop across a resistor,

So is this the reading which is varying?

Code:
float shunt = analogRead (A4);

As I said, a good start to diagnose the problem is to look at the raw readings.

Code:
int temp = analogRead (A4);
Serial.print("A4 = ");
Serial.println(temp)
float shunt = temp;

If the raw readings are steady, problem lies in the code.  If they are varying, sounds more like a hardware-related thing.




Thank you. I think I got it. Just hooked my reading inputs to a variable resistor, and the reading is fine. The problem is because I am using a dc-dc power switching supply.
11  Using Arduino / Programming Questions / Re: Steady Analog Reading goes up and down on: August 24, 2014, 06:25:07 am
Hi arduinomagbit

Quote
I don't understand why my reading goes up and down, 200-600ma.
Quote
Reading from my multimeter shows about 200mv and it doesn't go up and down.

Can you clarify which reading you mean?  You've mentioned mA and mV above smiley

Code:
  float shunt = analogRead (A4);
  capV= analogRead (A5);

If the problem is with one of these values, have you tried printing the raw integer values returned by the analogRead() statements?  Are they varying unexpectedly?

Can you post a diagram of your hardware.

Regards

Ray


Hi ray. I am measuring voltage drop across a resistor, so mv is ma, same thing. Is there anything wrong with this simple program? I am very scared using floats. Every time it gives me some kind of problem.
12  Using Arduino / Programming Questions / Steady Analog Reading goes up and down on: August 24, 2014, 06:12:18 am
I don't understand why my reading goes up and down, 200-600ma. Reading from my multimeter shows about 200mv and it doesn't go up and down.

Code:
int capPercent=0;
float capV=0;
int amp=0;
int mah=0;
long total=0;
float ref=0.80;

Code:
 
  float shunt = analogRead (A4);
  amp= shunt*5.0/1024.0*1000.0*ref;
 
  capV= analogRead (A5);
  capPercent= capV/1024.0*5.0/2.7*100.0*ref;
 
 
  mah=total/3600;


Code:
total= total + amp;   
   
  char buffer[17];
  sprintf(buffer, "A:%04d C:%02d %04d", amp, capPercent, mah);
  lcd.setCursor (0,1);
  lcd.print (buffer);   
 
13  Using Arduino / Displays / Re: LCD connections with Arduino Ethernet shield on: August 23, 2014, 01:51:39 am
For my project I am using arduino ethernet shield shield, I want to connect a LCD display with my Ethernet shield to display sensor readings(sensors will be connected to the ethernet shield) and display a digital clock on it.But I am really confused about which pins to use as according to arduino tutorials pins 12,11,4 on ethernet shield can't be used and the LCD display uses these pins for connection to arduino. I have gone through many posts on this topic but none of them answers my queries.Any help would be appreciated. 

For normal LCD, you need at least 6 pin, you iterate them by this:
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

* LCD RS pin to digital pin 12
 * LCD Enable pin to digital pin 11
 * LCD D4 pin to digital pin 5
 * LCD D5 pin to digital pin 4
 * LCD D6 pin to digital pin 3
 * LCD D7 pin to digital pin 2

they have to be in this order. meaning, RS is always the first one.
=================================================
for I2S LCD, you just need to connect the 2 pins to your arduino, and you need to know the I2S address of your LCD. For your project, I high recommend I2S LCD, namely only 2 pins are required. you don't even need a shield.
14  Using Arduino / Displays / Re: 1602 LCD Internal contrast and brightness control J1 J2 J3 R1-R9 16x2 on: August 23, 2014, 01:46:34 am
There are hundreds (probably thousands) of different LCD display modules out there that use the HD44780U compatible controller.  They do not however all use the same circuitry on their pc boards.

I don't think the  brightness of the LCD is adjustable and the contrast of the LCD is almost universally controlled by an external potentiometer.

Pins 15 and 16 have nothing to do with the LCD, they typically provide power to the backlight.  Those resistors may be current limiting resistors for the backlight so you may be able to vary its brightness via the jumpers, but not the brightness of the display itself.

You may be able to power the backlight via connections near one end of the display but you will then need to provide external current limiting resistors.

We will be better able to determine what those resistors do if you provide good photographs of both sides of your module along with a link to it's datasheet.


Don





thank you. I understand about pin 15, 16 are just a connector to the LED backlight through R8, R9. One of them is 0 ohm, and one is 220 ohm. The thing I don't understand is what those 3 jumpers do, and how to use R7 (0 ohm as well) to control the contrast of the LCD. My LCDs model is 1602A; I bought few of these from different sellers, and they are all the same pretty much. so I think there is a standard for these LCD modules.
15  Using Arduino / Displays / Re: 1602 LCD Internal contrast and brightness control J1 J2 J3 R1-R9 16x2 on: August 23, 2014, 01:41:00 am
J1 to J3 are the jumpers that are used to configure the 3.3V version of the module when the adjacent U3 "charge pump" IC together with C1 and C2 are fitted to generate 6V from the 3.3V supply.

R1 to R5 (2k2 or "222") are the resistors which provide from the contrast voltage, the six multiplexing voltages used to drive the display.  R7 is an additional jumper ("000") related to these contrast voltages.  Nothing to fiddle with here.

R8 and R9 (when present) are the current limiting resistors for the illuminating LED.  One is usually zero, the other 100 ohms ("101") meaning you need no other limiting resistor to operate from 5V.  If you don't power the LED (pins 16 and 16) you will have great difficulty reading the display.


Thanks for the info. I understand R8 and R9, but the rest is not very clear to me, so how can I control the contrast of the LCD using R1-R7? Maybe I can't? I am pretty good at SMT soldering, and I have a stock of SMT resistors, so I really want to save external component for a cleaner project by doing onboard contract control.
Pages: [1] 2 3 ... 16