Pages: [1] 2   Go Down
Author Topic: Drive a solid state relay with low voltage  (Read 4174 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'd like to drive some SSRs but my input signal is only 0.4V high, and the SSR lowest input voltage is 3V.
How can I drive these? If it can be useful, I have also a 6V VCC.
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

With such a low voltage, you won't even be able to switch on a transistor (needs 0.7V min).  You could use an op-amp as a non-inverting amplifier, and get a 4V swing.  Or, you could use a comparator and compare your signal with, say, a 0.2V fixed voltage.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Take a look at the Seiko S-882Z series  charge pump which has a 0.3V - 3V input.
Also look at the Advanced Linear 0V threshold MOSFETs  (e.g. ALD110900ASA)

(* jcl *)
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you guys! I'll have a look on your suggestion right now.

The 0.4V is coming from a 1-wire switch called DS2406.
The data sheet says "PIO channel A sink capability of 50mA at 0.4V; maximum operating voltage of 13V at PIO-A"

http://pdfserv.maxim-ic.com/en/ds/DS2406.pdf
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There isn't 0.4V coming out of the output. It is an open drain which means it sinks
current and doesn't source current.

You need to put a pull-up resistor on the output (one end of the resistor to the
output the other end to your six volt supply). You will then get a signal that
is either 6V or 0.4V.

(* jcl *)
Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Jluciani for the reply... I tried the pull-up resistor as shown in this example circuit to drive a relay


I don't have 1k resistor, so i tried with 220 or 2.2k, the 10k on its place, the voltage now has been increased but the difference between on or off it's again 0.4V. Also I noticed when  I try to measure voltage output with the tester the Arduino VRM heats up a lot which I suppose i'm doing a short circuit.
Is it correct the circuit in the picture? Maybe it's the 2N3906 that does the magic, but I don't have it.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The LED is reversed in the schematic.

You need a transistor to drive the relay. The 3906, as shown, will work. You
could use an NPN -- wire one side of the relay coil to +5V and the other
side to the collector of the NPN. The base would attach to PIO output as shown.

(* jcl *)
« Last Edit: March 21, 2009, 12:50:36 pm by jluciani » Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm working with the pull-up resistor....

If I connect a 10k resistor to the PIO pin and +5V (I'm using Arduino power now), I see the 0.4V on - 0V off.
If I connect a 10k resistor to the +5V and a 220ohm resistor to the PIO pin, I see between the two resistor 1.25V on and 0.90V off.
If I don't have correct high and low voltages I think I can't drive the transistor...

I really can't sort this out smiley-sad
« Last Edit: March 23, 2009, 07:19:31 am by agentsmith » Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you keeping the data line high when you stop transmitting data? Since the
one-wire device is powered from the data line it needs to be high (for a minimum
period of time) to charge its internal capacitor.

In the diagram the pin one label on DS2405 is wrong. It should be GND not VDD.
The part is wired correctly.

(* jcl *)
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you have a pull up to +5 on the DQ line? You need one.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you guys for the replies!
Yes I have the pull-up resistor for 1-wire bus and the code keeps the data line high.. I'm using the tried-and-true OneWire library smiley

I spent the whole evening trying all sorts of circuits and understanding the meaning of "open drain" and "sink capability".
I ended up with conclusion that if I feed +5V, an open drain transistor like the DS2406 PIO pins with sink capability of 0.4V means it can go from +5.0V to +4.6V.
It can't go from +5.0 to +0.4V, though I'd like if it could work like this. Do you agree?

The problem is that I have a high at 5.0V and a low at 4.6V. But I need to drive a solid state relay which has a >3V high, and a L298 H-bridge which has a >2.3V high.
How can I bring down the voltage enough to fall between the thresholds?

I tried this circuit and doesn't work

I used a BC547B which I think it's the same, and with +5V to the collector, 0-0.4V on the base I have 0-0.08V on the emitter.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I spent the whole evening trying all sorts of circuits and understanding the meaning of "open drain" and "sink capability".
I ended up with conclusion that if I feed +5V, an open drain transistor like the DS2406 PIO pins with sink capability of 0.4V means it can go from +5.0V to +4.6V.
It can't go from +5.0 to +0.4V, though I'd like if it could work like this. Do you agree?

No. Open drain means there is no current flow when the device is off.
If you attach a pull-up resistor from 5V to an open drain you will get
either 5V (open drain == no current == no voltage drop) or 0.4V which
is called out in the specification.

If the BC546 is an NPN transistor (as shown) it will not work per the schematic.
You need a PNP.

I would verify the voltages at all of the pins of the 2405. It seems like something
is not connected properly. Verify that the datapin is staying high.

(* jcl *)

Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the patience... the problem is that no one have ever used DS2405/DS2406 on Arduino, and the few schematics I found on the net are far from perfect, as you noticed smiley-grin

This is the circuit I made. I tried different values for PIO-A pull-up resistors but when I measure voltage between +5V and PIO-A it's always +5V or +4.6V, the difference is exactly the sink voltage which is strange.


You were right about the data line that must be kept high... I forgot this and promptly added the flag to the latest write command before the delays. But the behavior is the same smiley-sad
Here's the code, it uses official OneWire library:
Code:
#include <OneWire.h>

// DS2406 PIO switch management example

OneWire ds(10);  // on pin 10

void setup(void) {
  // initialize inputs/outputs
  // start serial port
  Serial.begin(9600);
}

void loop(void) {
  int HighByte, LowByte, TReading, SignBit, Tc_100, Whole, Fract;
  byte i;
  byte present = 0;
  byte data[16];
  byte addr[8];
  byte status[0];
  
  status[0]=7;
  
  if ( !ds.search(addr)) {
      Serial.print("No more addresses.\n");
      ds.reset_search();
      return;
  }

  Serial.print("R=");
  for( i = 0; i < 8; i++) {
    Serial.print(addr[i], HEX);
    Serial.print(" ");
  }

  if ( OneWire::crc8( addr, 7) != addr[7]) {
      Serial.print("CRC is not valid!\n");
      return;
  }

  if ( addr[0] != 0x12) {
      Serial.print("Device is not a DS2406 family device.\n");
      return;
  }
  ds.reset();                  //reset bus
  ds.select(addr);             //select device previously discovered
  ds.write(0x55);              //write status command
  ds.write(0x07);              //select location 00:07 (2nd byte)
  ds.write(0);                 //select location 00:07 (1st byte)
  ds.write(0x1F);              //write status data byte (turn PIO-A ON)
  Serial.print ("VALUE=");     //read CRC16 of command, address and data and print it; we don't care
  for ( i = 0; i < 6; i++) {
 data[i] = ds.read();
   Serial.print(data[i], HEX);
 Serial.print(" ");
 }
  ds.write(0xFF,1);            //dummy byte FFh to transfer data from scratchpad to status memory, leave the bus HIGH
  delay(2000);                 //leave the things as they are for 2 seconds
  ds.reset();
  ds.select(addr);
  ds.write(0x55);
  ds.write(0x07);
  ds.write(0);
  ds.write(0x3F);              //write status data byte (turn PIO-A OFF)
  Serial.print ("  VALUE=");
  for ( i = 0; i < 6; i++) {
 data[i] = ds.read();
    Serial.print(data[i], HEX);
 Serial.print(" ");
 }
  ds.write(0xFF,1);
  delay(2000);
}

I'd like to find the culprit, anyway for my project it's enough to bring the voltage down enough to reach the threshold value, which is 2.3V @ 100uA for L298 and 3.0V @ 3.0mA for solid state relays...of course this can work if these devices haven't a big tolerance. can I do this with just a few resistors?
« Last Edit: March 24, 2009, 07:05:27 am by agentsmith » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33314
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I tried different values for PIO-A pull-up resistors but when I measure voltage between +5V and PIO-A it's always +5V or +4.6V, the difference is exactly the sink voltage which is strange.

This is the bit that is wrong. You should not see this. As you are seeing it then it suggests that you have something wrong with your implementation.

That last schematic is right although maybe 2K2 pull ups in place of 4K7 but that shouldn't matter. So you have to find out what you are doing wrong. I have used these devices (although not on an arduino but that does not matter) and you will get the full logic swing if your hardware is implemented correctly.
Double check that you have identified the correct pins for the package you have.
Logged

Boston, MA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1024
wiblocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The circuit looks correct as labeled. I did not compare the pinout that you drew with
the datasheet.

The pull-up values look OK. I would have gone with 10K values but 4.7K should work
fine.

The circuit, as shown, should give you 5V and 0.4V. Since it is not I would not
use it as is. There is something basic that is wrong (which is difficult to troubleshoot remotely).  Either the pinout is wrong, you are not making good connections, the software is not setting up the PIO properly or the device is bad.

(* jcl *)
Logged


Pages: [1] 2   Go Up
Jump to: