Stijn Coenen

Most commented posts

  1. Resistor Decade Box — 15 comments
  2. Desoldering Station — 12 comments
  3. 3D Printer UV Curing Device — 6 comments
  4. ESR-Meter – Update — 4 comments
  5. Dust extraction – Part 4: Solid State Relay — 4 comments

Author's posts

The Amp Hour

My site got mentioned on the amp hour :).

https://theamphour.com/the-amp-hour-25-the-nasa-nostagia/

Switch Clock

ON5DRE used my Switch Clock schematics to create his own switch clock.


More pictures: Link

Looks great ON5DRE!

“100W Temperature Controlled Soldering Pot” Review

I bought a “100W Temperature Controlled Soldering Pot” and decided to write a review about it.


KLT-360 Solder Pot Titanium Alloy Soldering Melting Tin 38mm 100W

Unboxing:
The box doesn’t contain much. Only the soldering pot and a chinese manual.

Take it apart:

The next thing to do is to open it up and see if it is safe enough to plug in to the mains.

After cutting the too long wires down to size I decided to take a closer look at the pcb. Then I saw that it was not temperature controlled like the dx site claims. The power to the heater is controlled, but there is no feedback. I made a circuit of it to proof it.

First I have made some good pictures of the pcb:

Then I placed the 2 pictures on top of each other and made the top one transparent:

Now it is easy to derive a circuit diagram from this.

Conclusion:
There is not enough space between the pcb and the enclosure, especially because it is made of metal, luckily it is grounded. The wires are cut too long.
The pcb looks like its soldered very good, I didn’t expect this with something this cheap.

Powering It Up:

Tinning Some Wire And PCB:

Temperature Accuracy Test:

I’ve put the thermocouple from my multimeter in it. In the lowest range of the soldering pot it should be arround 200°C and I measure 279°C. If it was really temperature controlled like dx claims then the difference would be too big. Because the power is controlled this could be expected.

Conclusion:

It is a pity that it is not really temperature controlled, but for the money you pay for it, it was to be expected. But this doesn’t really makes it work bad. If you use flux or soldering grease then the wires tin very easy.
So I think it is a good buy :). But keep in mind you still need to buy/have enough solder to put in it. You can use normal solder, but then its going to smoke a lot at first.

DG10F1 VFD Clock – Update

The bottom pcb (power supply) is now ready:

230V puls counter

This counter is designed to count 230V AC pulses. The count value is stored if the power supply is turned off. With an reset button the count value can be reset.

Circuit:

If the power supply is turned off then the optocoupler switches his output of, this generates an interrupt in the pic witch will write his count value to the internal eeprom.

 

pcb:

 

Pictures:

Files

Front drill template (coral draw): Download

Front (coral draw): Download

Code (Picbasic) .Bas: Download

Code (Picbasic) .Hex: Download

Cruiser Micromouse

I made this project a few years ago with some classmates in school.

The school bought the chassis and the pcbs of the cruiser micromouse. Our assignment was to write the code ourselves. The function of this robot is to run through a maze.

 

To test the cars we made a circuit. This is made so 1 side is a maze and the other side is a line for a line following robot.

 

Video of the cruiser in action:

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Code (Bascom):

