Pages: 1 [2] 3 4   Go Down
Author Topic: Arduino powersupply from 27V~  (Read 2885 times)
0 Members and 1 Guest are viewing this topic.
Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Got everything ready for it now, just asking a last time before destroying anything...

Should I be able to just connect the minus to GND and the 5.01V to the 5V pin on the Arduino, and then power it all from that?

Yep, sounds like it's time for the smoke test.  smiley-wink

Just kidding, you seem to have done a nice construction job and should have no problems.

Lefty
Logged

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1383
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You'll have to disconnect the 7805 from the 27 volt feed circuit and I'd even suggest that you remove the 7805 all together, otherwise you'll have two 5 volt regulators (yours and the arduino) trying to feed a single circuit without blocking diode isolation.  This could lead to instability.

Congrats on a neat build.

jack
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
You'll have to disconnect the 7805 from the 27 volt feed circuit and I'd even suggest that you remove the 7805 all together, otherwise you'll have two 5 volt regulators (yours and the arduino) trying to feed a single circuit without blocking diode isolation.  This could lead to instability.

Congrats on a neat build.

jack
Feeding it by the 5V pin should bypass the regulator on the Arduino? Because it is on the output side of it, shouldn't it?

Just finished the first of the code for it too
Code:
#include <WiServer.h>
#define WIRELESS_MODE_INFRA      1
#define WIRELESS_MODE_ADHOC      2

#include <WString.h>                // include the String library

boolean debug = true;

// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,1,10};      // IP address of WiShield
unsigned char gateway_ip[] = {192,168,1,1};      // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0};      // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"dd-wrt"};            // max 32 bytes

unsigned char security_type = 3;      // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"xxxxxxxxxxxxxxx"};      // max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,      // Key 0
                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      // Key 1
                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,      // Key 2
                          0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00      // Key 3
                        };

// setup the wireless mode
// infrastructure - connect to AP
// adhoc - connect to another WiFi device
unsigned char wireless_mode = WIRELESS_MODE_INFRA;

unsigned char ssid_len;
unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------


int motorPin =  0;    // Pin the motor trigger is connected to

void doorMove()
{
  digitalWrite(motorPin, HIGH);
  delay(100);
  digitalWrite(motorPin, LOW);
}

// This is our page serving function that generates web pages
boolean sendMyPage(char* URL)
{
  String temp = "";
  temp += URL;
  
  for (int i=0; i < 60; i++)
  {
    temp.append(URL[i]);
  }
  
  if (debug) Serial.println(temp);
    
  if(temp.contains("?do="))
  {
    temp = "";
    for (int i=0; i < 60; i++)
    {
      temp.append(URL[i]);
    }
    
    String function = temp.substring(temp.indexOf("=")+1, temp.length()-2);
    
    WiServer.print("Doing: "); WiServer.print(function);
    
    if (function.contains("move"))
    {
      doorMove();
      return true;
    }
  
    WiServer.print("Did: "); WiServer.print(function);
  }
  
  else if (strcmp(URL, "/") == 0)
  {
    // Use WiServer's print and println functions to write out the page content
    WiServer.print(analogRead(0));
    return true;
  }
  
  WiServer.print("No function");
  return true;
}

void setup()
{  
  pinMode(motorPin, OUTPUT);
  digitalWrite(motorPin, LOW);
  
  // Initialize WiServer and have it use the sendMyPage function to serve pages
  WiServer.init(sendMyPage);
}

void loop()
{
  // Run WiServer
  WiServer.server_task();
}

Instead of > if (function.contains("move"))

I first tried > if (function == "move")

but that is giving me > error: ambiguous overload for 'operator==' in 'function == "move"'

isn't it possible to somehow verify a string like that?
« Last Edit: June 06, 2010, 12:51:38 pm by bld » Logged

captain-slow.dk | non contagious!

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm doing something that may be somewhat similar (routerbot using an unmodified wireless router) and have found it very helpful for trouble shooting to open a serial port and have the result of each operation sent back to the serial monitor for review.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Executing the functions is not a problem, only the way to determine what function it is.

