Tuesday, March 13, 2018

JBC T245 / C245 Iron tip controller

Here it is the major post for February...with some delay. Remember I'm trying to do at least 1 major project/post a month this year.



I've been building this for a while, here reading the thermocouple on the JBC tip and here painting the front panel. It took longer also since the LCD display ordered arrive dead (took the one from my long wave receiver) and had some or mistakes causing short-circuits and a blown MAX6675 module.

Before you go an replicate have a look on the advantage and disadvantage of this system :

* Good:
- Super fast from power on to melt solder compared to a "traditional" iron, this one takes about 5s excluding the boot process.
- Temperature control... if you really need, I build a lot of electronics without needing it.
- Very light tip
- Short distance from hand to tip.
- Multiple types of tips to chose from.
- JBC tip's from previous experience (standard iron) have a reasonable duration, this one... time will tell.
- Controller probably will work, with minor changes, for other temperature controlled iron's.

* Bad
- The system from JBC costs in excess of 400 Eur, it's hard to justify just for the hobby that amount. A good soldering Iron will cost 10x less and does the same job. This system costs half of it but still expensive.
- Proprietary hardware on the tips and with the price of just two tips you already buy a perfectly fine soldering iron, not even considering the tip holder.
- Tips will most likely have a shorter live due to low size causing thermal fatigue shortly.
- It overshoots easily with this type of control, anyhow if you consider the set temperature as the minimum then take that as a feature.


Inside:


And during software troubleshooting:

The schematic was based on this from "Great Scott":


My schematic (approximately):
I used a 220/12+12 transformer, tip is powered by 24V AC (showing 15 on schematic).
Used also another display type (I2C), another Triac (MOC3021) and another opto-isolator (4N35).
Also for the supply I used the same transformer for the Iron and Zero crossing detector (4N35). The Arduino used a separate transformer with two regulators, one for the Arduino (7808 to vIn/vcc) itself and another for the MAX6675 and LCD display (7805 +5v) since the regulator for the Arduino was causing reset's if the MAX6675 was powered from Arduino 5v output.

Here's how fast is from power on to melting solder:
...around 5s since power is applied to the tip. I think the other Iron I have takes more than 2 minutes.

I ordered the T245-C with the foam handle and got a T245-A with plastic and foam on top. that is a good thing and that was exactly what I expected when ordering, look's JBC is adding an extra layer of isolation:


The plug on the panel is an Hirose RPC1-12RB-6P(71) with 2.5mm holes.
I only fixed with two bolts since I'm not very good at aligning holes and only have the hand drill.

The iron tip counterpart plug:


Here's connections and tip equivalent circuit:



The total cost of the project was around 215.00 Eur (full station "mimic" of the JBC one: JBC CD-2BE) including the estimated price of a normal iron stand (18 Eur). Still half of the vendor price if I had shopping around.

Will try in the future to test this controller with other similar function Irons.

The code will not be listed for the moment, it is a modified version of Scott's code with a different LCD (I2C).
The display function call in Scott's code had to me moved out of the zero crossing function since it would break I2C communication due to fast rate of interrupts. That caused me some delay until I could understand what was the situation of the display freezing. I placed the display call on the main loop updating every 0.2s.

Another problem I had was since I was doing the build according to my needs I tried to avoid separate power transformers for the iron and modules so caused a short after connecting the "-" of a bridge output to the actual tap of the AC on the transformer. This broke one rectifier bridge and also caused two diodes to fail in short circuit which then on the troubleshooting caused me a problem with a secondary short-circuit. That's what happen when you don't put on paper the changes made. The schematic on this page has that corrected.



To be done:
- More soldering/stability testing using the unit, I already did some soldering with it and so far so good.
- Code refinements on the display update part
- Filter some erroneous (over) temperature reading
- Test and implement the sleep function
- Test and implement the tip change function


Have fun!


P.S. Code as it is without further improvements:

////////////////////////////
// JBC T245 control station
// Dez 2017 - CT2GQV
//
//
////////////////////////////
// pieces of code and ideas from:
//  www.instructables.com/id/DIY-Arduino-Soldering-Station/  Great Scott, simple control
//  hackermagnet.com/portfolio/soldering-station/
//  jacoburge.co.uk/diy-jbc/
//  learn.edwinrobotics.com/230v110v-ac-mains-detection-using-arduino-raspberry-pi-and-esp8266-thing/  rising detector
//
// PINOUT
// * max6675
// Data - digital 4
// Chip Select - digital 5
// clock - digital 6
// * zero crossing detector
// pin5 of 4n35 to - digital 2
// * TRIAC_PIN control
// TRIAC_PIN opto pin1 (anode of led) to resistor of 330 and then to digital 7
// * set temperature by potentiomenter
// whipper of pot to pin analog 3

#include <max6675.h>
//url=https://github.com/adafruit/MAX6675-library
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// for future implementation
//#include <EEPROM.h>

// Settings before compile, to be changed by who compiles //
#define SELF_TEST_DELAY 1000 // delay betwen the diferent self test steps
#define SPLASH_SCREEN_DELAY 2000 // time the inital logo displays
int max_pot_temp = 260; // 380 dont allow to set to more than 380 this will also increase the pot resolution
int min_pot_temp = 150; // 120 don't allow to set temp less than 80, not needed anyway, except for sleep
int sleeptemp = 130; // the temperature to set the iron in sleep mode, 130 for now looks a good value, could be lower since it heat's up fast


