I am looking to start a project that requires a little more electronic know how than learner projects using 5v outputs from the arduino mega.
I want to try and control the temperature and lighting environments in my vivariums using preset programs and tolerances. This will require the arduino to control the following
Increasing and decreasing using dimming techniques a 50-100w 240v spot light creating a basking spot.
Pulse control of a 150-500w ceramic heater to control the temperature of the vivarium at night and outside the spot area.
Control of fans to assist in the cooling and airflow of the vivarium.
Light detection to determine daytime and night time conditions.
Programming is not really an issue as I am a programmer by trade and have no real issues in this area. It is the controlling of the Spot bulb using dimming techniques and the ceramic heater from the arduino and the electronic circuits involved that I struggle with given that these are on a 240v ac supply.
The idea is to preset tolerances for the temperature of the vivarium both under the spot light and the cooler end for day and night, controlling the bulbs heaters and fans.
I am to provide software control of these preset tolerances and also the ability to record the activating of the dimmer, heater, and fan circuits to show patterns etc.
Ideally I would like to be able to store the information in the arduino if a pc is not connected so it can be retrieve later, however memory may restrict the practicality of this part of the project.
Any assistance with the electronics needed to control the spot bulb and the ceramic heater would be greatly appreciated.
...so, if you've lived that long, you'll no doubt have witnessed some moonlit nights that are brighter than some overcast, stormy days. ...meaning, that a light sensor, alone, would not accurately determine "day" or "night"
There are three tanks I wish to control each requiring different temperature ranges both at the hot and cool ends. So the spot bulds are 100w , 75w and 50w respectively. The ceramic heaters are 500w, 350w and 250w.
Fans are 12v similar to the ones found in PC's for cooling but could easily be 9v ones. These again would only be triggered to ensure that no overheating occurred. My thoughts on the control of these was to use a relay to start stop the current and use the heat sensors to monitor the affect with a humidity sensor to ensure that in the one tank I didnt decrease the humidity to much as it is also a factor.
My understanding is that the ceramic heaters can be plugged in and will just heat, however they can be connected to work with pulse proportional thermostats which I understand to be the same as PWM.
The dimming of the spot bulbs based on temperature is normally controlled using a voltage regulating dimmerstat
I seem to remember from my very distant school years that I need to use these calculations however its a little vague so dont laugh to loud
For a 100W spot bulb
Amps can be worked out using wattage/voltage
100/240 = 0.42amps
power is volts x ampheres
240 x 0.42 = 100.80
restistance is voltage / ampheres (ohms law i believe)
240 / 0.42 = 571.43ohms
but from here I am stuck a little, well a lot actually
Is the current flow the voltage / resistance hence
240/571.43 = 0.42
I have been doing a little more digging on this and have found other posts on dimming spot bulbs etc. There is a Vellman Dimmer kit (K8064) available that can be controlled from a 0-10V DC current this would be easier than me messing around with AC given my current novice level and they are relatively cheap. There were warnings on the posts to add a 'big capacitor' in to the connection between the Arduino and the K8064 if using the PWM port as the K8064 doesn't like the pulses, however it doesn't specify how big ?
As my Arduino Mega is 5v dc I was planning to amplify to the required 10v dc using a simple op amp non-inverting circuit (741 op amp and two 10K resistors - yet to test this). My question is do I have to control this from a PWM port or can I use one of the other ports on the Arduino, and if so is the capacitor required still.
In addition I am using a TMP36 sensor to measure the temp in my test circuit can anyone advise on the most accurate ones to use I am monitoring temps in the range of 60-120F also can anyone that can advise on the best sensor to use for measuring humidity, as yet I haven't purchased one of these yet.
I was planning to amplify to the required 10v dc using a simple op amp non-inverting circuit
You would be better off just using a transistor with a pull up to 10V.
My question is do I have to control this from a PWM port
You do if you want to control the brightness then you have to use PWM.
however it doesn't specify how big ?
About 10uF should do it.
best sensor to use for measuring humidity
Tricky ....... humidity is hard to measure accurately electronically and sensors tend to only be 10 - 20% accurate. Plus they age over a year or so and don't produce consistent readings.
I would use the wet & dry method with temperature sensors and a controllable fan to move the air over the wet one.
On the subject of using the PMW i though the vellman board controlled the brightness / dimming functions i just need to supply a 0 -10v to dim / raise ?
If you need to supply a voltage that varies between zero and ten volts to the vellman board you need some way of getting an analogue value out of the arduino. Digital pins will provide you with only zero or five volts. However the PWM pins will provide you with a variable ratio mark / space (high / low ) signal. If this is smoothed with a resistor and capacitor this signal will be converted into a variable DC voltage between zero and five volts.
Now this is half the range you want. You could amplify it with an op amp but you get into all sorts of problems driving an op amp close to the supply rails. So the simplest thing is to put it through a transistor (with a pull up on the collector to 10V) so that you get a variable ratio mark / space signal between zero and ten volts. Then smooth that and you get your variable DC voltage between zero and 10 volts.
If you only want on / off control then any digital output pin with a transistor will do to give you a voltage of zero OR 10 volts.
Would using a transistor require an external supply as well as the 5v from the Arduino I saw a previous diagram on here using a BC183 to get a 10V output which was smoothed with a RC.
This circuit had the Arduino PWM port connected to the Base of the BC183 with a 4k7 resistor in in series. The emitter was connected to Gnd and the Collector connected to a 12v+ supply with a 1k Resister in series. A 680 resistor and 1 uf capacitor in series was used to smooth the output from the collector.
I was wondering if this is the circuit you were getting at in your last post and if so i cannot get the BC183 but there must be a replacement. something like the 2N2222A or a BC547C possibly ?
I was wondering if this is the circuit you were getting at
yes that is the sort of thing.
i cannot get the BC183 but there must be a replacement
Yes any "small signal NPN" transistor should do with a gain of around the 100 to 300 mark. The 2N2222 has a high current rating and so a small gain but the BC547 should work fine.
Quite understandable, basically as long as you have something to limit the current to less than 40mA you should be safe. That's why you have a base resistor.
OK so I have mastered dimming a 240v 100w light bulb using a vellman dimmer unit as previously mentioned in this thread, but I now want to take the project a little further.
I want to be able to control several spot bulbs (each between 50w-200w) using the Arduino, each spot bulb is in a different tank and will be dimmed based on temperature readings on an individual basis.
I was thinking of creating a unit that has several temperature sensors reading the temperature from each of the tanks and controlling the dimming based on the reading. Buying mulitple vellman boards is an option, but I would make the unit extremely large.
Lets say the maximum number of bulbs I wish to control is 4 so i would have 4 sensors attached to the arduino is the best way to create the 4 dimming circuits required to use Opticouplers and Triacs ?
Does anyone know if the Vellman K8064 can be used to control a ceramic heat plate or bulb in the same manner (IE. a pulse proportional control).
I have seen an advert for a unit similar to what I am trying to achieve which claims can dim bulbs and heater ceramics pulse proportionally using the same 3 pin 240v output.