💬 Relay
-
the schematic you posted is not using latching relay/valve. it doesn't matter if it is relay or valve. both works the same and consume power when in ON state. If you plan to use it in a way that the valve will be ON for very short periods than it is not important if it is latching or not.
when choosing a transistor for such use, You have to look at its datasheet into "absolute maximum ratings" section and check if it will handle the voltages you will apply to it. 2N3904 looks like it will handle 12V without a problem.
@rozpruwacz
thanks , i will use 2N2222 because the valve needs between 200 and 400 mA.
I'v read the 2N3904 is OK for < 100 mA -
It works very well with the transistor and schematic posted above. I think the valve is a latching valve because it only discharges the battery when there is a transition. The only remaining problem is that the 5V arduino alone is too much power consuming. So i'm wondering if the transistor could as well work with a 3.3V arduino, that is when the signal level on the transistor Base is 3.3V rather than 5 V ... then i also could remove the arduino led but i'll need to keep the arduino regulator because my 3.7V cell voltage is too much greater than 3.3V
-
It works very well with the transistor and schematic posted above. I think the valve is a latching valve because it only discharges the battery when there is a transition. The only remaining problem is that the 5V arduino alone is too much power consuming. So i'm wondering if the transistor could as well work with a 3.3V arduino, that is when the signal level on the transistor Base is 3.3V rather than 5 V ... then i also could remove the arduino led but i'll need to keep the arduino regulator because my 3.7V cell voltage is too much greater than 3.3V
@fhenryco Actually the internal resistor of the solenoid is 27 Ohm while the resistance between C and E of the transistor in the passing state is 35 Ohm ... so it remains less than Vcc/2 for my solenoid which needs 12V ... so i need to tune my boost module at the max ==> more than 30V ... that does not seem ideal, may be i shoud choose another transistor with less internal resistor, but i have little experience with transistors : studied them a long time ago , so if someone can suggest something smart, ready to buy it ...
-
Can I suggest a change to this page?
As it stands the wiring diagram only applies to sketch 1 (without switch). It could get confusing as the 2 sketches use different pins for the relay and there is no need for this.
I propose that the wiring diagram be changed for the relay to be attached to pin 4.
The first sketch needs the relay pin to change from pin 3 to pin 4.That's it. Then the diagram and sketches will work whichever way the builder wants to do it.
-
Can I suggest a change to this page?
As it stands the wiring diagram only applies to sketch 1 (without switch). It could get confusing as the 2 sketches use different pins for the relay and there is no need for this.
I propose that the wiring diagram be changed for the relay to be attached to pin 4.
The first sketch needs the relay pin to change from pin 3 to pin 4.That's it. Then the diagram and sketches will work whichever way the builder wants to do it.
-
-
@mfalkvidd when updating the example sketch you could maybe consider my version of the relay sketch which offers some nice additions: https://forum.mysensors.org/topic/6638/multiple-relays-motion-sketch-fully-customizable-optional-timer-manual-override
-
@mfalkvidd when updating the example sketch you could maybe consider my version of the relay sketch which offers some nice additions: https://forum.mysensors.org/topic/6638/multiple-relays-motion-sketch-fully-customizable-optional-timer-manual-override
@HenryWhite my mind is divided when it comes to that type of sketch. Yes, it has a lot of functionality. Yes, it is probably what people need anyway. But the examples are meant to be used by someone who is just getting into diy home automation. Someone new should be able to understand as much of the sketch as possible. There should be as little as possible to trubleshoot. If the sketch is complex, most people's initial reaction will be that there is something wrong with the code, when in reality almost all newbie problems are power or wiring-related. Keeping the sketch simple helps, at lest a bit.
-
@HenryWhite my mind is divided when it comes to that type of sketch. Yes, it has a lot of functionality. Yes, it is probably what people need anyway. But the examples are meant to be used by someone who is just getting into diy home automation. Someone new should be able to understand as much of the sketch as possible. There should be as little as possible to trubleshoot. If the sketch is complex, most people's initial reaction will be that there is something wrong with the code, when in reality almost all newbie problems are power or wiring-related. Keeping the sketch simple helps, at lest a bit.
@mfalkvidd You are right but may be should there be for each sensor or actuator first the most basic sketch but also at the end of the page a complete version with all functionalities and granted to work by the mysensors team.
Of course for the complicated sketch version a big warning in red letters that this is not recommended for newbies would help...
-
@mfalkvidd You are right but may be should there be for each sensor or actuator first the most basic sketch but also at the end of the page a complete version with all functionalities and granted to work by the mysensors team.
Of course for the complicated sketch version a big warning in red letters that this is not recommended for newbies would help...
After testing some functionalities of nodemanager, i was wondering if already somebody was working on making a GUI for nodemanager which would allow to build one's sketch completely from a graphical interface (at least the most common and basic functionalities) : i thing the great work that resulted in Nodemanager has so well structured the various functions needed that it has already paved the way for creating such a graphical interface.
-
I would agree that more advanced sketches 'should' be included on the same page. Keep all the info in one resource place. Provided it is clearly marked as an advanced project it might help people looking for similar functionality or just interested in learning more about programming....
-
wow! fantastic! ... the github link readme warns that it's not yet fully ready but the interface is already impressive!
I still have the same question i had for nodemanager though : for measuring another battery than the one that feeds Vcc obviously another pin is needed, however why not propose as well the option of measuring such pin voltage but with Vcc as the reference rather than the internal 1.1V which most of the time makes necessary a voltage divider ? Actually i did the modification in nodemanager.cpp to use DEFAULT (~3.3V) rather than INTERNAL (1.1V) reference for a 3.3 pro mini and i can get the expected battery level without any voltage divider.Another unrelated question i have is : could there be any way to adapt the idea of the readVcc method (which is to measure the internal 1.1V against the Vcc reference to get Vcc) but using any voltage applied to a pin as the reference to again measure the internal 1.1 against it ? This would allow the masurement of any voltage greater than 1.1 without voltage divider while the usual method would be applied for measuring any voltage lower than 1.1 ... what did i miss that makes this impossible ?
-
wow! fantastic! ... the github link readme warns that it's not yet fully ready but the interface is already impressive!
I still have the same question i had for nodemanager though : for measuring another battery than the one that feeds Vcc obviously another pin is needed, however why not propose as well the option of measuring such pin voltage but with Vcc as the reference rather than the internal 1.1V which most of the time makes necessary a voltage divider ? Actually i did the modification in nodemanager.cpp to use DEFAULT (~3.3V) rather than INTERNAL (1.1V) reference for a 3.3 pro mini and i can get the expected battery level without any voltage divider.Another unrelated question i have is : could there be any way to adapt the idea of the readVcc method (which is to measure the internal 1.1V against the Vcc reference to get Vcc) but using any voltage applied to a pin as the reference to again measure the internal 1.1 against it ? This would allow the masurement of any voltage greater than 1.1 without voltage divider while the usual method would be applied for measuring any voltage lower than 1.1 ... what did i miss that makes this impossible ?
i also just realized that there is a special AREF pin intended for what i was thinking about ... but it's not available on the mini pro.
My measurements using Vcc as Ref have been indeed very fluctuating, however what i get was highly sufficient to monitor the battery feeding a 3.3v step up regulator to the arduino and help anticipate failure
-
I would like to clarify operation of the sketch, where more than 1 sensors input are used along with more than 1 relay actuator. in one node
- Does node need unique child ID for each sensor input AND relay output?
- If that is the case how child ID is assigned to relay actuators in the above examples?