I am currently using a Arduino Uno to run temp sensors and depending on the sensor readings open a solenoid valve. I found this schematic on how to drive the solenoid. Does it look correct?
Second question: Where is a good place to purchase the Transistors, Resistors, and Diodes online? I'm having a hard time finding the MUR340 on Digikey. Is this an old item number? Can someone suggest an equivalent item that digi key has?
I am currently using a Arduino Uno to run temp sensors and depending on the sensor readings open a solenoid valve. I found this schematic on how to drive the solenoid. Does it look correct?
Second question: Where is a good place to purchase the Transistors, Resistors, and Diodes online? I'm having a hard time finding the MUR340 on Digikey. Is this an old item number? Can someone suggest an equivalent item that digi key has?
I would just go with a 1N4004, it's widely avalible, cheap, and will work fine in that circuit.
As far as on-line parts suppliers, there are so many and everyone will have their favorite. Shipping charges are often the deciding factor for many people. I've squirrel away so many parts over the decades I rarely need to order single common parts. When I do need to stock up I tend to buy bulk quantities from E-bay Asian sellers, saves a lot in the long run.
Thanks!!
If it was me I would buy the pre-made module, especially if this for a permanent installation. Nice screw down terminal strips. Plus it has a handy LED indicator on the input side to help troubleshoot problems where you need to determine if the problem is on the arduino side or the 23vdc/solenoid side. $4 with free shipment seems like a great deal to me. I'd buy a spare of two just to have avalible for the next project down the line.
I bought 6 ( I needed 4 ). Now I just have to literally wait for the slow boat from china to get here.... I guess it gives me time to solder up my temperature sensors. I hate soldering tiny stuff .... =(
Cruelkix:
I bought 6 ( I needed 4 ). Now I just have to literally wait for the slow boat from china to get here.... I guess it gives me time to solder up my temperature sensors. I hate soldering tiny stuff .... =(
Cool. I order a lot from E-bay Asia seller, I reliably get 10-12 day delivery to here on the west coast. By the way you made me check that seller's other listing and I couldn't resist this module for the price, I've wanted to play with one for a while.
Dude that accelorameter looks sweet man. I wonder what kind of readings you are going to get on that thing. I'd love to see an output of the data you get from it. What kind of resolution do you think you can get from it with arduino? A reading ever .1 seconds?
I like how the axis are stamped on teh board so you arent guessing. I'm very interested to see how you like it and what you use it for. Keep me updated. I also saw an ultra sonic distance chip on ebay that looked pretty sweet.
Well the main problem with accelerometers I've read is that they are a little 'noisy' in their output values. This one does seem to have internal active filters, so we will see what we see I guess. Not a clue what I will do with it. I buy lots of sensors sometime just to play with them, write a sketch to make sure I understand how to use them, and then put them away for some future super project. I guess experimenting and learning is more important to me then the final projects I might end up building. I am pretty happy with the 5X5X5 LED cube I built around a year ago. Still on my shelf blinking randomly away.
Haven't tried a ultrasonic range sensor yet, however I did get a Sanyo Infrared range finder a while back and it works real well (range around .5" to 12" or so), biggest challenge with it is that's it's output value is not linear Vs distance, you have to correct for it's inverse square response curve.
Cruelkix:
Dude that accelorameter looks sweet man. I wonder what kind of readings you are going to get on that thing. I'd love to see an output of the data you get from it. What kind of resolution do you think you can get from it with arduino? A reading ever .1 seconds?
It's an "analog" accelerometer, so it outputs a varying voltage on each of its axis readouts that reflects the acceleration in that direction. For example, it reports 0.85V to 2.45V between rightside up and upside down on any single axis. Also, since you're reading an analog voltage there's no limit to how quickly you can read it.
So I wired up an SSR I had lying around while I wait for the ones I ordered above. I got the solenoid valve to open, but when the relay closes the valve does not. It appears to maintain its charge. When I short across the solenoid terminals it closes. Does this mean I need to add a diode still even when using an SSR so that the solenoid has some place to discharge to? First time with solenoids, sorry
Some SSR relays don't like working with inductive loads like motors or solenoids. Because of the phase shift between voltage and current in an inductive load the internal tyristors have trouble turning on and off at the proper zero crossing of the AC power. There are external components, resistors and caps, that can help with the inductive load situation but they have to be sized for the induction and current/voltage rating of the load.
Just test your SSR controlling a table lamp and see if all is not better.
The SSR definitely works with anything else. Will the ones I ordered from China be better suited for the application? Should I just wait and test those?
Edit: The SSR has a little red LED on it so I know when it turns off and on, and I have used it for other applications in the past and it has worked perfectly. It must be the inductive load like you said.
Cruelkix:
The SSR definitely works with anything else. Will the ones I ordered from China be better suited for the application? Should I just wait and test those?
Edit: The SSR has a little red LED on it so I know when it turns off and on, and I have used it for other applications in the past and it has worked perfectly. It must be the inductive load like you said.
The relay modules you purchased use electro-mechanical relays, not a SSR. So your relays use simple mechanical switch contacts to turn on and off the external circuit, just like a standard wall light switch might. SSRs use internal semiconductor parts, a back to back SCR type devices called a triac to do the switching.
Funny, I ordered a couple of those accelerometer boards from ebay as well - I think Lefty mentioned the item on the "recent purchases" board. I get items often from ebay sellers, seems to be taking about 3 weeks for items to arrive from China recently; as recently as June it was only 7-10 days.
Cruelkix:
The SSR definitely works with anything else. Will the ones I ordered from China be better suited for the application? Should I just wait and test those?
Edit: The SSR has a little red LED on it so I know when it turns off and on, and I have used it for other applications in the past and it has worked perfectly. It must be the inductive load like you said.
The relay modules you purchased use electro-mechanical relays, not a SSR. So your relays use simple mechanical switch contacts to turn on and off the external circuit, just like a standard wall light switch might. SSRs use internal semiconductor parts, a back to back SCR type devices called a triac to do the switching.
Lefty
Oh I didn't realize they were electro mechanical. Makes sense. Thanks for all the fast replies. You have been amazingly helpful.
So I have everything wired up and working, however I am having some issues with my temperaure sensors. I have attached a full wiring schematic which looks pretty much exactly like my actual panel.
Red = Hot
Black = Signal
Green = Neutral/Ground
Like I said, everything works, however I am getting some strange noise in my temp sensors.
They work perfectly fine in the begining, all of them reading like 68 degrees.
Now there are two times when things go bad.
When I trip a relay and a Valve is opened. If I unhook the vavles, things remain ok.
when I let it sit for a long time doing nothing. Everything starts out fine, temp sensors reading true temps, then after a random amount of time, any where from 5 minutes to 4 hours, temp readings are all over the place.
So when things go bad, the sensors just start reading crazy temps anywhere from like 40 to 110 degrees in ambient air (appox. 68 degrees). After things go crazy, they never go back to normal until I unplug the arduino. When I plug it back in the sensors read correct temps, until I either open a valve or after some random amount of time goes by.
Other things of interest: Temp Sensors are LM34CAZ and I have check the voltages from power supplys and they are dead stable.
1 has the faint smell of power issues, but hard to be sure - does the system settle down if you turn the solenoid off again?
2 says software. Please post your code.