Recent Posts

Pages: [1] 2 3 4 5 6 ... 10 Next
1
The reason a soldering station (tip) is "hard grounded" is for electrical safety. If the power transformer insulation fails, you don't want hazardous live on the secondary side - the tip, handle, controls etc. as a shock hazard.
I've only seen one German brand soldering station with a floating secondary side, it has double-insulation and such low winding capacitance to the primary that the tip stays low potential.
2
General Technical Chat / Re: Is there a meaning to colors on a transitor?
« Last post by Benta on Today at 08:54:49 pm »
Please show the other side of those transistors. The "colour-code" hypothesis is not really credible to me.
3
Projects, Designs, and Technical Stuff / Re: Homebrew Lock-In Amplifier
« Last post by Picuino on Today at 08:53:30 pm »
I have corrected a software problem that caused some ADC conversions to be lost. The ADC conversion now starts at the beginning of the interrupt routine so that there are no delays with overlapping ADC conversions.
It is tested and works better than before.

Arduino program Version 1.0:
Code: [Select]
/*
   Version 1.0 (04/05/2024)

   Copyright 2024 Picuino

   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
   in the Software without restriction, including without limitation the rights
   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   copies of the Software, and to permit persons to whom the Software is
   furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included
   in all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
   IN THE SOFTWARE.
*/

const int PIN_PWM_OUT = 3;
const int PIN_ANALOG = A0;

#define CLK_BOARD  16000000
#define UART_BAUDS  9600
#define TIMER0_PRESET 26        // Must be >= 26
#define TIMER0_FREQ  (CLK_BOARD / (((TIMER0_PRESET) + 1) * 64))

const int SAMPLES_PER_LEVEL = 20;
const int LEVELS_PER_MEASURE = TIMER0_FREQ / (SAMPLES_PER_LEVEL * 2);
const float BOARD_CALIBRATION = 4.0;

volatile long adc_sum;
volatile unsigned int adc_enable;
volatile unsigned int adc_value;
volatile unsigned int adc_samples;
volatile unsigned int timer0_state;
volatile unsigned char output_level;
volatile unsigned char output_level_old;
volatile unsigned char adc_measure_end;


void setup() {
  Serial.begin(UART_BAUDS);

  // Set up output reference signal pin
  pinMode(PIN_PWM_OUT, OUTPUT);

  // Set up peripherals
  timer0_setup();
  adc_setup();

  // Main Loop
  float resistance;
  adc_init();
  for (;;) {
    if (adc_measure_end == 1) {
      resistance = adc_sum;
      resistance = resistance * (BOARD_CALIBRATION / (1.0 * SAMPLES_PER_LEVEL * LEVELS_PER_MEASURE));
      Serial.println(resistance);
      adc_init();
    }
  }
}

void loop() {}


void adc_init(void) {
  adc_measure_end = 0;
  adc_sum = 0;
  timer0_state = 0;
  adc_samples = 0;
  PORTD |= (1 << PIN_PWM_OUT);
  output_level = 1;
  output_level_old = 1;
  delayMicroseconds(200);
  adc_enable = 1;
}


void adc_setup(void) {
  analogRead(PIN_ANALOG);
  cli(); //stop interrupts

  ADMUX = (1 << 6) | (0 << ADLAR);
  ADCSRA = (1 << ADEN) | (0 << ADSC) | (0 << ADATE) | (0 << ADIE) | (0b111);
  ADCSRB = 0x00;

  sei(); //allow interrupts
}


void timer0_setup(void) {
  cli(); //stop interrupts

  //set timer0 interrupt at 2kHz
  TCCR0A = 0; // set entire TCCR2A register to 0
  TCCR0B = 0; // same for TCCR2B
  TCNT0  = 0; //initialize counter value to 0
  // set compare match register
  OCR0A = TIMER0_PRESET;
  // turn on CTC mode
  TCCR0A |= (1 << WGM01);
  // Set CS01 and CS00 bits for 64 prescaler
  TCCR0B |= (1 << CS01) | (1 << CS00);
  // enable timer compare interrupt
  TIMSK0 |= (1 << OCIE0A);

  sei(); //allow interrupts
}


