[Release] HubDuino v1.1.9 - Hubitat to Arduino / ESP8266 / ESP32 / ThingShield Integration (ST_Anything)

So what's the best way to split power between the board and the servo?

BTW it was the USB causing power issues. The wall power is much better. But yeah, the blinds are crazy blazing fast now without any waits in the code :laughing:

1 Like

I have my 5v supply wired to a split header wire. If you're using a NodeMCU board the VIN pin will take 5v if you're using a Wemos D1 mini, you can use the 5v pin as an input as well. I used an old micro-usb cable who's micro connector had died (the little pins didn't pop out anymore so it would slide out of the socket) and I just cut the micro end off and soldered jumper wires onto it and then heat-shrinked them. That way you can use a 2A usb adapter and you should have plenty of power for your board and the servo. For testing a 1A would probably work but in practice, if you get resets or they're having difficulty moving, bump up to a 2A. It'll be hidden inside your blinds header-rail so it doesn't have to be pretty.

Mine move so fast, I had to add a function to put a chime through my siren before they move automatically. I sit about 3 feet from one set in my office and the first 3 days I had them hooked up, every afternoon when they would close I just about jumped out of my skin. Was actually kinda funny if it didn't almost give me a heart attack.

1 Like

Can I just use one of these little guys?

I have some 25AWG wire to come out of it, and then I could solder them to 2 jumper wires each.

Either that or you could connect a jumper wire, cut in half and stripped, right into the screw terminal. No need for other wire if it's close enough. But yeah, if you need to go a long distance, connecting to another wire would work. I tend to favor larger gauge wire then I probably need. I have 22 AWG solid and 22 AWG stranded security cable for mine. But if you already have 25 AWG, then yeah, use that.

Thanks, just want to make sure things are safe. I ended up going this route. I have a 5V 2A supply. I believe the VIN port on the MCU is 5V.

I could've left out the extra wire yeah, but it gave me an excuse to break out the heat gun.

2 Likes

Yeah...if you're using a NodeMCU, use the Vin pin and any of the grounds. If you wanted to, you could just connect the servo to one of the grounds on your board and then you'd only need one ground lead from the power supply. Forgot to mention that. I use all Wemos D1 Mini since they're so small and they only have one ground pin so I got REALLY good at making up "octopus" connectors.

20190112_170604

1 Like

Nice, good point about using the same Grounds. This will get me closer to figuring how how to wire a bay window with 3 blinds to 1 MCU. Currently I have 3 boards up there. I might still use 3 though, as it can be tough to get them all calibrated correctly. Like an angle of 50% doesn't quite translate the exact same for each blind.

Edit: Wait, I forgot I can have individual control of 3 servos from 1 board. @ogiewon you've thought of everything. :slight_smile:

1 Like

Another advantage to the Hubduino method. :smiley:

1 Like

FYI, if your using a esp32 a release 1.01 is out.

1 Like

Haven't gotten into the ESP32's yet. So much more unstable than the 8266 and I really don't need that many pins. LOL Personally, I wish someone would make an ESP01 sized board that has a 5v input tolerance. Sometimes I only need one pin but I really don't want to have to convert down to 3.3v. Everything is 5v.

I have a couple ESP01s I'd like to use, but I haven't used them because I haven't found an easy way to program them.

You have to have a usb-serial adapter like this one:

But also, you have to have a 3.3v power source to power them. They are VERY touchy too high voltages. I've burned up a couple of these babies. Also, be careful about what you hook up to the two exposed pins. They are used to determine boot-up state so if you have them wired wrong you'll boot up in flash mode. If you want to use the TX pin as an input, you would have to declare it specifically in your sketch. Otherwise it's used as a serial pin.

Also, when you're going to program them, you have to ground GPIO 0 Manually. You have to solder a momentary button on the back of the programmer.

I might give them a whirl. They'd be useful for really small battery-operated things. What have you used them for?

No way! Way too power hungry for batter operated devices, unless you are going to put them to deep sleep. There are implmentations out there where you can have the esp do a function every so often and then go back to sleep. For example, a button press. However, the reaction time isn't going to be super fast. You can't use a Hubduino sketch and run off batteries. You might get a couple hours, but that's it. You can't put the wifi to sleep otherwise you lose 2-way communication with the board. Remember, wifi isn't like zigbee or zwave....you have to keep a constant connection with the board or you can't issue commands to it.

I used one in a very short lived AC powered button controller I built out of a modified decora switch (made to be momentary) but I got nervous about the power supply in my box. Plus, then I got HE so I had Picos. :slight_smile: I've used a couple other for not HE stuff. Like I said, they're 3.3v so they're a PITA to work with.

There was a project that used batteries and the deep-sleep function that created a single button controller. I wanted to try and do that as a backup disarm for HE. Right now I'm using an old Amazon dash but with the Maker API, it would be easier with an ESP01. Basically, when you press the button you are pressing reset on the board. The board wakes up, does an HTTP call then goes back to deep sleep. People have gotten years out of a couple button cells with something like that. Unfortunately, anything else is going to gobble up your juice too fast to make it effective.

Battery powered WiFi devices are challenging, as the WiFi radio really uses a lot of power.

1 Like

Ah, bummer. Aside from Z-Wave and Zigbee, are there any other wireless protocols that are good with batteries? Maybe bluetooth? I'm thinking about stuff like controlling battery operated RGB strips on a bicycle, or things like that.

Just control them or control them through wireless control? Because Adafruit has a whole line of microcontrollers that don't have radios that are used for wearable cosplay outfits and stuff like that. For example, take a look at this weather sensing umbrella.

They've got a ton of stuff that is either runs one set program when it's turned on or has button control. If you eliminate the radio, it becomes a LOT less power-hungry.

Yeah I have a bunch of Adafruit stuff. It does seem like any wireless control is going to be power hungry though.

Yup. That's just the nature of the beast unfortunately. You could do IR control. That isn't power hungry.

@Ryan780 - I tried just pulling my Cat5 from my development hub, but ST_Anything on my NodeMCU ESP8266 just kept on trucking. I left it running like this for about 30 minutes and did not see any issues. I plugged the Cat5 back into the HE hub and everything resumed as we would hope.

So, whatever is happening when the Hubitat Hub locks up, is different in some way.

I am still running a test using the watchdog timer to see if that has any negative impact. So far, so good. No unexpected resets. If you want to try simply add the following code to one of your project's sketeches.

In setup(), at the very end, add:

  //*****************************************************************************
  //Initialize Watchdog Timer to detect lockups and automatically restart the MCU
  //*****************************************************************************
  wdt_enable(WDTO_8S);

In loop(), at the very beginning, add:

  //*****************************************************************************
  //Reset Watchdog Timer to let is know everything is running fine
  //*****************************************************************************
  wdt_reset();

1 Like