'*************************************************
'* Cruiser micromouse                            *
'* Stijn Coenen, Rob Thomas, Stijn van Roy       *
'* 3ELO2                                         *
'*************************************************
$regfile = "m8def.dat"
'Aangeven dat het intern kristal 
'op 8MHz is ingesteld
$crystal = 8000000
'**********************************
'In en uitgangen instellen
Config Portd.0 = Output
Config Portd.1 = Output
Config Portd.2 = Output
Config Portd.3 = Input
Config Portd.4 = Input
Config Portd.5 = Output
Config Portd.6 = Output
Config Portd.7 = Output
Config Portc.6 = Input
Config PORTB = Output
'**********************************
'In en uitgangen declareren
Led0 Alias Portd.0
Led1 Alias Portd.1
Led2 Alias Portd.2
Selectt Alias Portd.3
Modee Alias Portd.4
Sensor0 Alias Portd.5
Sensor1 Alias Portd.6
Sensor2 Alias Portd.7
Resett Alias Portc.6
Motor_en Alias PORTB.0
L_motor Alias PORTB.1
R_motor Alias PORTB.2
Led3 Alias PORTB.3
Led4 Alias PORTB.4
Led5 Alias PORTB.5
Buzzer Alias PORTB.6
'**********************************
'Byte's declareren
Dim Temp_register As Long
Dim Rechts_achter As Bit
Dim Rechts As Bit
Dim Rechts_voor As Bit
Dim Links_voor As Bit
Dim Links As Bit
Dim Links_achter As Bit
Dim I As Byte
Dim Led_bit As Bit
Dim Vanvoor As Bit
Dim Motorwaarde As Byte
Dim Muurbit As Bit
Dim Teller As Byte
'***********************************
'Analoge ingang instellen
Config Adc = Single , Prescaler = Auto
Start Adc
'***********************************
'Timer0 instellen (Voor de IR leds aan te sturen)
Config Timer0 = Timer , Prescale = 64 , Reference = External
'Prescaled kloksnelheid: 8000000 / 64 = 125 Khz
  'Waarde die in timer0 wordt gezet bij een     
  overflow
  Const Preload = 248
  '************************************
  'Interrupt's aanzetten
  Enable Interrupts
  Enable Timer0
  On Timer0 Interupt_label
  '************************************
  'Subroutines
    'Subroutines skippen bij opstarten programma
     GoTo Overint
     Interupt_label:
      'IR leds van de sensoren aansturen
      If Led_bit = 0 Then
         Sensor0 = 1
         Sensor1 = 1
         Sensor2 = 1
         Led_bit = 1
      Else
         Sensor0 = 0
         Sensor1 = 0
         Sensor2 = 0
         Led_bit = 0
      End If
      'De preload waarde terug in Timer0 zetten
      Timer0 = Preload
      'Motor PWM
      Incr Motorwaarde
      If Motorwaarde < 32 Then
         Motor_en = 1
      Else
         Motor_en = 0
         If Motorwaarde = 64 Then
            Motorwaarde = 0
         End If
      End If
   Return
   '*******************************************
   Buzzer_aanst:
      For I = 0 To 100
         Buzzer = 1
         Waitus 100
         Buzzer = 0
         Waitms 1
      Next
   Return
   '**********************************************
   'Analoge ingangen inlezen en omzetten naar bits
   Analoog_in:
      Start Adc
      Temp_register = Getadc(5)
      If Temp_register > 40 Then
         Rechts_achter = 1
         Led5 = 0
      Else
         Rechts_achter = 0
         Led5 = 1
      End If
      Temp_register = Getadc(4)
         If Temp_register > 60 Then
         Rechts = 1
         Led4 =  
      Else
         Rechts = 0
         Led4 = 1
      End If
      Temp_register = Getadc(3)
      If Temp_register > 60 Then
         Rechts_voor = 1
         Led3 = 0
      Else
         Rechts_voor = 0
         Led3 = 1
      End If
      Temp_register = Getadc(2)
      If Temp_register > 60 Then
         Links_voor = 1
         Led2 = 0
      Else
         Links_voor = 0
         Led2 = 1
      End If
      Temp_register = Getadc(1)
      If Temp_register > 40 Then
         Links = 1
         Led1 = 0
      Else
         Links = 0
         Led1 = 1
      End If
      Temp_register = Getadc(0)
      If Temp_register > 40 Then
         Links_achter = 1
         Led0 = 0
      Else
         Links_achter = 0
         Led0 = 1
      End If
   Return
'**************************************
Overint:
'Motors opzetten
L_motor = 1
R_motor = 1
Do
     GoSub Analoog_in
     If Links = 1 Then
         R_motor = 0
         L_motor = 1
         'Rechts draaien tot dat links niks 
 'meer gedetecteerd wordt
         Do
            GoSub Analoog_in
         Loop Until Links = 0
         L_motor = 1
         R_motor = 1
         Teller = 0
     ElseIf Rechts = 1 Then
         R_motor = 1
         L_motor = 0
         'Links draaien tot dat rechts niks 
 'meer gedetecteerd wordt
         Do
            GoSub Analoog_in
         Loop Until Rechts = 0
         L_motor = 1
         R_motor = 1
         Teller = 0
      ElseIf Links_voor = 1 Then
         R_motor = 0
         L_motor = 1
         Waitms 260
         'Links draaien tot dat vanvoor niks 
 'meer gedetecteerd wordt
         Do
            GoSub Analoog_in
         Loop Until Links_voor = 0
         L_motor = 1
         R_motor = 1
         Teller = 0
      End If
      'Als het programma 30 keer doorlopen is 
      'zonder dat er iets gedetecteerd is
      'dan kort naar links draaien
      Incr Teller
      If Teller = 30 Then
         Waitms 20
         R_motor = 1
         L_motor = 0
         Waitms 30
         L_motor = 1
         R_motor = 1
         Waitms 10
         Teller = 0
      End If