ISR(TIMER0_COMPA_vect) {

  if (adc_enable) {

    // ADC Start Conversion
    ADCSRA |= (1 << ADSC);
    adc_samples++;
    delayMicroseconds(15);  // Wait for Sample and Hold

    // Read and accumulate old ADC value
    if (adc_samples) {
      // Read ADC old measure
      adc_value = ADCW;

      // Add measure to accumulator
      if (output_level_old == 1) {
        adc_sum -= adc_value;
      }
      if (output_level_old == 0) {
        adc_sum += adc_value;
      }
    }

    // Update next state
    if (++timer0_state >= (SAMPLES_PER_LEVEL * 2)) {
      timer0_state = 0;
    }

    // Update output reference signal
    output_level_old = output_level;
    if (timer0_state < SAMPLES_PER_LEVEL) {
      PORTD |= (1 << PIN_PWM_OUT);
      output_level = 1;
    }
    else {
      PORTD &= ~(1 << PIN_PWM_OUT);
      output_level = 0;
    }

    // Take one measure after several samples
    if (adc_samples > SAMPLES_PER_LEVEL * LEVELS_PER_MEASURE * 2) {
      adc_measure_end = 1;
      adc_enable = 0;
    }
  }
}


Output measures:
Code: [Select]
22.57
22.48
22.52
22.50
22.43
22.49
22.40
22.41
22.54
22.35
22.38
22.54
22.53
22.51
22.40
22.35
22.40
22.45
22.48
22.52
22.53
22.44
22.51
22.40
22.41
22.47
22.42
22.53
22.48
22.30
22.35
22.49
22.42
22.41
22.52
22.41
22.35
22.33
22.36
22.38
22.37
22.46
22.49
22.47
22.41
22.38
22.41
22.43
22.55
22.32
22.39
22.46
22.19
22.48
22.34
22.36
22.40
22.37
22.40
22.45

I think that this time I have managed to recover part of the signal “buried” in the noise.


Attached: Vout
4
Hi!




So I understand the digit on the right is showing how much power goes into the tip. When it is idle it shows 5. When I stick the tip into the brass wool it goes to 70 something quickly and maxes out at 80.
When I am touching the solder joint it is very erratic like jumps between 5 and 12, sometimes goes to 20.
When I try to solder something that has a large ground plane, it never goes over 22-23 and it struggles to melt solder.

Do I have a dud?  :-//

Thanks!

That isn't so much different to mine

,,rechecked today, a high thermal demand hand-piece with chisel cartridge HCV-7CH0018S (413 deg C) couldn't melt solder on a coin? - may be another cartridge would  :palm:
 
for the record, my MX-PS5200 is using version 1.37
5
Repair / Re: TSI361R - Identify obscure/old blown transistors
« Last post by floobydust on Today at 08:49:51 pm »
Annealing tin seems pretty hot 230-300°C? and where does it go? Fall inside I guess.
More pics here: NASA Anecdote: Tin Whiskers Inside of AF114 Transistors
They recommend tapping on the top, yeah beat up that transistor's whiskers lol
6
Colour.  Which color is best recognize by huamn eye at low intensity level (far away long working range)?

Haven't the first three already been answered.  Flashing with a regular pattern, but probably not simply on/off.

As for color at night?  Have you heard about our rods and cones?  Look up night vision. 
7
Projects, Designs, and Technical Stuff / Re: TDR function in Cisco routers.
« Last post by SN on Today at 08:44:11 pm »
Thanks to ALM for turning me to TI's site! 

While browsing, I found a slightly newer Application Note for working with TI's built-in TDR function.

https://www.ti.com/lit/an/snla330/snla330.pdf?ts=1714855065817&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FDP83825I

8
It is for night time use.  Design variables are:

Steady vs flashing.  Flash distingusih from moonlight or background man-made light.  Save battery too

Flash pattern.  How brain react best to certain pattern?

