Notifications
Clear all

555 timer, latching circuit , relay and optical sensor.

12 Posts
4 Users
2 Likes
386 Views
(@growls)
Member
Joined: 1 year ago
Posts: 6
Topic starter  

Hello everyone.

I used Bill's video on the 555 timer to wire up the latching 555 timer circuit.  I have it working with a pushbutton and I can switch on and off a 9v dc relay.  I would like to replace the pushbutton with an optical sensor.  I can make the sensor control a led but I can't get it to switch the relay. I am using the same connections as the pushbutton to try and make this work. I tried using a irf520 mosfet and also a 2n222 transistor to control the relay, but it doesn't work.  Both will turn on a led but not switch the relay.  The relay will control a small DC motor.  Any help would be greatly appreciated.


   
Quote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@growls

 

Sounds like your relay just isn't getting enough power through the coil to trip. The suggestion to use a MOSFET was to REPLACE the relay,, not to trigger it.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6970
 

@growls See Bill's video on MOSFET and especially the IRF520 module. I am not sure if an optical sensor will trigger the MOSFET though. As @will said, get rid of the relay, a MOSFET is a solid-state relay.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@growls)
Member
Joined: 1 year ago
Posts: 6
Topic starter  

@zander 

Thanks for the reply.

I guess I don't know what shorting the two leads of the 555 timer with the push button does and how to translate that to the mosfet or the sensor.  The latching circuit uses two wires to do the switching.  I tried to simply connect the two wires from the 555 to the drain and the source of the irf520, but nothing happened.

The relay will simply connect the positive wire of a 5v battery to run a small motor.  I wanted to incorporate the optical sensor into a foot pedal to do the switching.  I know it would be a lot simpler to use a push on / push off switch, but where is the fun in that?  This is mostly a learning experience for me to try and learn electronics.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6970
 

@growls No relay is needed, if you have the IRF520 module then simply connect the motor power supply to the Power pins of the module, the motor to the Load pins, and connect the SIG pin to a pin on your controller, when that pin goes HIGH will turn on the motor.

The IRF520 can handle 9A so no relay is needed.

Attached is a screen grab from Bill's blog (HERE) showing the IRF520 Nodule and it's internal wiring. NOTE that VCC is not connected/used and Vin and V+ are connected together. Remember this is an N channel.

Screenshot 2023 02 14 at 10.34.26

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@growls)
Member
Joined: 1 year ago
Posts: 6
Topic starter  

@zander 

I guess I should have explained what I am trying to do from the start.

I don't have a 520 module and I was trying to do this with what I had.

I have a 5v dc motor powered from a battery.

I wanted to use the 555 latching circuit to turn the motor on by pressing a foot pedal once, and then press the foot pedal once more to turn it off.  My thought was to use an optical sensor with a flag on the foot pedal to replace the pushbutton in Bill's 555 timer circuit to do the switching.  I could simply incorporate a momentary pushbutton or micro switch into the pedal design (it will be 3D printed after the I get the circuit working), but I thought using an optical sensor would be a better solution.

In summary, the 555 latching circuit would work great if I could make the optical sensor replace the pushbutton.

Sorry, I am a complete novice at this stuff.

 

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6970
 

@growls The picture I attached shows both the module, and a discrete component wiring diagram. Either build a module on a perfboard using that diagram, or just let the parts hang in mid air (that's how I built my first one). Then do the rest of my instructions re power and logic pin. OK?

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6970
 

@growls Build the first one with a switch, I have a small concern regarding the optical sensor so let's leave that until the rest of the circuit is working.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6970
 

@growls Do you understand what you need to do? It's quite simple now, after you build and power that MOSFET switch, then just take the +ve wire that was going to the LED in the 555 latching switch diagram and connect it to the SIG pin of your home made MOSFET module.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@growls)
Member
Joined: 1 year ago
Posts: 6
Topic starter  

Thanks for the help.

I will try and work on this tomorrow.  That sounds like it will work for me.

I did have the motor running with the mosfet, but since it will be powered with a battery pack designed to charge USB devices, I was getting a voltage drop across the drain and source pins, resulting in the motor not spinning as fast as it should. That is why I was going to use the relay so the motor would get full voltage when the contacts closed. 

I will report back later.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1682
 

Hi @growls,

 RE: I was getting a voltage drop across the drain and source pins, resulting in the motor not spinning as fast as it should. 

Just in case you haven't quite understood MOSFET characteristics, it is important to understand they are quite different from those of bipolar transistors. The 'full' picture is complex, but the following (simplified) notes give a starting point:

  • Drain-source resistance, when device is 'switched on' to conduct, principally depends on two factors:
    • The device chosen ... choose a device with low drain-source resistance ... Rds(on) if you need to supply a substantial current
      • e.g. for 2A current, need Rds to be below 0.1 Ohm to keep voltage drop below 0.2V
    • So choose a suitable device!
    •  
    • The Gate to Source voltage Vgs -- generally, increasing the applied gate-source voltage reduces the  drain-source resistance .. although of course, increasing the applied voltage above its rating will destroy it!
      • A common mistake is to choose a MOSFET which requires (say) 10V to be applied to across the gate to source to achieve a low resistance, but the user only applies 3V to 4V.
    • When choosing a device, take time to read the data sheet. If you only have a low drive voltage available, look for a device that specifies a low Rds at that low drive voltage
    •  
    • Do not get confused by 'gate threshold voltage' .. this is an indication of the voltage that just begins to allow the device to conduct a small current... not the voltage needed to turn it fully on.

Good luck, Dave


   
Inst-Tech reacted
ReplyQuote
(@growls)
Member
Joined: 1 year ago
Posts: 6
Topic starter  

Thanks to everyone for the replies.

I have the circuit working with the mosfet.  I still haven't made the optical sensor replace the pushbutton but for what I wanted the circuit to do, I am going to just use it as is.

 


   
Ron reacted
ReplyQuote