Loop
'******************************************
End

Files

Code: Download

HexAvoider

I made this project a few years ago with some classmates in school.

The plastic parts and the pcbs (kit) where bought by the school. Our assignment was to solder the pcb’s and write the program.

Normally the hexavoider goes forward. This happens by lifting the left side, the right side is then put forward and left back to the rear. Then the other side is lifted and the left side goes to the front. This is how it steps forwards.

The hexavoider has 2 types of sensors: the whiskers and the IR sensors. If the whiskers feel something then it goes backwards, turns to the other side as from where it detected and walks on. If the IR sensors detect something it will reverse and then turn. This is in always in the same direction because there is only 1 IR sensor.

 

Video of the HexAvoider in action:

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

 

Code (Bascom):

'*************************************************
'* HexAvoider                                    *
'* Stijn Coenen, Rob Thomas, Stijn van Roy       *
'* 3ELO2                                         *
'*************************************************
$regfile = "89C51RC.dat"

'Kristal = 11Mhz
$crystal = 11059200
'*************************************************
'In en uitgangen aanduiden
Config Servos = 3 , Servo1 = P1.5 , Servo2 = P1.6 , Servo3 = P1.7 , Reload = 100

Led1 Alias P0.0
Led2 Alias P0.1
Led3 Alias P0.2
Led4 Alias P0.3
Buzzer Alias P0.5
Switch1 Alias P0.4
Switch2 Alias P0.5
Links_antenne Alias P3.2
Recht_antenne Alias P3.3
Led_antenne Alias T0
Irled_left Alias P1.0
Irled_right Alias P1.1
Irin Alias P1.2
Led_left Alias P1.3
Led_right Alias P1.4

Dim index As Byte
'*************************************************
'Subroutines
  'Subroutines skippen bij opstarten programma
  GoTo Oversub
  '*************************************************
  'Ir leds laten knipperen
  Ir_led_sturen:
     For index = 0 To 100
      Irled_left = 1
      Irled_right = 1
      delay
      Irled_left = 0
      Irled_right = 0
      Delay
     Next
  Return
  '*************************************************
  'Als er links gedetecteerd is
  Links_detect:
     Led1 = 0
     GoSub Servo_mid
     GoSub Achteruit
     GoSub Achteruit
     Waitms 2000
     GoSub Servo_mid
     GoSub Rechts_draai
     GoSub Rechts_draai
     Led1 = 1
  Return
  '*************************************************
  'Als er rechts gedetecteerd is
  Rechts_detect:
     Led2 = 0
     GoSub Servo_mid
     GoSub Achteruit
     GoSub Achteruit
     Waitms 2000
     GoSub Servo_mid
     GoSub Links_draai
     GoSub Links_draai
     Led2 = 1
  Return
  '*************************************************
  'Alle servo's in de middenstand zetten
  Servo_mid:
     Servo1 = 12
     Servo2 = 12
     Servo3 = 12
  Return
  '*************************************************  'Achteruit lopen
  Achteruit:
     'links omhoog
     Servo2 = 16
     Waitms 350
     'links naar achter
     Servo3 = 8
     Waitms 350
     'links naar voor
     Servo1 = 8
     Waitms 350
     ' rechts omhoog
     Servo2 = 8
     Waitms 350
     'rechts naar achter
     Servo1 = 16
     Waitms 350
     'links naar voor
     Servo3 = 16
     Waitms 350
  Return
  '*************************************************
  'Naar rechts draaien
  Rechts_draai:
     'links omhoog
     Servo2 = 16
     Waitms 350
     'links naar voor
     Servo3 = 14
     Waitms 350
     'rechts naar voor
     Servo1 = 8
     Waitms 350
     'rechts omhoog
     Servo2 = 8
     Waitms 350
     'rechts naar achter
     Servo1 = 14
     Waitms 350
     'links naar achter
     Servo3 = 8
     Waitms 350
  Return
  '*************************************************
  'Naar links draaien
  Links_draai:
     'links omhoog
     Servo2 = 16
     Waitms 350
     'links naar achter
     Servo3 = 8
     Waitms 350
     'rechts naar voor
     Servo1 = 14
     Waitms 350
      'rechts omhoog
     Servo2 = 8
     Waitms 350
     'rechts naar voor
     Servo1 = 8
     Waitms 350
     'links naar voor
     Servo3 = 14
     Waitms 350
  Return
  '*************************************************
  'Sensoren checken
  Sensor_check:
      'Linkse antenne
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      'Rechtse antenne
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      'IR-Leds
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
  Return
Oversub:
'*************************************************
   'Servo's in de middenstand zetten
   GoSub Servo_mid
Do
   'rechts omhoog
   Servo2 = 8
      Waitms 350
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
   'Links naar achter
   Servo3 = 10
     Waitms 350
     If Links_antenne = 0 Then
        GoSub Links_detect
     End If
     If Recht_antenne = 0 Then
        GoSub Rechts_detect
     End If
      GoSub Ir_led_sturen
     If Irin = 0 Then
        GoSub Rechts_detect
     End If
   'Rechts voor
   Servo1 = 8
      Waitms 350
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
   'links omhoog
   Servo2 = 16
      Waitms 350
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
   'rechts naar achter
   Servo1 = 15
      Waitms 350
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
   'Links Naar Voor
   Servo3 = 14
      Waitms 350
      If Links_antenne = 0 Then
         GoSub Links_detect
      End If
      If Recht_antenne = 0 Then
         GoSub Rechts_detect
      End If
      GoSub Ir_led_sturen
      If Irin = 0 Then
         GoSub Rechts_detect
      End If
Loop
'*************************************************
End

Top

Files

Code: Download

Line Follower

I made this project a few years ago with some classmates in school.

After we completed our Cruiser Micromouse project, we had a spare sensor pcb to make a line follower. The school had an spare chassis for the same robot so we decided to build one. We designed the main pcb for this robot ourselves. It is based on a PIC16F876A.

The line follower should follow a line. The line is detected by sensors that are mounted on the front of the robot. These sensors emit infra-red light to the surface, the white surface reflects the ir light, while the black line absorbs it. The reflected light is detected by photo-transistors which are connected to the analog inputs of the pic. If the underground is white then the value is smaller than a set value and the line follower should adjust to the line. The 2 outer sensors are not used because the line never gets there. We have put 4 led’s on the pcb for debugging : Led 1 is the power led, led 2 lights up if it turns to the right, led 3 if it drives straight forward and led 4 if it turns to the left

 

Circuit main pcb:

 

Circuit sensor pcb:

 

Video of the Line Follower in action:

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

 

Code (Picbasic):

'*************************************************
'*Naam   : Lijnvolger                            *           
'*Auteurs: Coenen Stijn, Thomas Rob,van Roy Stijn*
'*Datum  : 18/02/2009                            *             
'*************************************************
Device 16F876A
Config      WDT_OFF, PWRTE_ON, HS_OSC, lvp_off
XTAL        = 20

Declare ADIN_RES 10       ' 10-bit result required 
Declare ADIN_TAD FRC      ' RC OSC chosen 
Declare ADIN_STIME 50     ' Allow 50us sample time 

Dim sensor_waarde As Word

Dim detect_links2 As Bit
Dim detect_links1 As Bit
Dim detect_midden As Bit
Dim detect_rechts1 As Bit
Dim detect_rechts2 As Bit