Colour.  Which color is best recognize by huamn eye at low intensity level (far away long working range)?
9
Microcontrollers / Re: Help porting 2 functions from C++ to C
« Last post by kgavionics on Today at 08:36:05 pm »
Where is isNumberFun declared?
Here's the complete .c file
Code: [Select]
#include <stm32f401xc.h>
#include <stdint.h>
#include "delay.h"
#include "nokia_glcd.h"
#include "gpio.h"
#include "ctype.h"

#define pgm_read_byte(addr) (*(const unsigned char *)(addr))

#define ALIGNMENT \
  if(x==-1)\
    x = SCR_WD-wd; \
  else if(x<0) \
    x = (SCR_WD-wd)/2; \
  if(x<0) x=0; \
  if(x>=SCR_WD || y8>=SCR_HT/8) return 0; \
  if(x+wd>SCR_WD) wd = SCR_WD-x; \
  if(y8+ht8>SCR_HT/8) ht8 = SCR_HT/8-y8


  const uint8_t* font;
  uint8_t xSize;
  uint8_t ySize;
  uint8_t ySize8;
  uint8_t firstCh;
  uint8_t lastCh;
  uint8_t minCharWd;
  uint8_t minDigitWd;
  uint8_t cr;  // carriage return mode for printStr
  uint8_t dualChar;
  uint8_t invertCh,invertMask;
bool (*isNumberFun)(uint8_t ch);
//----max function-------------------------
int max(int a, int b) {

return (a > b) ? a : b;

}

//--------------------------------------

bool N5110_isNumber(uint8_t ch)
{
  return isdigit(ch) || ch==' ';
}
//--------------------------------

//---------------------------------
void setDat() {gpio_write(DC, 1); }
void setCmd() { gpio_write(DC, 0); }
void startCS() { gpio_write(CS, 0); }
void stopCS() { gpio_write(CS, 1); }

//uint8_t x,y;
/* The function sends a byte of data through SPI */
/* argument d: the byte to be sent */
/* return value: the received data */
uint8_t spi2_transfer(uint8_t d)
{

gpio_write(CS,0);
SPI2->DR = d; /* send the contents of d */
while((SPI2->SR&(1<<0)) == 0); /* wait until RXNE is set */


 gpio_write(CS,1);
return SPI2->DR; /* return the received data */
}

void glcd_cmd(uint8_t cmd)
{

gpio_write(DC,0);
spi2_transfer(cmd);
}

void glcd_data(uint8_t data)
{

gpio_write(DC,1);
spi2_transfer(data);
}

void glcd_init(void)
{
//--------------------------------------
  //isNumberFun = &isNumber;
  cr = 0;
  font = NULL;
  dualChar = 0;
//--------------------------------------
RCC->APB1ENR |=RCC_APB1ENR_SPI2EN;
gpio_output(CS);
gpio_output(DC);
gpio_output(RESET);
gpio_init(MOSI, GPIO_MODE_AF, GPIO_OTYPE_PUSH_PULL, GPIO_SPEED_INSANE,GPIO_PULL_NONE, 5);
gpio_init(SLK, GPIO_MODE_AF, GPIO_OTYPE_PUSH_PULL, GPIO_SPEED_INSANE,GPIO_PULL_NONE, 5);

SPI2->CR1 = 0x35C; /* SPE = 1, BR = 3, FFD = 0, SSI and SSM = 1 */
//GPIOB->BSRR = (1<<GLCD_CS)|(1<<GLCD_RESET); /* make CS and RESET pins high */

SPI2->CR1 = 0x35C; /* SPE = 1, BR = 3, FFD = 0, SSI and SSM = 1 */
gpio_write(DC, 1);
gpio_write(RESET, 1); /* make CS and RESET pins high */

Delay_ms(10);
gpio_write(RESET, 0); /* reset the LCD (RESET = 0) */
Delay_ms(70);
gpio_write(RESET, 1); /* release the RESET pin */

glcd_cmd(0x21); /* switch to extended command mode */
glcd_cmd(0x06); /* set temp. coefficient 2 */
glcd_cmd(0x13); /* set LCD bias mode 1:48 */
glcd_cmd(0xC2); /* set VOP to 7V (VOP = 66) */
glcd_cmd(0x20); /* switch to basic mode */
glcd_cmd(0x0C); /* set lcd display to normal mode */

}