Another problem is now that the 5V output can't even pull the arduino, and far from with the wishield on.

Voltage drops to 1.04V with the wishield on, and 2.42 with it off.

No idea why, the datasheet for the transistor said it would take a lot more (cant remember exactly what it was) than what I should need. What can be wrong? (or maybe i read the datasheet wrong?)

Update

Problem is both on the 5V and 12V... the 12V drops to 2.5V with the arduino on, and without and only pulling one relay, it is 10.25V.

And by just pulling one relay the transistor gets VERY warm after only two minutes.

Must have been reading wrong somewhere on how much they could take, what should I take instead of them then?
« Last Edit: June 06, 2010, 01:44:25 pm by bld » Logged

captain-slow.dk | non contagious!

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The thread is somewhat rambling so I'm not really sure of your wiring. Be aware that the relays in the pix probably take several amps to operate, and the 7805 type regulators are probably only rated for 1 amp max current. This could be an issue if you try to power any significant load using the 7805 type regulator chips.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like the arduino is taking much more than one relay.

The 12V drops to around 10.25V when pulling one relay, and all the way down to 2.42V with the arduino on, and not pulling any relay.

But what can I use instead then, something similar that just can deliver more?

And since the usb port only can deliver 500mA, shouldn't the transistor then be able to pull it easily, as the usb limit is only half of what it is rated for.
« Last Edit: June 06, 2010, 01:53:00 pm by bld » Logged

captain-slow.dk | non contagious!

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You probably need to draw a schematic of your wiring using MS paint or similar so it will be clear to others as to how you have wired your project.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1383
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like you may have your inverse diodes connected the wrong way round.   The bar shown on the diode (cathode) must be connected to the positive side of your 12 volt rail.
As suggested, rough out a schematic and we'll be better able to interpret your problem.
jack
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A little drawing of what I did.


(Full size: http://peecee.dk/uploads/062010/1port_psu_3_drawup.jpg)

The AC input and the positive output of the bridge is of curse not touching each other, drawing error.
« Last Edit: June 06, 2010, 02:28:58 pm by bld » Logged

captain-slow.dk | non contagious!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17292
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


My guess is you don't have a large enough input filter cap after the rectifier, the 100ufd is large enough when there is little current draw, but as you draw more load the pulsating DC is causing the regulators to drop out of regulation. If would be fine if you were feeding the board with 24vdc, but with feeding in 24vac there is not enough filtering to smooth out the 120hz pulses. I would think 1,000 to 2,000 ufd would be called for, wired right across the + and - terminals of the bridge rectifier.

Lefty
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, got twu 300uF(M) (no idea what the M stands for), can try and hook them up to it too.
Logged

captain-slow.dk | non contagious!

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the resistance of the relay coils? Are you rectifying 24v AC into ~24v DC?
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 9
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Capacitors added, same result as before.

The input is around 27V, and after the bridge the DC shows around 30V. And stays there when the 5V and 12V is dropping, so it must be after (or) the transistors the problem is?
Logged

captain-slow.dk | non contagious!

SW Scotland
Offline Offline
Edison Member
*
Karma: 17
Posts: 1383
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Diodes look to be connected correct way round.

I take it that you are connecting the ULN2803 input to the 5volt supply to switch on the relay.

Your sketch looks OK.  If you've wired up on strip board are you certain that you've cut the relevant tracks OK and none are shorting.  An underside view of the board would be useful.

When you load the system, what happens to the 27V ac.  Does it droop excessively.  As long as it stays above 15 volts the circuit should work.

Previous comment that those relays will draw several amps is mistaken.  Even at 200ohm coils they are only going to draw 60ma each, which is well within the ratings of your regulators.

You mention the "transistor" gets hot, what transistor.

jack
Logged

Pages: 1 [2] 3 4   Go Up
Jump to: