Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Like I said I'm just soft, and I should treat my poor abused soldering tip better.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 12:02pm 16 May 2018
Copy link to clipboard
Print this post
Actually, I am with ryanm on this, when making the boards up, I felt that there was only just enough pad showing to get a bit of heat into the pad to melt the solder...
I settled for heating the legs, and using the fact that there is good through plating, to heat the center of the hole up with the component leg, that then heated the pad ring enough to run the solder... so changed techniques.
I would have preferred a bit more real estate, but that said, it was not a show stopper by any means.
Ok Marks ,machine.
All up and running happily for long periods at 4kw or so, reset, and restart under full loading, no problem... very very quiet at 2kw for some reason, still very quite at 3kw, and not much noisier at 4kw and more.
Have not tried the high current bursts, as only 2 fets in 2 legs at the moment, and they stay pretty cool, it's the tranny that gets hot, it is only single core with 25mmsq wire.
There is some sensitivity which I alluded to years or so ago, regarding the pin6. If you use big switches with long wire... there is a likelyhood that it will trigger oddly under high power, the faulty switch ( thing that introduced inconsistency, if not faulty) was replicated when I replaced it with a like sized switch. I use very small ones in my inverters, maybe why I have not seen this behavior...
So beware, if your unit turns itself on and off... fair chance it is your on off switch circuitry.
Yes, Mark, noticed the brushing, it helped show up the small voids around some of the legs.
Tomorrow will test out the start up characteristics, but the little tranny will limit us.
May send it back Friday or Monday if it continues to perform nicely.
pics..... Here we can see the new switch.... glued to the caps... but no longer used... started to pulse at 4kw..... notice the jumper lead across the pins instead.
Here is a crappy pic, but shows both the 10amp grill and the 8amp element running together, and did so for 20 mins or more... but at nightime thats not terribly smart.
So I think we are pretty much there. bit more testing to go.
........oztules Edited by oztules 2018-05-17Village idiot...or... just another hack out of his depth
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 12:09pm 16 May 2018
Copy link to clipboard
Print this post
I had some real fun today tried the Nano in the control board and nothing, the 12V was shorted. After removing diodes etc on the positive rail the only thing left was the socket for the Nano which was a major PITA to remove. Turned out there was a fine strand of wire between the VIN & GND pins under the socket. I wasted over 2 hours, lucky it was there, could have been somewhere else and even harder to diagnose.
Would have liked to have gotten further with the code but here is what I have so far. It will run the fans and display but that's all at this stage. First off you need to find the address of the Digital temperature sensors with this code.
[code] #include <OneWire.h>
// OneWire DS18S20, DS18B20, DS1822 Temperature Example // // http://www.pjrc.com/teensy/td_libs_OneWire.html // // The DallasTemperature library can do all this work for you! // http://milesburton.com/Dallas_Temperature_Control_Library
#include <Wire.h> // Comes with Arduino IDE // Get the LCD I2C Library here: // https://bitbucket.org/fmalpartida/new-liquidcrystal/downloads // Move any other LCD libraries to another folder or delete them // See Library "Docs" folder for possible commands etc. #include <LiquidCrystal_I2C.h>
/*-----( Declare Constants )-----*/ /*-----( Declare objects )-----*/ // set the LCD address to 0x27 for a 20 chars 4 line display // Set the pins on the I2C chip used for LCD connections: // addr, en,rw,rs,d4,d5,d6,d7,bl,blpol LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
OneWire ds(4); // on pin 9 (a 4.7K resistor is necessary)
void setup(void) { Serial.begin(9600);
lcd.begin(20,4); // initialize the lcd for 20 chars 4 lines, turn on backlight }
if ( !ds.search(addr)) { Serial.println("No more addresses."); Serial.println(); ds.reset_search(); delay(250); return; }
Serial.print("ROM ="); for( i = 0; i < 8; i++) { Serial.write(' '); lcd.print(' '); Serial.print(addr, HEX); lcd.print(addr, HEX);
}
if (OneWire::crc8(addr, 7) != addr[7]) { Serial.println("CRC is not valid!"); return; } Serial.println();
// the first ROM byte indicates which chip switch (addr[0]) { case 0x10: Serial.println(" Chip = DS18S20"); // or old DS1820 type_s = 1; break; case 0x28: Serial.println(" Chip = DS18B20"); type_s = 0; break; case 0x22: Serial.println(" Chip = DS1822"); type_s = 0; break; default: Serial.println("Device is not a DS18x20 family device."); return; }
ds.reset(); ds.select(addr); ds.write(0x44); // start conversion, use ds.write(0x44,1) with parasite power on at the end
delay(1000); // maybe 750ms is enough, maybe not // we might do a ds.depower() here, but the reset will take care of it.
Serial.print(" Data = "); Serial.print(present, HEX); Serial.print(" "); for ( i = 0; i < 9; i++) { // we need 9 bytes data = ds.read(); Serial.print(data, HEX); Serial.print(" "); } Serial.print(" CRC="); Serial.print(OneWire::crc8(data, 8), HEX); Serial.println();
// Convert the data to actual temperature // because the result is a 16 bit signed integer, it should // be stored to an "int16_t" type, which is always 16 bits // even when compiled on a 32 bit processor. int16_t raw = (data[1] << 8) | data[0]; if (type_s) { raw = raw << 3; // 9 bit resolution default if (data[7] == 0x10) { // "count remain" gives full 12 bit resolution raw = (raw & 0xFFF0) + 12 - data[6]; } } else { byte cfg = (data[4] & 0x60); // at lower res, the low bits are undefined, so let's zero them if (cfg == 0x00) raw = raw & ~7; // 9 bit resolution, 93.75 ms else if (cfg == 0x20) raw = raw & ~3; // 10 bit res, 187.5 ms else if (cfg == 0x40) raw = raw & ~1; // 11 bit res, 375 ms //// default is 12 bit resolution, 750 ms conversion time } celsius = (float)raw / 16.0; fahrenheit = celsius * 1.8 + 32.0; Serial.print(" Temperature = "); Serial.print(celsius); Serial.print(" Celsius, "); Serial.print(fahrenheit); Serial.println(" Fahrenheit"); lcd.setCursor(0,0); }
[/code]
Upload this to the arduino and open the serial monitor under tools in the Arduino Software. If you hold one of the sensors you will see the temperature increase so you can identify which is which.
This then is entered in the actual code as per below.
Probe01 is for the heatsink and Probe02 is for the transformer.
[code] /* YourDuino.com Example: Multiple DS18B20 Temperature Sensors Displayed on 4x20 character LCD display
DS18B20 Pinout (Left to Right, pins down, flat side toward you) - Left = Ground - Center = Signal (Pin 9): (with 3.3K to 4.7K resistor to +5 or 3.3 ) - Right = +5 or +3.3 V
terry@yourduino.com */
/*-----( Import needed libraries )-----*/ #include <OneWire.h>// Get 1-wire Library here: http://www.pjrc.com/teensy/td_libs_OneWire.html #include <DallasTemperature.h>//Get DallasTemperature Library here: http://milesburton.com/Main_Page?title=Dallas_Temperature_Control_Library #include <Wire.h>// Wire (I2C) Library #include <PID_v1.h> //PID LIB for fan speed #include <LiquidCrystal.h>// LCD Library #include <LiquidCrystal_I2C.h> #include <avr/wdt.h>//Watchdog Lib // set the LCD address to 0x27 for a 20 chars 4 line display // Set the pins on the I2C chip used for LCD connections: // addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
#define ONE_WIRE_BUS 4 // Data wire is plugged into port 4 on the Arduino #define pwmH 6 #define pwmTR 5
/*-----( Declare objects )-----*/ // Setup a oneWire instance to communicate with any OneWire devices // (not just Maxim/Dallas temperature ICs) OneWire oneWire(ONE_WIRE_BUS);
// Pass address of our oneWire instance to Dallas Temperature. DallasTemperature sensors(&oneWire);
//-----------------------------CHANGE THESE AS REQUIRED---------------------------------------------------------------------------------
// Start the LCD display library LiquidCrystal_I2C lcd(0x3F, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address change this 0x3F or 0x27 if nothing on the LCD double HSsetpoint = 35; //Heatsink Target Temperature double TRsetpoint = 45; //Toroid Target Temperature int MinVolts = 47; //Battery Volts to shut down int TimeAtMinVolts = 120; //How many seconds below MinVolts till shout down is triggered int RestartTime = 10; // How many minutes to restart if battery volts recover above MinVolts DeviceAddress Probe01 = { 0x28, 0xEE, 0x46, 0x1A, 0x2E, 0x16, 0x01, 0x0A }; // Address for Sensor connected to Heatsink USE DS1820_SERIAL_READ TO GET THE ADDRESS OF YOUR SENSORS DeviceAddress Probe02 = { 0x28, 0xEE, 0x15, 0x12, 0x1A, 0x16, 0x02, 0x6F }; // Address for Sensor connected to Toroid USE DS1820_SERIAL_READ TO GET THE ADDRESS OF YOUR SENSORS
//------------------------------STOP HERE IF YOU ARE NOT SURE---------------------------------------------------------------------------
int HSmax; int TRmax; int FANtempH; int FANtempT; double tempTR; int tempTR1; double tempHS; int tempHS1; double fanspeedH; double fanspeedT; double fanpwmH; double fanpwmT; int fanpercentH; int fanpercentT;
const int numReadings = 10; double Setpoint, Input, Output;
int readings; // the readings from the analog input int readIndex = 0; // the index of the current reading int total = 0; // the running total int average = 0; // the average
int voltsinputPin = A7;
boolean singlecase = false; // true for all in one case, false for divided case with seperate fans for heatsink and toriod. float R1 = 105000.0; // resistance of R1 (100K) float R2 = 8000.0; // resistance of R2 (8K2) For setting up voltage divider to get correct voltage reading Use in conjunction with trim pot on pcb double vin = 0.0; double vout = 0.0; int beeper = 11;// the number of the beeper pin int beeperstate = LOW; //int ShutDown = 3;// the number of the shutdown pin //int ShutDown = HIGH; unsigned long previousMillis = 0; const long interval = 750; // interval at which to beep (milliseconds)
double Kp = 45, Ki = 20, Kd = 3; //variables for setting PID for fan speed control PID HSPID(&tempHS, &fanpwmH, &HSsetpoint, Kp, Ki, Kd, REVERSE); PID TRPID(&tempTR, &fanpwmT, &TRsetpoint, Kp, Ki, Kd, REVERSE);
void setup() /****** SETUP: RUNS ONCE ******/ { Serial.begin(9600); wdt_enable(WDTO_1S); // Setup watchdog to reset after 1 second if no activity //------- Initialize the Temperature measurement library-------------- sensors.begin(); // set the resolution to 10 bit (Can be 9 to 12 bits .. lower is faster) sensors.setResolution(Probe01, 10); sensors.setResolution(Probe02, 10);
//---------------- Initialize the lcd ------------------ lcd.begin(20, 4); // initialize the lcd for 20 chars 4 lines, turn on backlight lcd.setCursor(0, 0); HSPID.SetMode(AUTOMATIC); TRPID.SetMode(AUTOMATIC);
pinMode(beeper, OUTPUT); // pinMode(ShutDown, OUTPUT); // initialize all the readings to 0: for (int thisReading = 0; thisReading < numReadings; thisReading++) { readings = 0; }
// lcd.clear(); // Reset the display lcd.home(); lcd.backlight(); //Backlight ON if under program control lcd.setCursor(0, 3); lcd.print("V :"); lcd.print(vin); sensors.requestTemperatures(); // Send the command to get temperatures
lcd.setCursor(0, 0); //Start at character 0 on line 0 lcd.print("H:"); {
tempHS = sensors.getTempC(Probe01);
if (tempHS == -127.00) // Measurement failed or no device found { lcd.print("Error"); tempHS = tempHS1; } else { lcd.print(tempHS, 0); tempHS1 = tempHS; HSmax = max (HSmax, tempHS); lcd.print(" M:"); lcd.print(HSmax); }
HSPID.Compute();
{
tempTR = sensors.getTempC(Probe02);
if (tempTR == -127.00) // Measurement failed or no device found { lcd.print("Error"); tempTR = tempTR1; } else { lcd.print(" T:"); lcd.print(tempTR, 0); tempTR1 = tempTR; TRmax = max (TRmax, tempTR); lcd.print(" M:"); lcd.print(TRmax); } }
{ // subtract the last reading: total = total - readings; // read from the sensor: readings = analogRead(voltsinputPin); // add the reading to the total: total = total + readings; // advance to the next position in the array: readIndex = readIndex + 1;
// if we're at the end of the array... if (readIndex >= numReadings) { // ...wrap around to the beginning: readIndex = 0; }
// calculate the average: average = total / numReadings;
if (currentMillis - previousMillis >= interval) { // save the last time you blinked the LED previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa: if (beeperstate == LOW) { beeperstate = HIGH; } else { beeperstate = LOW; } } // set the LED with the ledState of the variable: digitalWrite(beeper, beeperstate); } } } //--(end main loop )---
[/code] There are only 10 types of people in the world: those who understand binary, and those who don't.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 11:32pm 16 May 2018
Copy link to clipboard
Print this post
Well it looks like the mystery has been solved in this case.
With the large heat sinks radiating into space, and no close decoupling on the +5v, we seem to be getting too much noise into the switch circuit.
So I put two decoupling caps across the gnd and +5v pins of the switch socket, and shorted the 1k to ground.
This then seemed to calm things right down, even using the large switches, that would have attracted the most noise.
My board has direct line to pin 6 from above the board, and that seems to have saved me the ignominy of unforced shutdown at high power.
So it looks like this thing is going back home soon.
Was happily doing it's 4.5kw this morning . running around 90 amps.... and only 2 fets in 2 bridges..... these HY4008 are amazing things.... cheap Chinese chips be damned, these things are gold.
......oztules Village idiot...or... just another hack out of his depth
renewableMark
Guru
Joined: 09/12/2017 Location: AustraliaPosts: 1678
Posted: 11:50pm 16 May 2018
Copy link to clipboard
Print this post
Bloody legend Oz, could you possibly put that on my build thread for anyone that may follow that and want to know the answer of the fix?
Re the Mad board, I can't get a hold of 22pf mono caps anytime soon, would ceramic caps be ok?Cheers Caveman Mark Off grid eastern Melb
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 12:36am 17 May 2018
Copy link to clipboard
Print this post
Yes...22pmono should work fine too, I have used up to 50pf before with no change in result.
Now for a few pics of wave form....
This is with 2 turns through the torroid ... so there are wave forms everywhere, and no filtering from the caps on the output, this is the raw data in the core....
So beware, there will be waveforms from the 50hzsquare, the spwm, the sum and the difference of all sorts of stuff... but the main fundamental is the sine wave, here it is at 2.5kw.. not too shabby considering no filter of anysort, just raw magnetics.
Note the other waves in there, some you may recognize too.
And this is in the 4.5kw range. Considering all the poor connections. I am surprised it is this good. Very surprised in fact.
I think thats pretty good . Filters will change things for the better, but the raw data is in the core....You get to see all the waveforms in there, just fiddle the CRO, and you get the whole gammit of stuff.... pretty interesting really.
..........oztules
Village idiot...or... just another hack out of his depth
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 12:38pm 17 May 2018
Copy link to clipboard
Print this post
I made up this switch for testing before the long lead issue was discovered. Main reason was I figured it was better than having it hanging off the end of the wires and the potential to short something. It is the wrong type off switch though with the centre off position, I have the right ones coming.
There are only 10 types of people in the world: those who understand binary, and those who don't.
gpalterpower
Senior Member
Joined: 19/07/2009 Location: AustraliaPosts: 175
Posted: 01:50am 18 May 2018
Copy link to clipboard
Print this post
Hi Madness, I haven't received your PM as yet regarding paypal payment. Not sure if its working. Could you contact me thru my email please. geepea101@gmail.com Thanks Marcusif it aint broke dont fix it!!
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 05:40am 18 May 2018
Copy link to clipboard
Print this post
Don't know what happened there I have sent PMs, just emailed you.There are only 10 types of people in the world: those who understand binary, and those who don't.
renewableMark
Guru
Joined: 09/12/2017 Location: AustraliaPosts: 1678
Posted: 05:47am 18 May 2018
Copy link to clipboard
Print this post
You may need to empty out your inbox a bit. They don't hold an indefinite amount.
Mad I just needed one more part to finish my boards but couldn't get the right size for the spade terminals. is that some odd size? Where did you source yours from?
Edit never mind I just bent the pins a bit and they fitted.
Hey what's the difference between uf4007 and 1n4007?Edited by renewableMark 2018-05-19Cheers Caveman Mark Off grid eastern Melb
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 07:29am 18 May 2018
Copy link to clipboard
Print this post
Don't know what happened with spade terminals but yes you need to bend them a little and they go in.
Should be 1n4007 where is that from?There are only 10 types of people in the world: those who understand binary, and those who don't.
plover
Guru
Joined: 18/04/2013 Location: AustraliaPosts: 302
Posted: 08:07am 18 May 2018
Copy link to clipboard
Print this post
A little bit different post here. I am fascinated by all this inverter what not buisness. Normally my coils are only about 1.5 inch square. I understand switchmode theory but practice, well these monsters needs working upon.
I am up to about page 12 in this topic here and hopping round as I can find time.
There was one thing I noticed, something about drawing up a schematic, I think it was in here?. It just so happens after having decided not again getting into doing pcb work etc, after having used protel some years ago up to version 99SE , then a bit out of the blue I got an invitation to come out of retirement and do a job, that project really interests me, some bleading edge stuff no gurantee where you land.
Well I am now getting into the 'documentation works' and are working overtime getting up to speed on using Autotrax Dex, I am at the stage where I can do schematics fairly easily now but still want some more practice.
I offer to attempt to make the schematic and will also attempt layout to see how it will stress my system. However pcb I do not expect to be a success just testing my software.
If my offer has interest, I would be interested to know what documentation is available and in what form.
p. Edited by plover 2018-05-19
renewableMark
Guru
Joined: 09/12/2017 Location: AustraliaPosts: 1678
Posted: 08:34am 18 May 2018
Copy link to clipboard
Print this post
From here
they look the same specs, I used 1n4007 so I'll just move along to next bit.Edited by renewableMark 2018-05-19Cheers Caveman Mark Off grid eastern Melb
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 09:15am 18 May 2018
Copy link to clipboard
Print this post
Sorry it is a typo, 4007 is a Diode uf is for capacitors.There are only 10 types of people in the world: those who understand binary, and those who don't.
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 09:25am 18 May 2018
Copy link to clipboard
Print this post
Some of us have not bothered with Circuit diagrams while others are out of their comfort zone if they don't have a circuit diagram. The software I used to do the PCB's can also do Circuits but I have not bothered as it takes 10 times longer. Your welcome to have a crack at it. Best I can offer is to work off the PCBs.There are only 10 types of people in the world: those who understand binary, and those who don't.
oztules
Guru
Joined: 26/07/2007 Location: AustraliaPosts: 1686
Posted: 10:47am 18 May 2018
Copy link to clipboard
Print this post
actually uf4007 is a fast 1a diode.
..........oztulesVillage idiot...or... just another hack out of his depth
renewableMark
Guru
Joined: 09/12/2017 Location: AustraliaPosts: 1678
Posted: 11:16am 18 May 2018
Copy link to clipboard
Print this post
Yeah I looked at the specs more closely, element 14 list it as ultra fast, hence the uf. Is there any benefit in using them in this circuit?Edited by renewableMark 2018-05-19Cheers Caveman Mark Off grid eastern Melb
Madness
Guru
Joined: 08/10/2011 Location: AustraliaPosts: 2498
Posted: 11:29am 18 May 2018
Copy link to clipboard
Print this post
Just checked, the original circuit is UF4007 but I have been using 1N4007.
FR107 the same as on the control board is doing the same job so they should be fine there.Edited by Madness 2018-05-19There are only 10 types of people in the world: those who understand binary, and those who don't.
Boppa Guru
Joined: 08/11/2016 Location: AustraliaPosts: 814
Posted: 01:17pm 18 May 2018
Copy link to clipboard
Print this post
I find that a circuit diagram is almost essential when things dont go according to plan and you have to fault find a board With a circuit diagram, you can see how a circuit works and where likely faults will be and can figure out what effects a certain fault will cause, without it, you are left trying to guess what has failed and why. They arent so essential when constructing, but are imho essential for fault finding
plover
Guru
Joined: 18/04/2013 Location: AustraliaPosts: 302
Posted: 01:42pm 18 May 2018
Copy link to clipboard
Print this post
Crumbs, that size board and no circuit schematic that is rather impressive. I could reconstruct from the layout but I do not have that extra time for quite a while.
Is there any generic schematics that come close that could form the backbone? Anyway I will be flat out exercising schematics for quite a while so if any constructors are scribling part circuit I will put it in nice looking format