void gotoXY(uint8_t x, uint8_t y)
{

glcd_cmd(0x80 | x); /* set x */
glcd_cmd(0x40 | y); /* set y (bank) */
}


void glcd_setcontrast(uint8_t contrast)
{
/* Max Contrast */
if(contrast > 0x7F) contrast = 0x7F;

glcd_cmd(0x21);
glcd_cmd(0x80 | contrast);
glcd_cmd(0x20);

}
void glcd_clear(void)
{
uint16_t i;

gotoXY(0, 0);

for (i = 0 ; i < 504 ; i++)
glcd_data(0x00);
}
//------------------------------------------------------------------
void N5110_setFont(const uint8_t* f)
{
  font     = f;
  xSize    =-pgm_read_byte(font+0);
  ySize    = pgm_read_byte(font+1);
  firstCh  = pgm_read_byte(font+2);
  lastCh   = pgm_read_byte(font+3);
  ySize8   = (ySize+7)/8;
  minCharWd  = 0;
  minDigitWd = 0;
  cr = 0;
  invertCh = 0;
  invertMask = 0xff;
}

int N5110_printChar(int x, uint8_t row, uint8_t _ch)
{

  int ch = _ch;

 
  if(!font || ch<firstCh || ch>lastCh || x>=SCR_WD || row>=SCR_HT/8) return 0;

  int j,i, idx = 4 + (ch - firstCh)*(xSize*ySize8+1);
  int wd = pgm_read_byte(font + idx++);
  int wdL = 0, wdR = 1; // default spacing before and behind char
 /* if((*isNumberFun)(ch)) {
    if(minDigitWd>wd) {
      wdL = (minDigitWd-wd)/2;
      wdR += (minDigitWd-wd-wdL);
    }
  } else
  if(minCharWd>wd) {
    wdL = (minCharWd-wd)/2;
    wdR += (minCharWd-wd-wdL);
  }*/
  if(x+wd+wdL+wdR>SCR_WD) wdR = max(SCR_WD-x-wdL-wd, 0);
  if(x+wd+wdL+wdR>SCR_WD) wd = max(SCR_WD-x-wdL, 0);
  if(x+wd+wdL+wdR>SCR_WD) wdL = max(SCR_WD-x, 0);
  for(j=0; j<ySize8; j++) {
    gotoXY(x, row+j);
    setDat();
    startCS();
    if(!invertCh) {
      for(i=0; i<wdL; i++) glcd_data(0);
      for(i=0; i<wd; i++)  glcd_data(pgm_read_byte(font+idx+i*ySize8+j));
      for(i=0; i<wdR; i++) glcd_data(0);
    } else {
      for(i=0; i<wdL; i++) glcd_data(invertMask);
      for(i=0; i<wd; i++)  glcd_data(pgm_read_byte(font+idx+i*ySize8+j)^invertMask);
      for(i=0; i<wdR; i++) glcd_data(invertMask);
    }
    stopCS();
  }
  return wd+wdL+wdR;
}

10
Buy/Sell/Wanted / FS (EU/WorldWide) USB oscilloscope + AWG PicoScope 3206B
« Last post by xvr on Today at 08:31:20 pm »
Almost new (bought long time ago but not used, may be 1-2 times)

2 channel 200 MHz bandwidth, 500 MS/s
external trigger line
128 MS buffer

AWG - 20 MS/s

2 Original probes (250 MHz)
Storage bug

Packing box is not survive, sorry. I will pack it in something new.
Original CD contents available, physical CD is lost.

€500 + shipping (Not sure for shipping possibility outside EU, but I will dd my best)
Pages: [1] 2 3 4 5 6 ... 10 Next