Author Topic: Switching polarity without relays  (Read 15797 times)

0 Members and 2 Guests are viewing this topic.

Offline raptor1956Topic starter

  • Frequent Contributor
  • **
  • Posts: 874
  • Country: us
Switching polarity without relays
« on: July 12, 2017, 06:02:32 am »
I'm looking to use some Peltier modules to cool and perhaps to also heat and to do both you need to switch the polarity to the module, but I'm wondering if there is an elegant solution that avoids using relays and is cheaper than relays.  The voltage is less than 15VDC but the current could be as much as 5A though 3.5A or less is more typical.  So, what would you suggest?


Brian
 

Offline minion

  • Contributor
  • Posts: 21
  • Country: si
Re: Switching polarity without relays
« Reply #1 on: July 12, 2017, 06:04:59 am »
What about mosfet H bridge?
 

Offline digsys

  • Supporter
  • ****
  • Posts: 2219
  • Country: au
    • DIGSYS
Re: Switching polarity without relays
« Reply #2 on: July 12, 2017, 06:16:30 am »
Quote from: minion
What about mosfet H bridge?
A very nice and elegant solution, but with that many more parts added, I doubt it'll be anywhere near cheaper. OP will need to provide more detail, especially price / room constraints.
Hello <tap> <tap> .. is this thing on?
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Switching polarity without relays
« Reply #3 on: July 12, 2017, 06:26:31 am »
Coincidentally I just designed such a circuit last week, in order to control a mini fridge and turn it into a mini environmental chamber:



For the Mosfets I used FQP47P06 (Q2 and Q4), and FDP5800 (Q3 and Q5).

Mode of operation:

I provide logic level inputs on the header J2, from an arduino/raspberry_pi:

Either P1 and N1 are on, or P2 and N2 are on. These are the only two valid combinations. The fridge will either cool or heat based on the direction. PELTRED and PELTBLK are outputs to the peltier block.

Also note P1 and P2 (PNP) inputs are inverted, they are active low.

Also I should add, my cheap mini fridge has I think (not sure) a polyfuse and the original board had the circuit's ground separated by it. So I just added the F2 there to make the schematic work, but I will probably wire the original fridge's polyfuse wires to it.

The F1 fuse I have there is a real fuse. Part number: RXEF375.

I haven't really tested the circuit, but I can share the PCB design on OShpark once I test it.



Cost is about $10-15 in components and $18.70 for OShpark to make the 3 boards.

I also hacked a quick Arduino sketch which lets me control the fridge via USB-Serial from my computer or raspberry Pi:

Code: [Select]
/*
*/

int n1 = 8;  // D8
int n2 = 9;  // D9
int p1 = 10; // D10
int p2 = 11; // D11

byte byteRead;
byte status_byte;

void pins_mode() {
  pinMode(n1, OUTPUT);
  pinMode(n2, OUTPUT);
  pinMode(p1, OUTPUT);
  pinMode(p2, OUTPUT);
}

void mode_off() {
  digitalWrite(LED_BUILTIN, LOW);
  digitalWrite(n1, LOW);
  digitalWrite(n2, LOW);
  digitalWrite(p1, HIGH);
  digitalWrite(p2, HIGH);
  status_byte = 'o'; 
}

void mode_cool() {
  mode_off();
  digitalWrite(LED_BUILTIN, HIGH);
  digitalWrite(p1, HIGH);
  digitalWrite(p2, LOW);
  digitalWrite(n1, HIGH);
  digitalWrite(n2, LOW);
  status_byte = 'c'; 
}

void mode_warm() {
  mode_off();
  digitalWrite(LED_BUILTIN, HIGH);
  digitalWrite(p1, LOW);
  digitalWrite(p2, HIGH);
  digitalWrite(n1, LOW);
  digitalWrite(n2, HIGH);
  status_byte = 'w'; 
}


// the setup function runs once when you press reset or power the board
void setup() {
  Serial.begin(9600);
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
  mode_off();
}

void control(byte br){
  switch(br){
    case 'o':
      mode_off();
      break;
    case 'c':
      mode_cool();
      break;
    case 'w':
      mode_warm();
      break;
    case 's':
      Serial.write("status: ");
      Serial.write(status_byte);
      Serial.write("\r\n");
      break;
  }
}


void loop() {
    if (Serial.available()) {
      /* read the most recent byte */
      byteRead = Serial.read();
      control(byteRead);
    }
 
}

Very simple protocol:

o - off
c - cool
w - warm
s - return status

The temperature sensor will be inside the fridge but read separately by a raspberry pi, which is part of my existing metrology rig.
« Last Edit: July 12, 2017, 07:23:26 am by Muxr »
 
The following users thanked this post: cellularmitosis

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2339
  • Country: sk
    • My site
Re: Switching polarity without relays
« Reply #4 on: July 12, 2017, 06:28:25 am »
Cheaper - probably not, since you can get relays that can do this that cost 2 EUR.

More elegant solution? HBridges, specialized controllers ( http://www.linear.com/product/LTC1923 ). Maybe you could get in terms of price close to the relays with an HBridge with some MOSFETs.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline raptor1956Topic starter

  • Frequent Contributor
  • **
  • Posts: 874
  • Country: us
Re: Switching polarity without relays
« Reply #5 on: July 12, 2017, 05:08:03 pm »
The cost thing is driven mostly by the fact that I'd need 4X of everything.  I may have to change plans and instead of allowing each of the four circuits to be hot of cold independent of the others I could force all four to be one or the other reducing the component count. 


Brian
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Switching polarity without relays
« Reply #6 on: July 12, 2017, 09:00:55 pm »
The cost thing is driven mostly by the fact that I'd need 4X of everything.  I may have to change plans and instead of allowing each of the four circuits to be hot of cold independent of the others I could force all four to be one or the other reducing the component count. 

Brian

Even at 4X an H-bridge shouldn't break the bank. I picked some more modern low RDS on Mosfets for my design ($2.30 a piece), but you can find cheaper ones.. for instance IRFZ34N N-Channel (bottom Fets on the schematic above) are only $0.85 a piece. I am sure you can find a cheap P-channel mosfets for a buck as well. Case in point: http://www.ebay.com/itm/10-x-IRF9540-IRF9540N-IR-Power-MOSFET-P-Channel-23A-100V-USA-Seller-/221324036166?hash=item3387f0c846:g:UKAAAOxygPtSvdGg

and n-channel are even cheaper: http://www.ebay.com/itm/10-x-IRF530-IRF530NPBF-IR-Power-MOSFET-N-Channel-17A-100V/401031656858?_trksid=p2047675.c100005.m1851&_trkparms=aid%3D555018%26algo%3DPL.SIM%26ao%3D2%26asc%3D44758%26meid%3Dba8ae1e394d9409e8cbc8fa188fecfa3%26pid%3D100005%26rk%3D2%26rkt%3D6%26sd%3D221324036166

So the components for 4 boards would cost you about $15 for (8 p-channel, and 8 n-channel mosfets). And the rest of the components can't be more than $5 as they are all jelly bean.

The expensive part would be the PCBs, but you could just roll your own on a protoboard or just wires. But even with PCBs you're talking $40-$45 total for all four units. You could control them from a $4 arduino clone.
« Last Edit: July 12, 2017, 09:03:37 pm by Muxr »
 

Offline darrellg

  • Supporter
  • ****
  • Posts: 108
  • Country: us
Re: Switching polarity without relays
« Reply #7 on: July 12, 2017, 09:12:51 pm »
You could use a double pole, double throw switch.
 
The following users thanked this post: 3db

Offline Nusa

  • Super Contributor
  • ***
  • Posts: 2419
  • Country: us
Re: Switching polarity without relays
« Reply #8 on: July 12, 2017, 09:20:09 pm »
My old peltier-based refrigerator icechest has a labeled unpolarized plug on the DC input cable. You simply reverse it to change from cooling mode to warming mode. The DC fan that blows across the interior heatsink reverses direction too, but airflow is airflow, so still works.
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: Switching polarity without relays
« Reply #9 on: July 12, 2017, 10:41:46 pm »
How much/fast control over the cooling/heating is required?

A DPDT switch is very cheap but would be slow to operate and useful only if you only need to select max cooling, max heating and off.
MOSFETs would allow very fast tristate switching for really fast control of the temperature.
Relays would be somewhere in between due to being mechanical.

If cost is most important, what about some cheap Chinese H bridge module?
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3391
  • Country: ca
Re: Switching polarity without relays
« Reply #10 on: July 12, 2017, 10:59:58 pm »


It's funny how Q1 and Q6 are "soldered".
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Switching polarity without relays
« Reply #11 on: July 12, 2017, 11:13:35 pm »
It's funny how Q1 and Q6 are "soldered".
Aye.. the 3D model for it is rotated (bug in that footprint which is from KiCad's standard lib), but I checked the footprints and they look right :)
 


Offline ejeffrey

  • Super Contributor
  • ***
  • Posts: 4454
  • Country: us
Re: Switching polarity without relays
« Reply #13 on: July 13, 2017, 03:22:25 am »
An H-bridge is certainly the conventional solution.  It doesn't have to be that expensive.  For instance, here is a $4 h-bridge controller with integrated switches and a 5 amp current limit:

https://www.digikey.com/product-detail/en/infineon-technologies/TLE5205-2G/TLE5205-2GINCT-ND/1557940?WT.z_cid=ref_findchips_standard

The Rds On is fairly high at 200 mOhm, so it will dissipate quite a bit of heat.  Discrete MOSFETs would do better, but not as simple, and possibly more expensive.

That said: you said you want to use this to drive a peltier.  It is not really recommended to drive a peltier with either unfiltered PWM or thermostat style on-off regulation. 

The problem with PWM (especially in cooling mode) is that the cooling power is proportional to I, but the parasitic heating is proportional to I^2.  So with PWM, you get the worst case resistive heating which you then have to cool.

The problem with slow on-off control is that the frequent thermal cycling causes stress from thermal expansion.

You really want to drive a PWM with DC if you want good performance and longevity.  Fortunately, this is relatively easy to do with a H bridge PWM driver and a simple LC filter.  This basically turns it into a buck converter. 
 
The following users thanked this post: cellularmitosis

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Switching polarity without relays
« Reply #14 on: July 13, 2017, 04:25:41 am »
@ejeffrey you bring up a good point.

In my particular case, I will be turning the peltier on and off every 10 minutes or more. The board I am replacing was doing the same thing except using manual switches. They have some sort of a varistor limiting current and I will keep that in place.

I haven't thought about maintaining a certain temperature/current with PWM, but the consensus is, as long as the resulting pulse is longer than the 0.001 seconds, the peltier should be fine even without filtering. http://www.ferrotec-nord.com/support/thermoelectric-module-feeding

The efficiency will suffer of course, but I can live with that.

The LC filter may not be as trivial due to the nature of reverse polarity at play.
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1112
  • Country: us
Re: Switching polarity without relays
« Reply #15 on: July 13, 2017, 06:20:16 am »
Coincidentally I just designed such a circuit last week, in order to control a mini fridge and turn it into a mini environmental chamber:


Awesome, thanks for posting about this!  I have a mini-fridge with the same idea in mind but haven't made much progress yet.
LTZs: KX FX MX CX PX Frank A9 QX
 
The following users thanked this post: Muxr

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11718
  • Country: my
  • reassessing directives...
Re: Switching polarity without relays
« Reply #16 on: July 13, 2017, 06:49:23 am »
last time i check, you need several layer of peltier element to make it useful as a fridge, and each layer will consume few to 10 of A, overall we are talking about 500W and above of power consumption. i dismissed my intention to source peltier elements due to this... iirc..
The Ultimatum of False Logic... http://www.soasystem.com/false_logic.jpg
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7571
  • Country: 00
  • +++ ATH1
Re: Switching polarity without relays
« Reply #17 on: July 13, 2017, 08:25:59 am »
You could use a double pole, double throw switch.

+1 , why complicate things when it can be so simple ? Cmiiw.


Randomly googled, just replace the motor with the peltier element.




Good quality switch like this (randomly googled too) can cover your current requirement.


« Last Edit: July 13, 2017, 08:28:00 am by BravoV »
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Switching polarity without relays
« Reply #18 on: July 13, 2017, 01:43:35 pm »
last time i check, you need several layer of peltier element to make it useful as a fridge, and each layer will consume few to 10 of A, overall we are talking about 500W and above of power consumption. i dismissed my intention to source peltier elements due to this... iirc..
I am modifying an existing Peltier mini fridge.. this model in particular: https://www.amazon.com/Gourmia-GMF600-Portable-Fridge-Cooler/dp/B00DQT2ZGE/ref=sr_1_1?ie=UTF8&qid=1499953202&sr=8-1&keywords=gourmia+mini+fridge

It draws about 3-4A of current (12V) and has a very simple control board like the schematic linked above me. I am just replacing it with an h-bridge in order to control it programmatically for TempCo characterisations.

It's a very small and simple unit.



Awesome, thanks for posting about this!  I have a mini-fridge with the same idea in mind but haven't made much progress yet.
No problem. I will probably make a full post on the metrology section once it's done and share the project on github.
« Last Edit: July 13, 2017, 02:04:14 pm by Muxr »
 
The following users thanked this post: cellularmitosis

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 21892
  • Country: gb
  • 0999
Re: Switching polarity without relays
« Reply #19 on: July 14, 2017, 07:42:30 am »
I've never liked Peltier fridges. They're unreliable, the element has a tendency to fail short circuit, releasing nasty smoke and are less efficient than mechanical fridges.

You could use a double pole, double throw switch.

+1 , why complicate things when it can be so simple ? Cmiiw.


Randomly googled, just replace the motor with the peltier element.




Good quality switch like this (randomly googled too) can cover your current requirement.


That's good, unless you want to control it via an electrical signal.

 

Offline darrellg

  • Supporter
  • ****
  • Posts: 108
  • Country: us
Re: Switching polarity without relays
« Reply #20 on: July 14, 2017, 03:06:13 pm »
That's good, unless you want to control it via an electrical signal.
That was not mentioned as a requirement.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3614
  • Country: gb
Re: Switching polarity without relays
« Reply #21 on: July 14, 2017, 04:46:04 pm »
That's good, unless you want to control it via an electrical signal.

Perhaps a solenoid could be hooked up to the switch for electrical operation   ;D
 

Offline cellularmitosis

  • Supporter
  • ****
  • Posts: 1112
  • Country: us
Re: Switching polarity without relays
« Reply #22 on: July 14, 2017, 05:11:55 pm »
I see where you guys are going with this, and I'm way ahead of you...

LTZs: KX FX MX CX PX Frank A9 QX
 
The following users thanked this post: Muxr, drussell, schmitt trigger

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7571
  • Country: 00
  • +++ ATH1
Re: Switching polarity without relays
« Reply #23 on: July 14, 2017, 05:22:50 pm »
That's good, unless you want to control it via an electrical signal.
That was not mentioned as a requirement.

+1 , here quoting the OP and highlighted below, current requirement is covered if using quality switch, and still cheaper than relay.

.... I'm wondering if there is an elegant solution that avoids using relays and is cheaper than relays.  The voltage is less than 15VDC but the current could be as much as 5A though 3.5A or less is more typical.  So, what would you suggest?

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: Switching polarity without relays
« Reply #24 on: July 14, 2017, 10:22:52 pm »
That's good, unless you want to control it via an electrical signal.

Perhaps a solenoid could be hooked up to the switch for electrical operation   ;D
Interesting.
And if you put the solenoid and switch into one housing it can be used as a single module for nany purposes..
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf