goshantry
Newbie level 6
- Joined
- May 4, 2012
- Messages
- 14
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,283
- Location
- Delhi, India
- Activity points
- 1,361
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
View attachment 73695i am trying to build a simple electronic switch with a transistor, relay and a microcontroller. i want to turn on the relay only when ethe microcontroller gives a high output. i am trying to simulate this circuit but cannot get the desired ac output.
please help me on this.
Your circuit is OK, you're just measuring the voltage on the wrong side of the load resistor.i am still getting perfect ac voltage at the output.
what could be the cause of this?
Can you define when uC give signal or what is conditions for that. All of this is possible with simple Ne555 timer.
Your circuit is OK, you're just measuring the voltage on the wrong side of the load resistor.
For safety, change your circuit as ALERTLINKS showed, so that one end of R1 is connected to ground. Then probe the voltage at the other end of R1.
Did you check the voltage at the base and collector of Q1 to make sure it is switching on and off?
What relay are you using? Perhaps 10V is not enough to switch it. e.g. If the coil is rated at 24V, then the relay will not switch on with 10V.
btw, I think R2 should be much higher - perhaps 100 Ohms. The 10 Ohm resistor you have will draw a lot of current from the microcontroller.
i want that my uC should give the on pulse for 5 min and off pulse for 5 min.
but as orcad is taking ages to simulate those values so i have reduced the time for simulation
Can't you increase the timestep in the simulator to make it run faster?but as orcad is taking ages to simulate those values so i have reduced the time for simulation
Can't you increase the timestep in the simulator to make it run faster?
Timestep = 100uS should be OK with 50Hz AC and ONTIME = OFFTIME = 1 Second.
Relay switch action is delayed 5mS-40mS due to mechanical movement. See properties of relay in simulator. Also set coil voltage to 10V, as it is source volage or change V1 accordingly. Set on/off delay time not less than 50mS to let relay operate.