Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Control 220v lamp With a digitalpot

Status
Not open for further replies.

Bruno Carvalho

New Member
Hello everyone! I need to do control a 220v lamp With a dig pot but i dont know How to Beg in.Im using x9c103 and pic16f887.the problem is that i need to control 220ac voltage controlling 5dc voltage.How can i do this ??
 
Welcome to ETO!
Why do you want to use a micro plus digi-pot to do what a simple, cheap, conventional light-dimmer can do?
 
Hello i need to control a lamp With a temperature sensor im using digital pot With pic.i need to control 220ac controlling 5dc.How can i
Do this????
 
You don't use a digital pot, you use the PIC to provide phase control directly via a TRIAC.

You need to be aware that everything 'could' be live to the mains, depending how you design it.
 
Question:
-Data: When the temperature is cold the lamp is on.
----When temp is too high the lamp is off.
----When the temp is very close. Do you want the light to be dim?

Two state= on/off
OR
Many state= o=off, 1=very dim, .........254=bright, 255=full on.
 
To be accurate, temp control usually requires some form of PID loop.
The control of heating devices is often done with burst firing as is done with stove elements etc, this means you only have to turn a opto isolated triac on and off, no phase control needed.
Max.
 
To be accurate, temp control usually requires some form of PID loop.
The control of heating devices is often done with burst firing as is done with stove elements etc, this means you only have to turn a opto isolated triac on and off, no phase control needed.
Max.

Except he's wanting to control a light, dependent on the temperature - so no PID required, and phase control is.
 
I hate do you home work but;
Here is a light dimmer. It used a BT136 to turn on/off he light. There are UP and DOWN buttons that you will replace with a temperature sensor.
Dimmer-Using-The-Z8-Microcontroller.jpg

The light is turned on/off along with the 60hz power line.
The first line is the power line voltage.
Pin-9 looks for "zero crossing". Second line.
Pin-20 turns on/off the light (faster than your eye can see).
microcontroller-controlled-light-dimmer-1-fig5.jpg
 
What sort of lamp is it?
Is the lamp the heat source or is it just an indicator?
What will you use as the temperature sensor?
How accurate do you need the temperature to be?
 
Some things were out of context but I will explain again , I have to make a fan with temperature sensor.Im using lm35,pic16f887 and trying to use the x9c103(digital potentiometer).The lamp was just to put in the local of the fan for tests.The problem is that i cannot use the x9c103 as a resistance because THEIR Terminals can just support 5vdc and i need to control something that works with 220v.Sorry for any misunderstanding.
 
Like the other members that have replied to your post I do not understand where the digital pot fits in your system. I will assume that the digital pot is driven by some system that dictates the required temperature. (Set point.) The output of the digital pot could converted into a 0 to 5 volt signal which could be fed into the ADC converter of the PIC. The output of the LM35 could be fed into another channel of the ADC. The software would then compare the set point with the actual temperature and contol the power to the lamp by using an I/O pin on the PIC to drive either on/off switching, phase control or burst firing via a solid state relay or a triac triggered via an opto isolator. It will be up to you to decide how complex the software will be. On / off switching will be the simplest. PID will be the most complex.

Les.
 
I have to make a fan with temperature sensor
Some times it takes a while to find what is happening.

So you want to drive a 220V AC fan.
AND
You want a speed control on the fan.
---------------------------------------
I also don't see a good way to use the "digital pot".
<B>So you want a temperature controlled fan controller.</B>
What is the numbers on the fan. 220V ? amps or ? HP.
Do you know if the motor will run slower if the voltage is reduced?
 
That's not easy. Firstly, you need **broken link removed** use the PIC to provide phase control directly via a TRIAC.
 
Last edited:
Bruno. Reading between the lines, and adding a generous dose of imagination, I believe you might be trying to replace the mechanical pot on something like a light dimmer with a digital pot, so that you can adjust the dimmer with your microcontroller.

If that is indeed the case, the best way would be to use phase control of a triac like what romsimpson shows in post 10. But that puts your microcontroller at the high voltage mains supply which, unless you're very careful, might get yourself or someone else hurt. A better version of the circuit would be to use opto couplers to isolate the control circuitry from the mains voltage.

But, let me suggest something simpler. Just use a small servo or stepper motor to drive the shaft of the existing pot on the dimmer.
 
Welcome to Electro Tech online.
We can control it by Relay.
from 5V relay to 220V as circuit breaker to fan or anything load you want to switch on/off.
The 5V Relay has Electromagnet to open close the circuit from its moving position.
for more details can first open the relay in front of you after that you can understand it more well.
then fly wheel diode will be used to avoid spikes at electromagnet.
the micro can supply few mA use bc547 npn BJT with base resistance to get more mA to drive Relay or ULN28003.
I can tell you further just get a relay.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top