// static settings //
// LCD definitions
//#define I2C_ADDR    0x27  // I2C Address, found with I2C scanner
// #define I2C_ADDR    0x3F // the new lcd
#define I2C_ADDR    0x27
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7
LiquidCrystal_I2C       lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);

// zero crossing detector
#define INTERRUPT_PIN 2 // D2 from pin5 on the 4n35 optocoupler
int initial_counter_for_self_test=0; // counter for the inital self test, if increases then the zero crossing detector is working...
// TRIAC_PIN control pin via optocoupler diac
#define TRIAC_PIN 7
// potentiomenter to read set temperature
#define POT_PIN A3
#define SLEEP_PIN A0 // short to ground and will enter sleep mode, pull up from 100K resistor from 3.3v or 5v
#define TIP_CHANGE_PIN A1 // short do ground to disable power so we can change tip
// max k type termocouple interface
int thermoDO = 4;  // digital 4
int thermoCS = 5;  // digital 5
int thermoCLK = 6; // digital 6
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);

// variables
float temperature;
int pottemperature;
int counter;
int readbutton; // to keep the value read on the sleep pin
int sleepmode=0; // we are not in sleep mode
int allowpower=1; // we are in power mode 1 initaly, there's no tip change


void updatedisplay() {
  pottemperature = analogRead(POT_PIN);
  pottemperature = map(pottemperature, 0, 1023, min_pot_temp, max_pot_temp);
  // going to override the read of the set temperature and place the sleeptemp
  if(sleepmode==1)pottemperature=sleeptemp;
  if(allowpower==0)pottemperature=0; // we set temp to 0, this will disable the iron by going to 0
  //lcd.clearDisplay();
  lcd.setCursor(0, 0);
  lcd.print("SET:    ");
  lcd.setCursor(4, 0);
  lcd.print(pottemperature);
  lcd.setCursor(0, 1);
  lcd.print("TMP:    ");
  lcd.setCursor(4, 1);
  lcd.print(int(temperature));
}

void setup() {
 pinMode(INTERRUPT_PIN, INPUT_PULLUP);//zero crossing pin pull up since the circuits used as example didn't had the pull up.... ???
 //pinMode(TRIAC_PIN, OUTPUT);
 //digitalWrite(TRIAC_PIN, LOW);
 //  that is from the 4n35 emiter to ground and collector to arduino. 
 lcd.begin (16,2,LCD_5x8DOTS);
 lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE); // init the backlight
 lcd.setBacklight(1);       
 lcd.home ();                   // go home  
 lcd.print("    Soldering   "); 
 lcd.setCursor(0,1);
 lcd.print("    Controler   "); 
 delay(SPLASH_SCREEN_DELAY);
 // clears the controler message only since the next one is going to override the "Soldering" message 
 lcd.setCursor(0,1); lcd.print("                ");
 lcd.setCursor(0,0);
 if (isnan(thermocouple.readCelsius())) {
  lcd.print("Sensor: FAIL  ");
 } else { lcd.print("Sensor: OK    "); }
 delay(SELF_TEST_DELAY);
 lcd.clear();
// so it does not turn on on power on during boot...
temperature=30;
pottemperature=25;

pinMode(TRIAC_PIN, OUTPUT);
digitalWrite(TRIAC_PIN, LOW);

// let's attach the interrupr
attachInterrupt(0, zero, RISING); 
} // end setup


// zero crossing interrupt
void zero() {
 // code from DIYSolderingStation.ino
  counter++;
  if (counter < 40) {
    if (temperature <= pottemperature) {
      digitalWrite(TRIAC_PIN, HIGH);
    }
    else {
      digitalWrite(TRIAC_PIN, LOW);
    }
  }
  if (counter == 40) {
    digitalWrite(TRIAC_PIN, LOW);
    detachInterrupt(0);
    temperature = thermocouple.readCelsius();
    counter = 0;
    attachInterrupt(0, zero, RISING);
  }
} // end zero_crossing

void loop() {
   readbutton = analogRead(SLEEP_PIN); // iron on holder so lets set low power
    if (readbutton <=10) { // that is the pin goes low because the ground of iron shorts pin to ground.
       // sleep mode
       sleepmode=1;
       if(allowpower==0)allowpower=1; // we touched sleep mode after power is disable means we change tip else allowpower is allways 1.
    } else {
       sleepmode=0; // we are not in sleep mode
    }
   
   readbutton = analogRead(TIP_CHANGE_PIN); // to change tip we read if the iron touched that pin
   if (readbutton <=10) { // that is the pin goes low because the ground of iron shorts pin to ground and then we disable power to change tip
       // sleep mode
       allowpower=0; // shuttdown power to change tip
    } else {
       allowpower=1; // give power since it's normal operation
    }
   
updatedisplay();  
delay(200);

}
// end code






Saturday, March 10, 2018

Insulated, Stackable Banana Plug - BU‐31104 - 4mm

Nothing major here, just some instruction on how the best way to solder this plugs in case anyone looking for the info.



I bough some for the power supply and multimeter and questioned myself if there was a data-sheet for the plugs. There is, link for the "data-sheet" at the end.

They are a little of pain to solder with lower wattage soldering iron due to big surface area.

For my multimeter I had to cut a little to fully enter the terminals.
The main advantage for this ones is that they are stackable, the disadvantage is that have to be soldered, in some sense it can be advantage (better contact).

For assembly just follow this:



..easy!In my case I preferred to solder to the metal body without going trough the hole.



Data-sheet here: https://www.mouser.com/ds/2/279/DS-BU-31104-0-533043.pdf