ADCON1 = %10000010
'
Symbol sensorRU = PORTA.0
Symbol sensorRB = PORTA.1
Symbol sensorM = PORTA.2
Symbol sensorLB = PORTA.3
Symbol sensorLU = PORTA.5
TRISA=1
'
Symbol IR_led1 =PORTB.2
Symbol IR_led2 =PORTB.3
Symbol IR_led3 =PORTB.4
Symbol led4 = PORTB.5
Symbol led3 = PORTB.6
Symbol led2 = PORTB.7
TRISB = 0
'
Symbol motor1A = PORTC.7
Symbol motor1B = PORTC.6
Symbol motor2A = PORTC.5
Symbol motor2B = PORTC.4
TRISC=0
'
Symbol motor_en = PORTC.2
'
Clear
'
HPWM 1,190,1221 
motor1A = 0
motor1B = 0
motor2A = 0
motor2B = 0         
DelayMS 3000
  '**********************************************  
  'afstemmen van IRled's en sensoren.
  'Kijken welke led er wanneer 1 is.
  GoTo over_sub
    sensorinl:
        '*************************************
        '* L2 **** L1 * L0 * R0 * R1 **** R2 *
        '*************************************
        '  A4      A3     A2      A1      A0
        '  15      15     30      20      70
        sensor_waarde = ADIn 0
        If sensor_waarde < 70 Then
            detect_links2 = 1    
        Else
            detect_links2 = 0
        EndIf
        sensor_waarde = ADIn 1
        If sensor_waarde < 15 Then
            detect_links1 = 1 
        Else
            detect_links1 = 0       
        EndIf
        sensor_waarde = ADIn 2
        If sensor_waarde < 30 Then
            detect_midden = 1
        Else
            detect_midden = 0 
        EndIf   
        sensor_waarde = ADIn 3
        If sensor_waarde < 15 Then
            detect_rechts1 = 1    
        Else
            detect_rechts1 = 0
        EndIf
        sensor_waarde = ADIn 4
        If sensor_waarde < 15 Then
            detect_rechts2 = 1 
        Else
            detect_rechts2 = 0       
        EndIf

    Return
  '**********************************************      
  'Vooruit gaan    
    vooruit:
        motor1A = 0
        motor1B = 1
        motor2A = 1
        motor2B = 0 
        led2 = 0
        led3 = 1
        led4 = 0  
    Return
  '**********************************************     
  'een stuk naar links draaien    
    Links_draaien_weinig:
        motor1A = 0
        motor1B = 0
        motor2A = 1
        motor2B = 0
        led2 = 0
        led3 = 0
        led4 = 1
        DelayMS 5
        GoSub vooruit                  
    Return
   '**********************************************     
   'een stuk naar links draaien     
    Rechts_draaien_weinig:
        motor1A = 0
        motor1B = 1
        motor2A = 0
        motor2B = 0
        led2 = 1
        led3 = 0
        led4 = 0
        DelayMS 5
        GoSub vooruit                  
    Return
'**********************************************      
'een stuk naar links draaien   (langere delay)   
    Links_draaien_veel:
        motor1A = 0
        motor1B = 0
        motor2A = 1
        motor2B = 0
        led2 = 0
        led3 = 0
        led4 = 1
        DelayMS 100
        GoSub vooruit                  
    Return
'**********************************************    
'een stuk naar rechts draaien (langere delay)     
    Rechts_draaien_veel:
        motor1A = 0
        motor1B = 1
        motor2A = 0
        motor2B = 0
        led2 = 1
        led3 = 0
        led4 = 0
        DelayMS 100
        GoSub vooruit                  
    Return
'**********************************************   
'alle sensoren op 1 zette
over_sub:
   IR_led1 = 0
   IR_led2 = 0
   IR_led3 = 0
   GoSub vooruit
'**********************************************      
'oneindige lus  
While 1=1
    Main:
'**********************************************      
'kijken welke sensor(en) er 1 is/zijn
    GoSub sensorinl
    If detect_links1 = 1 Then
        GoSub Rechts_draaien_weinig
        GoTo Main
    EndIf       
    If detect_rechts1 = 1 Then
        GoSub Links_draaien_weinig
        GoTo Main
    EndIf     
'**********************************************   
Wend
End

Files

Code: Download

3*3*3 LED Cube

I made this project a few years ago with some classmates in school.

We had some time left in our project week, so we decided to build a led cube.

The microcontroller we used was a 16F648A. The leds are in a 3D matrix.

The cube is divided in 3 rows. These are connected to ground via a transistor. The + of the leds are connected to the pic via resistors.

 

 

Circuit:

 

Video of the LED Cube in action:

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Files

Code: Download

555 Contest Entry

This is my entry for the 555 contest. I didn’t have much time to make something so the entry isn’t much.

This design is a fan controller. The base of it is a simple pwm circuit with the 555 timer. The problem with fan’s is that they don’t start at low voltages. So I added a capacitor (C2) to give it a little voltage boost at the startup.

 

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

The circuit can also be easily adjusted to have a soft start. This can be useful when driving led’s etc. This way the light is not instantly bright.

Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.