Feed

  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Hi - you know - I SHOULD have considered using P-channel MOSFETS - but I didn't probably as I'd never really considered any that handle gate-source voltages over over logic levels - but you're absolutely right - aside from costing perhaps a little more - they WOULD appear to make FAR more sense than using and kind of DIODE - I wonder why more people don't point that out - and thanks for the info. For anyone wondering what on EARTH we're talking about - diodes drop voltage - up to 0.8v or so for a silicon diode and up to 0.4v for upmarket diodes... not a lot - but when you're talking about 3 to 5v that is a significant chunk. MOSFETS can have a really significantly low on-resistance which can amount to VERY low voltage drop. Very good - will remember that for next time. Oct 18, 18:11
  • Peter Scargill Nano I2c Peripheral by Peter Scargill: Thanks for that - but some points... the first link you supplied doesn't work - I did eventually extract the working URL - and was greeted with a Nano (I guess original) that cost a STAGGERING amount - you won't believe this - they want 20 EUROS plus 7.51 postage (very cheapest rate) + VAT which is something in the region of 33 Euros - about the price of a Raspberry Pi 3. I think someone was having a laugh there. Seriously - do people REALLY pay those prices in the US? I could buy THIRTY "Pro Mini" boards for that. In the second link - the Arduino Pro Mini - the website says clearly that the product is retired so one can be forgiven for only checking out the chinese versions. So - for clarification when I say a NANO - I mean anything that costs under Β£2 and is classed as NANO or PRO MINI Here are a couple of examples of boards... This is referred to as a Nano - whether that's the correct name or not, given the apparent price differential I'm guessing most people will go for something like this... I hope these links works - the originals are a bit long... This version is referred to as a NANO and has a mini USB connection - and so a USB conversion chip... handy for ease of use..(some I've seen have micro-USB connections). https://goo.gl/MSMG5T The one below is referred to as a Pro Mini - it does not have a USB chip - and if you happen to be familiar with using FTDIs - well you might prefer this one... as it is a tad cheaper.. https://goo.gl/m1nyLe There are variations - just ensure you get one with A6 and A7 brought out because not ALL boards have this available. I probably use these terms lightly because I would never even LOOK at a site that charged more than two or three pounds sterling for these boards. At best they have a cheap 328 chip, a USB chip, Xtal, connector and a few passives all of which cost VERY little. NOW - if you're looking for something up-market with a LOT more power - there is of course a Pro-Mini type board with an ATMEGA2560 on it and extra pins - check THIS out https://goo.gl/3Ji1J6 that costs a whopping Β£7 or so but you're getting far more power. My personal favourites are boards using the Atmega1284p chip but sadly they are not so popular - it has even more RAM than the 2560 - yet runs normal Arduino code no problem with a few pin changes for I2c and SPI.... I wrote about this a LONG time ago when I was heavily into this - https://tech.scargill.net/the-mighty-1284p/ - check it out... I've already played with this as a successor for my Nano peripheral - but I'm waiting for the STM32 to get proper slave I2c support as I think that'll be better value for money. Oct 18, 18:00
  • Nano I2c Peripheral by Zeph: Oh, and one tip: there are cheap socket-to-screw terminal adaptors for the (real) Nano. SInce it's just a passive 30 pin PCB, these adaptors can be used for other small devices in a 0.6" wide format (between pin rows, more like 0.7" overall). Oct 18, 17:27
  • Nano I2c Peripheral by Zeph: Let's clear something up once and for all (this was mentioned briefly in another comment but I want to make it very clear). There are TWO cheap and widely available breadboard compatible versions of the Arduino. The Arduino Nano (https://store .arduino.cc/usa/arduino-nano) is a 30 pin module with a USB to Serial adapter on board, and a 6 pin ICSP connector. It's typically a 5v/16Mhz ATMega328p. Clones typically follow this pinout or similar: http://www.keywild.com/arduino/gallery/Nano_PinOut.png - The Arduino Pro Mini (https://store.arduino.cc/usa/arduino-pro-mini) is a smaller 24 pin module with no USB, instead relying on an external FTDI/ch340/etc serial interface using 6 extra pins on one end. It's typically a bit cheaper. It's widely available in 5v/16Mhz and 3.3v/8MHz versions (sometimes as 16Mhz with solder adjustment for 3.3v vs 5v). It is widely available with the ATMega328p, or the ATMega168p for a few cents less. Most clones follow the same pinout for the 24 outer (breadboard compatible) pins, but A4, A5, A6 & A7 vary between inner (non-edge) locations and edge locations (opposite the serial interface); there even may still be some without A6 & A7. One pinout, with non-edge locations for all 4: http://www.dominicdube.com/wp-content/uploads/ProMiniPinout.png The latter (Arduino Pro Mini, aka APM) is popular because finished projects often don't need the onboard USB to Serial converter, or its power consumption, or the larger size. If you desolder the power LED on the APM, you can reduce the sleep current quite a bit, and if you can desolder the voltage regulator (eg: to run on battery) then very low sleep current is possible so this (lightly modified) module is a champ in the long battery life niche. If you use a 3.3v/8MHz version, you can interface directly with many sensors, and it can use even less power. On the other hand, the original Nano and at least the clones I've bought, have both 5v and 3.3v (generated by the USB to serial converter) on board, tho the processor is 5v. You are often referring to what's obviously an APM as a "Nano" which could cause confusion if people search for purchasing, or to look for pinouts or tips. So referring to the Arduino Pro Mini (when that's what you are using) would be a simple and helpful change. Thanks for your many contributions! Oct 18, 17:20
  • 4D Systems Gen4 IOD by Tony: Availiable from RS. One of their UK distributors. Free delivery. I really need to calm down and look before I click BUY NOW. Oct 18, 11:34
  • Peter Scargill 4D Systems Gen4 IOD by Peter Scargill: That has to be courier or a mistake. That's just stupid pricing.. if someone from the company is looking in maybe they can comment. Oct 18, 10:04
  • 4D Systems Gen4 IOD by Tony: Love the look of this but, $36.00 shipping??? Oct 18, 09:33
  • Michael Jones More Alexa Marvels by Michael Jones: Everything was working great but at some point today my echos can no longer discover my devices using this node anymore. I've restarted node red, had Alexa forget my 5 devices, rebooted, etc. But no joy. Anyone else seen this behavior? Hopefully it's just temporary. As an aside, the esp devices I've been controlling with this are: 12v pwm controlled bedside reading lamp. It was simple to get the dimming to work. 4 120v SSR controlled power outlets. Previously I controlled all these devices using an iPod app using the NetIO tool. BTW - that control still works Ok. Oct 18, 03:21
  • Giovanni Castania 4D Systems Gen4 IOD by Giovanni Castania: Peter do you happen to have a close up picture of the board? Just wondering if flash chip can be easily upgraded to a 4Mb one (same as originall Sonoff, or ESP-01)? That would make this as my #1 fav display for some of my project! Oct 17, 18:56
  • ESP8266 Lies and Deceit by jason: Worked through much of it. 0x10000.bin gets flashed to 0x10000 in ESP's flash. Via their eagle linker script they map this to a virtual address of 0x40210000. ESP will then execute these instructions from flash, for example my function is at position 0x5860 in the bin file. So on ESP it exists at 0x15860. When I wrote some inline asm to dump out the program counter it was a few instructions deep from 0x40215860. My theory is that one can write a binary blob into a particular address in flash, let's say... 0x50000 and then jump program counter to 0x40260000 and this blob should run normally. End result should be a small applet which can be dynamically updated and which has freed itself from the massive blob by linking statically with all the rest of the code which makes ESP run. One item still researching is relocatable code generation by gcc. The manual I was looking at did not mention support within the generic nor within the xtensa sections. Several other processor types have it mentioned. Maybe the doc is old or maybe it isn't supported. If the latter then the dynamic applet would need to be coded in ASM rather than C. Oct 17, 16:29
  • Don Harris Node-Red BigTimer Example by Don Harris: Thanks. It's not imperative that I have the info. More an information thing for the end user, showing when sunset or sunrise will occur. I don't want them to need to access Node-Red. I suppose I could show the data on a table that indicates sunrise/sunset times and let them use that as their guide. Oct 17, 15:44
  • Scott Macias More uninterruptable thoughts by Scott Macias: Pete, Not all protection boards have charging and balance the batteries specially the cheap Chinese ones that are not real BCMs. For these you need to have constant current/voltage feeding the circuit to fully charge the batteries. This one promises a charger on it https://www.amazon.com/dp/B01I9TXMR6/ref=cm_sw_r_cp_ep_dp_q7Slzb5HVPYTQ but since there are no real specs.... Here is a good example of someone building a UPS using the PCB, a Charging circuit and finally a relay to decouple the power source, charger and drain source using those low cost boards. https://www.youtube.com/watch?v=kuEgZELszLk Hope this helps as I am working on building my own. Oct 17, 15:17
  • DrFragle and MrShark 4D Systems Gen4 IOD by DrFragle and MrShark: like most of the comics on tv, only Daredevil and Jessica Jones were quite good, and the future Punisher πŸ™‚ but we're OT πŸ˜‰ Oct 17, 14:47
  • Peter Scargill 4D Systems Gen4 IOD by Peter Scargill: That's terrible. Oct 17, 14:30
  • Peter Scargill Node-Red BigTimer Example by Peter Scargill: There would be a million ways to get an output on the dashboard, if the information were made available on the output of BigTimer, but as there has been no interest in such a feature to date I've not made that available. You can of course see the remaining time on the node itself. Oct 17, 14:29
  • DrFragle and MrShark 4D Systems Gen4 IOD by DrFragle and MrShark: Flash WAS dead, but he just came back in season 4 premiere πŸ˜€ http://www.digitalspy.com/tv/the-flash/news/a838007/flash-season-4-trailer-barry-allen-returns/ sorry, i had to comment πŸ˜€ Oct 17, 13:42
  • Don Harris Node-Red BigTimer Example by Don Harris: Is there a way to get an output on the dashboard showing when the Bigtimer is going to switch states? A countdown? Oct 17, 13:31
  • DrFragle and MrShark ESP8266 DIO mysteries SOLVED by DrFragle and MrShark: as far as i remember, there are 4 different modes, so the rule is: just try them all πŸ˜€ Oct 17, 13:00
  • Peter Scargill ESP8266 DIO mysteries SOLVED by Peter Scargill: Oh, noooo, a third possibility - anyway, good to know it's working now - excellent. Oct 17, 10:58
  • John ESP8266 DIO mysteries SOLVED by John: I don't claim to understand what is happening but I now have success by uploading using the parameter "dout" instead of dio or qio Oct 17, 10:42
  • Peter Scargill ESP8266 DIO mysteries SOLVED by Peter Scargill: Yes it very much depends on the FTDI - most have rubbish 3v3 capability. Oct 17, 09:11
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: WELL - this is good - I didn't know you could do that... looks way better than using diodes.. https://www.youtube.com/watch?v=IrB-FPcv1Dc&list=PLN-sn0AkfeorOZnNqPCWNinHtGEfGt81M&index=8 Oct 17, 09:05
  • Peter Scargill ESP8266 Lies and Deceit by Peter Scargill: I THINK to get an answer to that, you'd need to be way more specific. Oct 17, 08:45
  • Peter Scargill YAT and ESP8266 by Peter Scargill: Thanks - I've put a note at the top. Oct 17, 08:43
  • John ESP8266 DIO mysteries SOLVED by John: I've had no luck with the upload. Looks like I'll have to go with Arendst firmware. Oct 17, 08:26
  • Darren Wragg ESP8266 DIO mysteries SOLVED by Darren Wragg: Ahh... my suggestion probably won't resolve your issue then as one would assume that if there's enough 3v3 juice to flash one lot of firmware, it could manage any firmware. It also confirms that you're following the correct flashing procedure (so not the usual newbie error of not getting the ESP into flash mode correctly). My issue is probably just my Dell laptop not having enough USB 'oomph' for the job and this would explain why Google doesn't reveal any/many others with my problem. Oct 17, 07:55
  • John ESP8266 DIO mysteries SOLVED by John: Thanks for that info Darren. I'll try that, but strangely I can blow Arendst firmware to this Sonoff without hitch using just USB FTDI. Oct 17, 06:46
  • Darren Wragg ESP8266 DIO mysteries SOLVED by Darren Wragg: I struggled programming various Sonoff devices using just a USB FTDI adapter. I had to also supply an external 3.3v power supply to the Vcc pin (with common ground) for the flashing process to work as my laptop did not provide sufficient current via the USB cable on its own. This took me ages to find out as it wasn't a well documented issue elsewhere online and I didn't need auxiliary power when programming Wemos and NodeMCU clones, just the Sonoffs Oct 17, 06:05
  • Scott Macias More uninterruptable thoughts by Scott Macias: Here is a very simple circuit used with Lead-Acid batteries (They are easy to charge and they keep charge for a very long time) Do not attempt to charge any other kind of battery with circuit... they will blow it up! Lead-Acid UPS Part List: R1 - 39 ohms 1/2W D1, D3, D4 - 1N4001 or similar diode D2 - 13V zener rated 1W C1 - 220uF electrolytic capacitor rated 25V C2 - 10uF electrolytic capacitor rated 10V IC - 7805 or similar 5V regulator BAT - 12V lead acid battery Oct 17, 01:54
  • Scott Macias More uninterruptable thoughts by Scott Macias: Here is a circuit that you can use as a Lipo UPS. This is the type of circuit you have in a laptop. Just remember to regulate at the desired voltage 5V for Pi. Oct 17, 01:52
  • Dave McLaughlin Cheap as Chips Touch Switch by Dave McLaughlin: I got myself this receiver and now I get good range from the door and switches. Will need to make a suitable switch cover to go over the existing light switches to prevent anyone switching things off and then attach the switches to that making a single installation. Now all I need to do is work on Node-red to handle it all. πŸ™‚ https://www.tokopedia.com/bpraktis/rf-433mhz-high-quality-wireless-receiver-transmitter-module Oct 16, 23:21
  • More uninterruptable thoughts by Aidas: Hi Peter, Have you ever considered to use P-Channel MOSFET instead of regular diodes? Then you can use 2 MOSFET's and one dirty cheap 4 AMPS up converter. Cheap (I mean really CHEAP) MOSFETs are available for example from Aliexpress: https://www.aliexpress.com/item/20PCS-FQP47P06-47P06-MOSFET-N-CH-60V-47A-TO-220/32432271459.html?spm=a2g0s.13010208.99999999.262.23Zkws What they can do and how to use them? Answers - here: https://www.youtube.com/watch?v=IrB-FPcv1Dc&list=PLN-sn0AkfeorOZnNqPCWNinHtGEfGt81M&index=8 BR, Aidas Oct 16, 20:55
  • ESP8266 Lies and Deceit by jason: Nice blog! "Why is the FLASH important? Well, programs are stored here and effectively appear to RUN in FLASH (they don’t but that’s a different conversation). " Does this mean if I write PIC (position independent code), compile it as such, and then write it to a known address in flash that I will not be able to effectively drop my PC (program counter) at that address and expect it to execute? Oct 16, 20:04
  • YAT and ESP8266 by maettu_this: Hi again, The official release YAT 1.99.80 is available for download at https://sourceforge.net/projects/y-a-terminal/. It includes the two requests above. See release notes for complete list of changes. Best regards, Matthias Oct 16, 20:00
  • Grant Lake More Alexa Marvels by Grant Lake: Thanks Juan, I may give that a try. I’m currently using RF to control Magicfly/Etekcity wireless outlets with Node Red and ESP8266/RF433. I’m hoping to use a similar setup with X10 transceivers and motion detectors. X10’s 310 MHz frequency has been a bit of a challenge. Oct 16, 15:26
  • More Alexa Marvels by Juan C Galvez: I use a program I wrote in C language, communicating with CM11A Serial Computer Interface. Initially it was used just to receive motion sensors information and send SMS to my cellular phone. Later, I added functionality to turn devices (Lamps, wall switches, and appliance modules) on/off/dim from Node-red. Communication between Node-red and my program is using UDP. Good idea about using ESP8266 to interface with CM11A. Communication between Node-red and ESP8266 could be MQTT for flexibility. The only issue here is that CM11A uses RS232 interface not TTL. I think you can still use firecracker with ESP8266 (A lever converter 3.3 5V will be required) since Firecracker uses Microchip micro controller which is 12 volts tolerant (RS232 levels) but in fact works at 5 volts. You could give it a try. Do a google search for CM11A protocol. Oct 16, 14:27
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: You beat me to it. Oct 16, 08:01
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: as stated on that link, they're just battery protection boards, nothing to do with an ups functionality with all the bells and whistles Peter explained many times (recovery from flat, shutdown of the OS, etc) Oct 16, 07:31
  • Scott Macias More uninterruptable thoughts by Scott Macias: Why would we want to go this more expensive rout when we can buy a PCB/PCM that does all this for a dollar or 2: http://www.ebay.com/itm/1S-2S-4S-3S-5S-6S-BMS-PCB-Protection-Board-For-18650-Li-ion-Lithium-Battery-Cell-/192217997007?var=&hash=item2cc115decf:m:m39Wvb562PULbdHPwx6AqgA. There are some with battery balance and fuel gage. Oct 15, 23:38
  • Peter Scargill NanoPi K2 by Peter Scargill: And they've STILL not fixed the site - COME ON FRIENDLYARM - the resize instructions for the K2 Android DON'T WORK !!! And I don't have my MINT laptop any more. Oct 15, 19:00
  • Grant Lake More Alexa Marvels by Grant Lake: Hi Juan, what do you use as the X10 interface. I use Heyu with Firecracker but am looking for something I can use on an esp8266. I too have started using this node instead of HA-Bridge. Good find Peter! Oct 15, 15:46
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Thanks for the clarification Joshua - I'm assuming it doesn't have any specific battery protection or digital level low-power signal? For my projects I want the computer to have adequate time to shut down when the voltage is dropping, for the output to disconnect before the battery suffers and the whole lot to come back up shortly after power is restored. SO MANY of the so called Pi solutions out there fail to manage this simple trick. For me UPS means unattended. Still, lots of potential answers coming up. Oct 15, 14:36
  • More uninterruptable thoughts by Joshua: Of course you shouldn't consider putting LiPo / LiFe / Liion batteries on this supply. It is designed for lead acid batteries, as you can see on the plugs which are commonly used on lead batteries. I think it is a marketing trick or the seller has low electronic knowledge. I bought a 12v 2.2Ah battery from a german reseller (reichelt). The datasheet suggests between 13V-15V roughly to charge and 13.8V as float-charge voltage. Due to their design lead acid batteries are nearly unbreakable, so overcharging is no issue. The PSU has a small trim pot next to the screw terminals which lets you select the output voltage. I've set it to 13.9v and it is working just fine. The battery is float-charging. If mains fails it starts discharging until it reaches 10.9 Volts. After this it needs to be reconnected to mains or you have to swap the battery and start it with the small pcb mounted button next to the trim pot. As I said for powerloss indication I use the 3 leds which are soldered on a seperate pcb which you can see on the product photos One led indicates mains power, another one whether it is charging and the third if it's turned on. By simple connecting an optoisolator (optokoppler in german) to the mains indicator led and to a GPIO you can monitor whether mains has power or not. Another way is to use a non-invasive power meter (these with a coil) which can measure the power being drawn from mains and as a result can sense a blackout which triggers a shutdown. If you want I can send you a photo of my setup. I also wanted to make a youtube video about it in the near future. Joshua Oct 15, 11:59
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: well, if you and Aidan come out with a pcb with all this knowledge, published on oshpark or easyeda, everyone could even buy a full kit by them and with adequate skills, solder it on their own πŸ™‚ or publish on tindie, as many do... πŸ˜‰ sure using premade boards, if easily interconnectable and "hackable" (like a track cut, as you say) is easier for everyone, but leads to bigger boards... Oct 15, 11:02
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: He's right - the +B and +out are commoned - so you'd need to parallel the b- outputs to the battery and the - outputs to the load. The only thing with using these boards as against doing your own is getting to pin 8 the enable pin if you want to control that. on mine there APPEARS to be an easy to cut track but boards differ. How much the batteries are charged could be the difference between them lasting a couple of years or many years. Oct 15, 10:59
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: here some thoughts about parallelizing tp4056 mini boards: http://budgetlightforum.com/node/45724 Oct 15, 10:49
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: about latest 15/10 update by Peter: found this other board, claiming 3A on tp4056... but there's NO 4056 on the board... https://it.aliexpress.com/item/3-7V-4-2V-3A-Li-ion-Lithium-Battery-Charger-Protection-Board-For-18650-TP4056-DD05CVSA/32824653351.html and here some bigger images of the 3A item Peter's talking about: https://s3-ap-southeast-1.amazonaws.com/a2.datacaciques.com/wm/307176851/778686960/3842956254.jpg https://ae01.alicdn.com/kf/HTB1pm.dQFXXXXXVXXXXq6xXFXXXh/-font-b-TP4056-b-font-4-2V-3A-High-Current-Lithium-Battery-font-b-Charging.jpg Oct 15, 10:44
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: i think they copied the design from this Drok one (as happens A LOT with Drok products...): https://www.amazon.co.uk/110V-240V-Uninterruptible-Over-discharge-Protection-Cmopatible/dp/B01K9SM78K/ there's even this which is nice... https://www.amazon.co.uk/Power-Inspired-Router-Uninterruptible-Supply/dp/B0187PWCLO/ but honestly, if one has to go for the UPS way (and it's viable, as a basic UPS can be bought for less than 40$), i'd do as in this video, bypassing the inverter... https://www.youtube.com/watch?v=-Ur-D37-juo Oct 15, 10:03
  • John ESP8266 DIO mysteries SOLVED by John: Is it just me but.. I have tried blowing the roms to a new Sonoff S20 using several different upload techniques. I have tried qio and dio. The upload seems to go ok but there is no serial response from the device. I can successfully upload to Wemos, NodeMcu, bare ESP8266 etc. Any thoughts? John Oct 15, 09:40
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: It LOOKS good - but one phrase in there worries me a little "Which power to the battery charge, no requirements for the type of battery, lead, lithium and other batteries are OK!" - REALLY? So no special treatment for Lithium batteries? I think I'd want someone else to try that first... What voltage lead-acid did you use? And in the case of long-term power outage, does it give any kind of indication that the PI can use to gracefully power down - or does it just abruptly shut off the power when the battery gets to 10v? Oct 15, 09:08
  • More uninterruptable thoughts by Joshua: Hi, I've built my own UPS for my RPi and OPi + HDD using this SMPS: http://s.aliexpress.com/AjY3QJr2 You can hook up a lead acid battery to it and it works right away. There is no delay between changing from mains to battery power, my PIs keep running as nothing has happend. It has 3 indicator leds which you can use paired with an optoisollator ic to monitor everything. And 6/8/10 Amps of output power should be perfectly fine. Greetings from Germany Joshua Oct 15, 09:01
  • Jerry Barnett ESP8266 Lies and Deceit by Jerry Barnett: Interesting that the picture shown on the first LINK shows the RST button missing (even though you see the label on the silk-screen.) Oct 15, 02:54
  • More Alexa Marvels by Juan C Galvez: I stopped using ha-bridge in favor of this node. 300+ MB freed from Raspberry Pi 3. I am using it to control X10 lights and turn on/off TVs using IR leds controlled by ESP8266. Other TV command using my own Alexa skill. Thank you. I also saw node-red-contrib-wemo-emulator. Works good too. Oct 15, 00:00
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Hi Richard.. We're talking in my case, a small number of devices in each of 3 remote locations. For me, yes, I could use POE but I would not want to get into discussing to a mixed skill audience, add-on POE given the variety of wiring arrangements out there - but yes, for some, POE might be a solution - assuming of course hardwired Ethernet - not a lot of use in a wireless situation and while the technical person may well scoff WIFI - most normal people do not want wires all over and will use WIFI or radio even where not really appropriate. Sensors around the house are often wireless completely - I have visions of people spending more time changing batteries than enjoying the home πŸ™‚ Lighting - there is a general trend to think that lighting is becoming lower and lower power. That is not my experience. Sure, it is low power compared to filaments - but compared to Compact Fluorescent? - I don't think there is anything in it - You can of course get 3w LED bulbs - and they're about as much use as a candle. I've just retrofitted some lighting in Spain as I'd gone LED and was having a clear-out of 64k (horrible cold white) lights and noted that the warmer lighting tended also to be a little dimmer. Most of my lighting now is mains powered and most of the lamps are 15-25w LED. As for LED string - the current consumption of that rapidly rises as you get more enthusiastic. We are of course talking two completely different things here - a UPS for a PI should be able to handle any length of outage - no matter how big the batteries, they will run out of steam eventually and the UPS needs to inform the Pi (or whatever) that the power is about to drop. A lot of the tiny UPS out there that I've tested simply don't make the grade, some need a button press to come back on, some can't handle the full load while charging, some don't issue any warning etc. But even the bigger ones - I've had industrial UPS systems that given a long term (24 hours) power-out have driven the battery so low that it has never recovered. I've had units which cost a lot and yet in those same units I've seen batteries expand due to excessive charge or discharge. NONE of this should be happening in any of these devices... hence I keep looking to see what's out there and continue to experiment - as in this article. I have some commercial units on the way for testing so expect more on this subject. Oct 14, 17:25
  • More uninterruptable thoughts by Richard: I accept your comments but for 'you' I don't believe we're talking one device and there are lots of cheap poe solutions using the spare pairs and not following the standards. Then perhaps no extra wires. Also it is a bit of a leap to have a fairly critical device (i.e.needing ups) which doesn't require a reliable network connection? Finally, I don't beieve the time is too far away when lighting is powered from UPS as its power needs are now quite moderate and that would offer UPS at many more locations? Oct 14, 15:59
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: And if we're talking about a single Pi... a real UPS? Something costing way, way more than the Pi? Oct 14, 15:46
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: A Nano will provide the intelligence. You are assuming that in a given situation, with existing equipment that power over Ethernet is practical - not always. Low voltage cable - are you married? Cables around the house? Oct 14, 15:45
  • More uninterruptable thoughts by Richard: If I were to consider this type of solution, then I'd include some device with intelligence that would control the various elements and make appropriate measurements. At least for prototyping that would let you make all sorts of changes without the soldering iron. However, I don't relly understand the use part of the requirement. If you have access to mains or even ethernet, then remote power is surely the way to go. That way you can have a real UPS and distribute reliable power via ethernet or a low voltage cable? Oct 14, 15:42
  • More Pretty Colours by Aidas: For OSX users I've modified command a bit as OSX has no apt-get: _ifconfig() { [ ! -x "$(command -v ccze)" ] && brew install ccze; \ifconfig | ccze -A; }; alias ifconfig='_ifconfig' Oct 14, 11:30
  • DrFragle and MrShark ESP8266 Lies and Deceit by DrFragle and MrShark: here (look at 1:45) you can find more thoughs about reducing power consumption... the cp2102 usb consumes 22mA while the ch340 only 50uA, just saying... https://www.youtube.com/watch?v=s2JAqwg4udY Oct 14, 08:38
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Not at all - those booster chips have an ENABLE pin - not that easy to get to on the boards but if you did your own thing it would be no issue - normally enabled - take high and the output shuts off. I've not yet investigated the charger chips to see if they have the same. Oct 14, 06:46
  • More uninterruptable thoughts by Oliv': Ok, I did not understood you wanted to add an automated switch on when power is back. What is your plan, a MOSFET ? Oct 14, 06:38
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: I have some strips that glue onto batteries - pennies each - that do protection. Not tested yet but you HAVE to lose SOME voltage... Oct 14, 06:38
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Good idea but too simple... let's say the battery goes down - Pi is told to turn off by the comparator... now we're using less current the battery voltage comes u, Pi never comes up. What's needed as the battery goes down is to firstly warn the Pi, then after a delay, turn the power off. The power should then not come back on until the battery has recovered slightly otherwise you end up in a loop of off/on.... so you need hysteresis. By the time you are finished you have a complete circuit, may as well have used a Nano. Also with processing power you get options like being able to change setting, view status on an OLED etc. Looking at designs out there, many have tried the minimal route and ended up with something that just does not do the job.I'd like to see at least 10 minutes pass between a low battery and the unit coming back on - when you get power failures, it is not unusual to get a raft of them in a row so best keep the Pi off until it is all over. Oct 14, 06:35
  • More uninterruptable thoughts by Oliv': Maybe you can just add an aop in comparator mode on b+ and wire it to an rPi gpio, so you can avoid the nano Oct 14, 06:20
  • Peter Scargill 16 Channels of PWM for ESP8266 by Peter Scargill: Hi Stewart. Well, the Espressif I2c with some speeding up has worked well for me until I came across the INA219 (see recent posts on the blog) and not only could I not use that I could not SEE it in a scan - so I modified another version of I2c (my source is out there on GIT but not stunningly well documented) and that worked perfectly for both scanning and reading and as a background job I'm in the process of converting over other boards to the newer code so I can get a little space back by ditching the original - both of course are software-only implementations of I2c. Oct 14, 06:07
  • Peter Scargill ESP8266 Lies and Deceit by Peter Scargill: Hi there Michael... yes, looked at them - but as I have no use for an external antenna (some of the Pi-type boards have them and for my uses I've never seen an advantage over the internal types which work just fine) and as you can't actually use any more than 1MB for anything other than data, I've never pursued these πŸ™‚ Oct 14, 06:03
  • 16 Channels of PWM for ESP8266 by Stewart Rap: Thanks! I've been spending the last day or so trying (without success) to adapt the adafruit pca9685 library to use the espressif i2c implementation πŸ™‚ Oct 14, 01:40
  • Michael Ray ESP8266 Lies and Deceit by Michael Ray: Have you looked at the available Wemos mini pro boards? They claim 16 MB (128 Mb) and have external antenna connection available, Oct 13, 23:31
  • Peter Scargill ESP8266 Lies and Deceit by Peter Scargill: Very useful - thanks for that. Oct 13, 21:17
  • ESP8266 Lies and Deceit by John Jorsett: Thanks for the reply. For anyone else happening across this topic, I found a blog post regarding operating the NodeMCU on battery power. Among other things, the author performs some invasive board surgery to disable the problematic components, but has some suggestions for how to allow the re-enabling of the USB so that the board can still be used for easy development. https://tinker.yeoman.com.au/2016/05/29/running-nodemcu-on-a-battery-esp8266-low-power-consumption-revisited/ Oct 13, 21:10
  • YAT and ESP8266 by Kevin Williams: Pete, Any chance of getting a screenshot or two of your predefined commands? I saw that you had a few set up.... and probably have several by now... Thanks, Kevin Oct 13, 18:29
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: The charge circuit has protection chips built in. Oct 13, 17:26
  • DrFragle and MrShark More uninterruptable thoughts by DrFragle and MrShark: why not just using protected batteries... don't rely on the charger itself to have protection... if you have unprotected ones, like many 18650, you can even convert them: https://www.youtube.com/watch?v=1rg3ZWxBNUE Oct 13, 16:40
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: As we're discussing this - I just found THIS little devil.. https://goo.gl/QMnfei That's not EACH - that's for FIVE! 4 AMPS up converter - apparently. I'm having that. Oct 13, 16:27
  • MQTT Broker on an ESP8266 by Catalin: The broker is now on ESP32. The bridging is not yet working but I will try to fix it. It will be able to handle up to 32 clients. Need to rework the storage for configuration since ESP32 offers more options on that and the webserver that will be used for configuring the broker. iotcentral.eu has now ssl config for MQTT and for websocket on ports 8883 and 9883. Cheers Oct 13, 15:41
  • Peter Scargill Big Timer by Peter Scargill: Ivan I'm sure you could come up with something using the UI to do that. The node itself will obviously reset when changes are made to it - that's the way Node-Red works. Oct 13, 15:38
  • More uninterruptable thoughts by Neo: I see your point, it would backfeed into the wall supply when the power is out. Oct 13, 15:32
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: To answer your own question - the TP4056 can handle up to 8 volts... but of course - not all power supplies can be altered... so the dual booster approach still has merits - expecially as they are so cheap. Oct 13, 15:32
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Absolutely John - a NANO would not only indicate to the PI to turn off before the battery gets low (the Nano takes so little current I'm not concerned about it flattening the battery much) and using the ENABLE pin(s) on the buck convertor(s).. but also could potentially stop charge on the battery reaching 100% which has to be a good thing... oh and you could do all sorts of logging, I2c slave interface etc etc.... Oct 13, 15:28
  • Peter Scargill More uninterruptable thoughts by Peter Scargill: Thanks for that - as it happens - the higher charge isn't needed the way I do it but I guess it would do no harm to upgrade the board - out with the tiny soldering iron. As for the second booster... main supply straight to the PI - well because you'd need diode protection for both the battery part and the mains part - some power supplies will handle voltage going back into them when turned off - others will blow up... so - you put diode in series - but now your 5v on your mains supply is down to 4.6 with an expensive diode, 4.3 with a cheap one - neither is a good idea. NOW - if your power supply was around 5.8 - then yes - but that THEN leaves the question - how will the TP4056 respond to having 5.8 shoved into it - especially at the higher current you suggest. I know - "GOOGLE IT" - but if you know the answers from experience - do tell before I get the iron out. Oct 13, 15:26
  • Peter Scargill ESP8266 Lies and Deceit by Peter Scargill: The only effect USB chips have on deep sleep is to use juice. Similarly with regulators though to a much lesser extent (usually). So you need a minimum system. Don't forget you also need GPIO16 attached to reset. Oct 13, 15:21
  • John Schulein More uninterruptable thoughts by John Schulein: Like your approach here. What happens if the power is out for a LONG time? Any protection from over discharging the battery? If you have a nano in play then you could monitor the falling battery voltage and then disconnect the battery (mosfet) at some low (2.5v?) voltage. Hopefully the Pi has shut down before this point (warned by the nano at (2.7v?). Just some thoughts here but do go for it. I think this is will work. Oct 13, 14:56
  • More uninterruptable thoughts by Neo: You can get almost 1A charge current out of that little board on the bottom if you change the setting resistor. It's a TP4056 chip for charging and a DW01-G on the right for battery protection if you want to fiddle with it. Why bother with 2 boost converters? wouldn't it be enough to connect the main supply straight to the Pi and then have diode protection (just like in your drawing) for the battery part? Aka skip 1 boost converter. That's how they do it on the Adafruit boards usually, albeit on a smaller scale. If you have 3A on the supply that should be enough to charge at full strength and power the Pi at the same time. Oct 13, 14:36
  • ESP8266 Lies and Deceit by John Jorsett: I've been trying to find your earlier remarks regarding not using boards with USB chips when wanting to do deep sleep. That may explain a problem I'm having. My searches aren't turning anything up. Is this contained in a particular post you can point me to without too much trouble? Thanks. Oct 13, 14:14
  • Peter Scargill More Alexa Marvels by Peter Scargill: But hang fire as I didn't get expected results... awaiting feedback. This is what I get - anyone experimenting may want to check Turn it on – value goes to 100, inject 45, nothing happens. Turn it off – the output value goes to 0. Turn it on – the value goes to 100. Surely that is not right - if you set a brilliance for a lamp - and turn it off - you'd expect it to go back to where it was when you turn it back on? Similarly heating - you'd not expect the heating to go to 100 when you turn it on. But this…. Alexa – increase the temperature of big boy.. That turned it ON at 100. Set input to 45 (inject input). Alexa – decrease the temperature of big boy… That set the value to 24 That’s REALLY not right… I've put the above into GIT - awaiting feedback. Oct 13, 10:54
  • Peter Scargill More Alexa Marvels by Peter Scargill: We spent ages on that, Garry and I could have Alexa say whatever I wanted. We arranged things so that Alexa simply interpreted the spoken word and sent what it thought was said back to us. A simple parser then took care of that - I had two problems, Alexa would substitute any near enough valid word... so you can't rely on it sending back "Turn the brown light on" - it could return "turn the round light on" or anything sounding the same. My other problem was - while seeing the benefit of SSL, I cannot for the life of me see the benefit of INSISTING on port 433 - which is what Amazon do - and my service provider in Spain reserves that port for debugging the WIMAX connectio - so no chance of having incoming 433 without a lot of faff - I'm really hoping that overall, ultimately Google get their finger out and give us a better solution - for now - this node is looking like a decent one way solution - that and of course, HA-Bridge which again I use with MQTT. Oct 13, 09:55
  • Peter Scargill More Alexa Marvels by Peter Scargill: Hi Steve - well - UK is one up - and one I obviously favour - but of course I'm also aware that regular readers and contributors to this blog come from Italy, Germany and other European countries. Still - worth a play for those of us who are in the privileged countries. That loss of information announced the other day worried me a little and makes me wonder how resilient the server is on that this all sits on - we're used to big companies having systems over multiple continents and if they go bust someone else takes over - but what happens when servers are owned by an individual, costing them money - and they lose interest. I guess that's why I favour hosting my own logging graphics using Grafana - I log information for years and don't want to find that the service is no longer available. And so it is here with this skill. Do we know how that service is hosted? Oct 13, 09:50
  • Steve Lenehan More Alexa Marvels by Steve Lenehan: The listed restrictions to the US are out of date and unless Berkshire has become the 51st state of the union recently I can vouch that all facilities work well in the UK. I can't speak for Germany which is I believe the only other officially supported territory outside the US. But as you say given that Amazon have restricted availability of the Echo range both geographically and linguistically it does make any discussion re Alexa somewhat parochial. Oct 13, 09:28
  • Peter Scargill More Alexa Marvels by Peter Scargill: See updated blog - new developments including the ability to preset the percentage/brilliance value - which is really essential if you want things to turn on at a predetermined level and not 100%... or if you have external timers which might adjust settings outside of verbal control. This is coming along nicely. Oct 13, 09:12
  • Peter Scargill More Alexa Marvels by Peter Scargill: Good morning Steve - I just took a look here https://alexa-node-red.bm.hardill.me.uk/docs and things are worse than I suggested... look at the fine print and some of the commands only work (according to Amazon) in the USA and that includes setting the colour - really the one reason that might've pushed some of us in the direction of that Node. Given the international nature of audiences to blogs like this - I really can't suggest going down that route right now. Perhaps when Amazon get their act together and remember that there is a big world out there. Oct 13, 09:04
  • Peter Scargill Sonoff 4CH 4 Channel Mains Control by Peter Scargill: Assuming you're talking about the same board as me with uncommitted contacts, NC = normally closed, COM = common, NO = normally open. So the contacts you want are common and normally open - these effectively make a switch that closes when power is applied to the internal relay -it is these two that you want across your switch. Be aware of course that if the relay for any reason jams CLOSED - then you won't be able to turn the light OFF. If you need a failsafe to OFF then it gets more complicated - you'd need to wire the relay IN SERIES with the switch - so that even if jammed shut, you'd be able to turn things off with the switch. I don't see that as a priority for a light however and it comes with it's own perils as if someone turns the light off... you've no way to remotely turn it on. Personally in these situations I hand control over to the electronics and rewire the switch to be NOT connected to the mains - but to act as an input to something like an ESP8266 - I can then READ the wall switch and decide whether it should have priority or not... but that, of course is somewhat more complicated. Oct 13, 08:54
  • Sonoff 4CH 4 Channel Mains Control by pawan s: Thanks for the prompt replies. Now I am a bit confused. So I should just connect the live to com and the second wire to NO and leave NC open? Also, one more thing that I need clarity on- Should I install it between main supply and switch OR switch and devices? Oct 13, 08:40
  • DrFragle and MrShark ESP32 First Steps by DrFragle and MrShark: honestly, i've seen these videos from Andreas Spiess where he explains everything, but as i didn't need it for now, never studied LoRa, for now πŸ™‚ so, i don't know if that 433 is standard or there are better option or anything else... just reported a board that is AIO, and i see many others are out there these days... but the full architecture requires gateways and many more stuff, so, it's just a link in waiting for easier configurations, and actual needs, of course πŸ™‚ https://www.youtube.com/watch?v=ZV_ZY-0Q1lo https://www.youtube.com/watch?v=Ya-QlEaonLU https://www.youtube.com/watch?v=adhWIo-7gr4 https://www.youtube.com/watch?v=9qcghiz246E https://www.youtube.com/watch?v=duwUwXt-hs8 https://www.youtube.com/watch?v=ZFVA6cQyheY https://www.youtube.com/watch?v=hMOwbNUpDQA Oct 13, 08:24
  • Peter Scargill ESP32 First Steps by Peter Scargill: That review unfortunately is typical of many - what does it tell you? Zero... radio any good ? Doesn't say. Look at this ad.. http://www.ebay.co.uk/itm/LoRa-5-Km-Langstrecken-RF-Netzwerk-Kommunikations-Module-Radiofrequenz-SX1278-/142407341489?hash=item21282395b1:g:S-gAAOSwDiBZN8dE 5KM? I don't think so! How do they get away with adverts like that? Oct 13, 07:55
  • Peter Scargill ESP32 First Steps by Peter Scargill: Personally I've been down the 433Mhz radio route.. spend countless months working on that and other frequency radios using Arduino and various network software... NRF240L01 radios at 2.4Ghz come to mind, possibly the worst radios in the world... no thanks - too many horrific memories of success rapidly followed by failure. I'll stick with WIFI πŸ™‚ About the only thing I use 433Mhz for now is the odd sensor - and rarely ever get the range one would expect - got a stone cottage! Oct 13, 07:50
  • Peter Scargill Sonoff 4CH 4 Channel Mains Control by Peter Scargill: Junk that answer - I've just checked my Sonoff Pro - this does NOT apply to the older Sonoffs... it turns out that the Pro has uncommitted contacts - just checked with the meter - ie NO, COM, NC... in which case just wire the NO and COM across the switch. Oct 13, 07:47
  • Peter Scargill Sonoff 4CH 4 Channel Mains Control by Peter Scargill: The problem you may face with Sonoffs is that they tend to pass the live through. I really wish they would not do that, personally I'd rather have an uncommitted set of contacts, in which case you could jut put those any old way across the switch terminals so that either the switch or the sonoff could turn on the light. As it happens you really need to find out for sure if the live feed to the switch IS the live feed. One would ASSUME a live feed to the switch, the other end going back to the lamp and then on to neutral. In some cases the neutrals will be brought to a block in the switch - in other cases there is no neutral in the switch.. of course I'm ASSUMING a UK question - I don't know which country you are in. If you're in Spain, at least the parts I've been to, they don't even HAVE specific live and neutral or if they do, no-one seems to bother about it πŸ™‚ So the answer to your question depends on where you are and how confident you are about the wiring and your skills. If it were ME (and only ME) - I would first ascertain for SURE that the switch had a LIVE feed which then went off to the lamp... and knowing that The Sonoff has a LIVE feed and a switched feed, I'd then take the switched feed only and take it to the OTHER connector on the switch - so that the switched side is switched EITHER by the Sonoff OR the actual switch - but that is a potentially dangerous proposition. No doubt others will have faced this situation and have thoughts a little clearer than mine? Oct 13, 07:42
  • DrFragle and MrShark ESP32 First Steps by DrFragle and MrShark: time to try LoRa, too? πŸ™‚ https://www.cnx-software.com/2017/10/13/this-ttgo-board-combines-esp32-lora-radio-and-oled-display-for-just-10/ Oct 13, 07:40
  • Sonoff 4CH 4 Channel Mains Control by pawan s: I have a very novice question. I am trying to install Sonoff 4ch pros (stock version for now) in my home. I am not sure how to install Sonoffs in combination with the existing switch functionality. I want to use Sonoff ewelink app but want to maintain the original switch manual operation with the mains wiring as well. So that in case the sonoffs fail I am still able to operate the switches manually. Can you guide me please. Oct 13, 07:17