• RE: Multimeter recommendation?

    @gohan said in Multimeter recommendation?:

    It is a common issue I see in these small cheap meters. There is always the openhardware current meter for what you are suggesting

    Sure but there are other multimeters with a common plug between mA and uA so you can just change range on the selector and you don't have to cut the power to your node during that switch.

    posted in General Discussion
  • RE: Questions for a thermostat project.

    @nagelc Just ordered one of those buck converters from Digikey. Thanks for the suggestion. That might fix my whole issue.

    posted in My Project
  • RE: Questions for a thermostat project.

    @mfalkvidd and others. I am aware of what buck converters are and have used them before, what I was trying to avoid was changing the design of the case to make more room for something like that, but I guess if it comes down to it I may have to. I was hoping that someone might have a solution that might fit my space constraints. I like the one that @nagelc suggested as it looks like it might fit in the space I have. Another option I thought of if I had to change the size of the case was to use a couple batteries. I have some extra 18650's in my parts bin, I would need to check the current draw to determine how long they would last powering the UNO and the TFT shield.

    As for the relays, I am switching them from the original 5 volt coil ones to 12 volt coils. I have decided to power them from the 12 volt supply as I should have plenty of current from that to hold a relay or two since that comes from the house batteries of the motorhome. There would never be more than two relays energized at one time since one relay is for heating and one for cooling, So it would either be a heating or cooling relay and possibly the fan relay being powered at any given time. I like the suggestion @skywatch made about using latching relays to save power, the only problem in using those is that I am limited to 3 data lines (D0 - D2) because of the TFT shield. My understanding of latching relays is that there are two types. Single coil which uses reversing the polarity for set and reset, or the dual coil type which use one coil for set and the other for reset. I think in either case I would have to use more than one data line for each relay which won't work.

    posted in My Project
  • RE: Questions for a thermostat project.

    My main question with this was what is a small cheap and cool (literally) way of getting the 5V I need for the UNO from my 12 volt supply. Preferrably something other than a linear regulator.

    posted in My Project
  • Questions for a thermostat project.

    So this project at this point in time is not a MySensors based project, but I may make it into one in the future and use one for my home. That said,


    My project is a digital thermostat using an arduino uno and a 3.2 inch touch screen TFT shield. This thermostat is going to replace the thermostat in my RV.
    One difference from an RV thermostat to a normal house thermostat is that the house system typically runs on 24 volts AC whereas the RV runs on 12 volts DC. My original plan was to use the incoming 12 volts to power the uno. The specs for the UNO say that you can put up to 12 volts in the barrel jack. The only problem I have with this is that the linear regulator that the UNO has gets quite hot when running it from 12 volts. This heat will no doubt affect the temp sensor that reads the open air temp. I need to find a reasonably small way to regulate 12 volts to 5 volts without a lot of heat.


    And now a bit about my design. I have most of this built and my firmware is nearly ready. I am designing it as an auto changover setup with a relay for fan speed (low or high). Here is the board setup that I have.
    thermostat setup
    The area of the board marked in yellow will be where the screw terminals will go for connecting it to the system. The 3 relays are heat, cool and fan. I was originally going to use 5 volt relays supplied from the 5 volt pin on the arduino. I found out that when two relays would trigger, the UNO would reset. I tried adding a capacitor to the power line near the relays, but that didn't help. I am changing the relays to 12 volt relays so I can just use the incoming 12 volts to power them. I am triggering them with NPN transistors connected to 3 digital pins.

    Here are a few more pics of the setup. I have designed and 3D printed a case for this also.
    boards mounted in case
    This is with the TFT shield in place.
    case with TFT shield
    And this is with the cover in place. The cover needs a little bit of cleanup work, but otherwise not too bad.
    alt text


    And now a look at the firmware. The first image is the main screen. The main screen shows the current temp with the HVAC, fan status and set point on the right side of the screen.
    main screen
    The main screen has two touch areas, the gear in the upper left corner and the set point box. Touching the gear icon gets you to the settings page, seen here.
    settings screen
    When you touch to change any setting, it is stored in the EEPROM on the UNO allowing it to recover on the same settings if it were to loose power. Most of the settings are pretty self explanatory except for the threshold and changeover settings.

    The threshold value is either added or subtracted from the set point to offset when the heater or AC is switched on to know if it should have the fan on high or low. if the temp is with the threshold value of the setpoint, the fan is set to low, otherwise set it to high. On the RV, this just sets the fan to low or high. On a house multi-stage HVAC system it could switch stages.

    The changeover value tells the system how many degrees the temperature must go up or down from the setpoint before the system changes over from heating to cooling or vice versa.

    Clicking Exit at the bottom will take you back to the main screen.

    On the main screen, clicking anywhere in the box that shows the set point temp will take you to the setpoint screen.
    set point screen
    This screen is self explanatory in its function. The up and down arrows let you set a new setpoint, and Exit at the bottom will take you back to the main screen. The setpoint value is also saved to EEPROM on any change in value.

    posted in My Project
  • RE: 💬 Door, Window and Push-button Sensor

    @pepson said in 💬 Door, Window and Push-button Sensor:

    Yes but i dont know how do it.... 😞
    I dont know programing.

    Not an excuse, it's time for you to learn 🙂

    posted in Announcements
  • RE: CNC PCB milling

    @lamikr said in CNC PCB milling:

    Laser is interesting due to it's accuracy but I am worried from the reflected beams. I have only found out so classes for protecting from the beam but would rather like to see a full box made from proper shielding material on top of the Eleksmaker.

    Fourths interesting thing is the openpnp based pasta dispenser and pick and place machine.

    I made an enclosure for my 3D printer in which I had a plexiglass panel for the door. Not long ago I made a mod for my 3D printer that allows me to change to different tool heads. https://www.thingiverse.com/thing:3407486

    One of the tools is a 6 watt laser module. I got a piece of this to replace the plexiglass on the door of my enclosure. It is rated for the wavelength of my laser module which is 450nm. https://jtechphotonics.com/?product=445nm-laser-shielding This might be a bit small if you wanted to make a complete cover made out of this stuff though.

    posted in General Discussion
  • RE: Multimeter recommendation?

    @gohan said in Multimeter recommendation?:

    Aneng an8009 or similar is still a really good buy, 9999 counts is not something you get usually from cheap meters

    I bought one and I don't suggest to buy it for MySensors projects.
    Plugs for mA and uA are separated, and it makes it a pain to measure current consumption in battery powered nodes, you have to unplug/replug the wire to change scale between the 2 modes. When node is sleeping and you are in mA modes you don't see anything. When you are in uA and node is waking up it doesn't have enough current going through the multimeter and it resets.

    posted in General Discussion
  • RE: Using Sensebender gateway MYSX_D3_INT Interrupts

    then check your sensors in an async way, far better than using wait.
    there are different way of writing this, but here an example, maybe easier to read when new to programming : https://www.arduino.cc/en/tutorial/BlinkWithoutDelay
    In this example, instead of toggling leds, process your sensors.
    Also, maybe start simple, like a sketch processing your sensors as you wish, then once it's working well, add MySensors lib

    posted in Troubleshooting
  • RE: Using Sensebender gateway MYSX_D3_INT Interrupts

    seems arduino learning related 😉

    you mentioned sleep in your first post, and I think wait might delay your irq processing too

    • is it your full loop() function ? if so, why do you place attachinterrupt inside of it? looks weird, it would be better in setup for instance
    • "ok" for debug but serial.print in isr is bad.. ideally, it's better to trigger a boolean (volatile) and process its value in loop() . Same for sending msg from isr, not good..
    • are you saying that you get one interrupt at least? which would mean the attachinterrupt(digitalpintointerrupt...) mapping is working, and your sketch logic is wrong (like above mentioned points)

    just in case, in theory (no time for testing), D3=PA05(gpio name under the hood)=IRQNUM is 5 so you could replace the digitalTointerrupt function by the irq mapping name; 5 for D3, or 7 for D4.

    so just as an example, revamping your example, the logic should look something like this

    volatile bool myIsrTriggerVar = false
    setup() {
    	attachInterrupt(digitalPinToInterrupt(MYSX_D4_INT), myInterrupt , FALLING); // means attachInterrupt(7, myInterrupt , FALLING);	
    loop() {	
    	if (myIsrTriggerVar) {
    		// process your irq here
    		#ifdef MY_DEBUG
    		Serial.println("Motion Interrupt");
    		// reset flag
    		myIsrTriggerVar = false
    	// wait(60*1000); // Wait one minute between each probe (60 * 1000)
    void myInterrupt()
    	myIsrTriggerVar = true
    	attachInterrupt(digitalPinToInterrupt(MYSX_D4_INT), myInterrupt , FALLING);
    posted in Troubleshooting