Hacker News new | past | comments | ask | show | jobs | submit login

Wow! Built-in Wifi + 4GB storage for $9? This changes the entire scope of my repeatedly-postponed environmental monitoring project. I can wire a $10 temperature/humidity sensor and put 40-50 of these devices around the building for $1k. I would easily pay $50 for a pre-made device that:

1) Is built using CHIP and has a simply case + power adapter

2) Is wired to https://www.sparkfun.com/products/10167

3) Has an easy Wifi setup process and does DHCP

4) Lets me do a GET http://ip/status and gives me JSON of the current temperature and humidity.

Then all I have to worry about is setting up a cron job that wgets all 50 devices and logs the result to DB.

FYI equivalent systems, even non-NIST-calibrated ones cost $500/device or more.




Not $50, you can do all of that with a $5 ESP8266. The CHIP is IMO enormously overpowered for what you're describing. The ESPs can do HTTP/MQTT/etc directly themselves, but I think an ideal use for the CHIP is as a hub with the ESP's reporting sensor data and the CHIP logging data.

Also, as a warning from experience the DHT22's aren't that great and they have been a headache. They are relatively expensive, not very precise and also I've seen a huge variation in their manufacturing quality. The relative humidity readings in particular are wildly inaccurate. There are better temperature sensors that cost less than a dollar (DS18) and to get reliable humidity readings you really need something nicer like the SHT-31.


I'm always curious about these sorts of answers, because from an outsiders perspective, you may as well be talking in another language.

From what I can tell the ESP8266 is some sort of wifi enabled...chip? That you need to solder onto something or plug onto a breadboard, then you need an arduino for some unstated reason. What is an arduino? how do you make these two things interact? How do you provide power to these things? why are there so many arduinos?

I think the advantage of these single board computers are they are a much lower barrier to entry if you don't have that much knowledge of electronics, but have more experience of navigating Linux systems and writing software.


The ESP8266 is actually a system on a board, too. Essentially, it's a tiny microcontroller, with Wifi and a few GPIO connections, in a very small form factor, for a very small price.

You don't need to solder it to anything (it already comes soldered on its own board). You don't an external microcontroller to use it. It is standalone. It is compatible with the 'Arduino'. The Arduino is a family of microcontrollers built from the ground up to be easy to use. Easy to use software, easy to program (Variant of C) - and more importantly, heaps of support and tutorials online.

Honestly, the most difficult thing about using the ESP is powering and programming it. It takes 3.3V - and only 3.3V, so finding an appropriate power supply can be trickly. It programs over serial, so you need to use a USB > serial module - $1.30 [1]

The modules themselves are super cheap: - $1.50 [0] There's a very strong community behind the module: http://www.esp8266.com/

Essentially: Don't be scared: there's an initial learning curve that is very gentle, and you'll suddenly find unlimited uses for these tiny little modules.

I've got modules that show build statuses, affiliate account activity.. etc.

They also work, as mentioned, exceptionally well in a flock reporting to a main system - which may be a CHIP system, Raspberry PI, OpenWRT router, etc.

[0] http://www.aliexpress.com/item/Free-Shipping-2pcs-lot-ESP826... [1] http://www.aliexpress.com/wholesale?catId=0&initiative_id=SB...


Technically the ESP8266 is a modular wifi controller, isn't it? That is, it's one of those gadgets that's supposed to sit on a daughterboard and provide wifi services with embedded TCP/IP stack to another microprocessor. (I hear.) It just so happens that it's own processor is powerful enough and flexible enough to be useful as a microprocessor in its own right.

I wonder what other common bits of electronics might have useful amounts of processing power...


$50 (or less) WiFi enabled SD cards (intended for use in cameras to automatically upload pictures) have an ARM processor running linux.

http://haxit.blogspot.ch/2013/08/hacking-transcend-wifi-sd-c...

http://www.amazon.com/Transcend-Wi-Fi-Class-Memory-TS32GWSDH...


Technically, ESP8266 refers to a chipset, but typically now refers to the PCB with integrated antenna, etc.

There are multiple versions - seemingly incremented at random by chinese manufacturers - we're up to the ESP-14 now - http://www.aliexpress.com/wholesale?catId=0&initiative_id=SB...


I'm reminded of Sifteo Cubes, which managed to get SNES-level graphics out of a microcontroller normally used in wireless keyboards.

https://blog.adafruit.com/2012/12/05/how-we-built-a-super-ni...


> The Arduino is a family of microcontrollers built from the ground up to be easy to use. Easy to use software, easy to program (Variant of C) - and more importantly, heaps of support and tutorials online.

The Arduino is _not_ a familiy of microcontrollers, it's a family of dev boards (well, more like an ecosystem) and most Arduinos are based on AVR microcontrollers (but not all of them as far as I remember).


I'd argue that Arduino isn't even fundamentally a hardware thing. I can code an Arduino application (sketch) and upload it directly to an Atmel chip on a breadboard, with no other components present at run-time. Atmel didn't make the chip as an Arduino (they made it to control toaster ovens or whatever), so in that scenario there's no Arduino except for their boot loader and runtime library.


Great reply, thanks. Are there any projects/tutorials/kits out there that go a bit beyond the standard "turn the led on/off"?


There's the Adafruit and Hackaday tutorials as already mentioned, plus Reddit has /r/esp8266 which has some good resources.

I also have a project where I built a smart thermostat that aggregates sensor data fed from multiple ESP8266 sensors that is pretty involved. I've been meaning to write it up in detail to share on HN and I'll probably have time to sometime in the next couple months.


I would also be very interested in reading the details on your project. Look forward to seeing it on HN.


I am wanting to do something similar and would definitely read your write up.


You can see my projects here:

https://www.stavros.io/series/esp8266/

Also, this tag has more generic hardware stuff:

https://www.stavros.io/series/hardware/


Check out Neil Kolban's book on the ESP8266 [1]. I’m reading through this out-of-order just to get an idea about how the esp8266 works.

[1]:https://leanpub.com/ESP8266_ESP32


Search for "esp8266" in the Learn sections of Adafruit's and Sparkfun's sites. There's also esp8266.com. I think the most amazing thing I've seen is a VNC client running on an ESP8266 with a LCD touchscreen.

The "raw" parts are super-cheap but when getting started I think it's much easier to get started on a still pretty cheap breakout board. I have a Sparkfun ESP8266 Thing I haven't started playing with yet but if getting one today I'd get the Adafruit Feather HUZZAH ("Feather" is their new line of micro controller boards that share a form factor, "HUZZAH" is what they call all their ESP8266 products).


There's also the WeMos boards, which can be had for $3-4. Those are my workhorses.

http://www.cnx-software.com/2016/02/19/4-wemos-d1-mini-esp82...


I can also recommend the WeMos D1 mini, it's the best I've seen so far.


Let me second the Adafruit Feather for getting stated with the ESP8266.

Here's a link:

https://www.adafruit.com/products/2821


The ESP8266 is a microcontroller with integrated WiFi. The main difference between a microcontroller and something like the CHIP or RasPi is that they are much less powerful and are designed to run a single program instead of running a general operating system like CHIP does. They're what you use for single-purpose devices like a weather station or a light switch, while I think of small computers like CHIP as being better suited to serving as the brains for controlling sensor networks and such.

"Arduino" is used to refer both to a family of microcontrollers based on an Atmel processor as well as a set of libraries designed to make programming microcontrollers accessible to people without embedded hardware experience. Originally, the ESP8266 was marketed as a simple serial Wifi adapter for the (hardware called) Arduino, but the community quickly realized that they could be programmed on their own and used to replace the Arduino. Subsequently, the Arduino libraries were ported to the ESP8266, making it instantly much more accessible as well as giving it access to a huge range of libraries for interfacing with different hardware and software.

ESP8266 refers specifically to the processor, but it is usually sold in an integrated package with onboard memory and antenna etc. There are several of these packages for different uses, called e.g. ESP-01 or ESP-12e. While you can use these modules yourself with a bit of knowhow and some deft soldering, much easier is to buy a prepackaged dev board like the NodeMCU or WeMos D1. These are basically the equivalent to a CHIP (albeit again much fewer IO pins)- they pair an ESP integrated module (usually the ESP-12e) with all the supporting hardware needed to power and program the module. You just plug in a USB cable, load your code on and connect whatever external devices to the GPIO pins.

I didn't have any significant electronics knowledge when I dove in head first. Arduino is designed to be accessible and there are plenty of kits with detailed instructions and all the parts you need. The ESP8266 has been wildly popular in the last year or so because it's got Wifi + compatible with Arduino (i.e. easy) + dirt cheap, which was previously unheard of.


You can program the esp with node as well as several other languages. Its actually easier to use than a full SBC because you don't have to worry about an OS.


The chip is highly integrated. You may need a breakout board (like NodeMCU), or simply deadbug it, in order to flash it. You can do it with arduino if you already have one, but a simple standalone FTDI USB-to-serial stick would be sufficient.

Then the module itself can run with very little external stuff - just power it with 3.3v, there are multiple options of doing so (but forget about a transformerless AC source, this thing eats up to 500mA).

You may also want a simple debounced reset button, and that's it.


You seem knowledgeable about sensors. Do you have any recommendations for a somewhat accurate soil humidity sensor?


It's my understanding (and correct me if I'm wrong here) that it's difficult to keep it accurate by the very mechanism of how they work. You're measuring the conductivity between two probes and as time goes on the probes will corrode resulting in miscalculated soil moisture levels.


Yeah, I haven't done much with soil moisture but AFAIK they're all basically the same design to measure resistance between two probes. They can be reasonably accurate though, at least enough to do something like tracking when to water plants and stuff.

If OP searches for "Arduino soil moisture sensor" he/she will find find plenty. There's not a whole lot of difference between them.


I bought an ESP8266 dev board (<$10 CAD shipped!) for side projects, and I think it's great for hobbyists.

But I'm curious if Espressif actually have any design wins? I mean I don't mind using the community Arduino port (which is awesome), and buying from...unknown suppliers :) but is thing commercially viable or just a hobbyist gadget?


It's originally intended as a commercial product to make smart home type stuff and the hobby interest is a bit of a lucky accident. It's still pretty new by industry standards so it's just starting to appear in products, mostly very cheap wifi-enabled plugs and stuff. Itead makes a pretty sweet wifi-enabled switch for about $6.00 shipped that is hackable to put your own tailor made firmware on. Pete Scargill has a great writeup on them and I have one myself that I put in the wall to control my overhead lights. They're remarkably well made for how cheap they are.

> http://tech.scargill.net/itead-slampher-and-sonoff/


I got 10 for 38$ CAD shipped from Aliexpress. You could probably get them for even cheaper right now (though the USD > CAD is worst than it was at the time).


That's awesome, and that is dev boards or just the chip itself ?

I got the "NodeMcu Lua WIFI Internet Things development board based ESP8266 CP2102 Arduino" a while ago on eBay for $6.85 USD, price has now dropped to $4.76 USD, plus CAD is better-ish.

I am a ESP8266 fan but not sure that I'd be confident enough to do a product with the ESP8266.


Depends on what you want to do. I generally recommend the WeMos D1 mini, because there's only one of it, while there are like ten NodeMCU boards and only some are good. If you need something more bare, I recommend buying ESP8266 12E or 12F boards and using my small breakout:

https://github.com/skorokithakis/tiny-ESP8266-breakout


Well, on the ESP8266 you have to code directly in C with the library or in MicroPython, which isn't fantastic - on the CHIP you use whatever you (Go, Node, real Python, Java) that compiles to ARM for $4 more with easier I/O.


You can also use node.js, or lua on the ESP.

It's not the perfect solution for everything; but it's tiny, and it costs $1.50 on aliexpress / banggood, and there's a ton of code for it.

If you need a module that is mono-task, tiny, cheap and reliable, it's hard to go past the ESP.

If you're looking for a full computer, then it's an obvious choice towards CHIP / Raspberry PI, etc


My point is though that these are complementary. Read sensor -> send data is a trivial task that takes a few lines of code, most of which is importing libraries and the CHIP is vastly overpowered. I'm saying, put your complex data logging/smart home/whatever logic in <language of choice> on the CHIP and have your sensors be simple (read: reliable) nodes that connect to the CHIP as a hub. It's not so much a matter of price as it is minimizing complexity.

Also I don't know many people who use the native C SDK for the ESP8266. Most people use Arduino (simplified C++), but there's also Lua, Javascript and Python.


The problem with the CHIP/Pi Zero/etc is that I now have tens of devices sitting in my network, ready to be owned if I don't regularly update them all.


Yeah, I have a separate encrypted Wifi that isn't routed to the Internet. Only a heavily firewalled RasPi is, so anything that needs data from the Internet has to ask that. I don't particularly trust any IoT devices security wise, either made by me or commercial, but it can be mitigated and I'm not really concerned.


What's wrong with coding in C? You're unlikely to ever need anything too complex on such a device, so C is a totally adequate choice.


Totally adequate if the goal is to produce content for the @InternetOfShit guy, unless "coffee at work" for you means sharing a drink and cracking jokes with Ken Thompson and John Carmack.

I'd consider the ESP8266 if I could run Go or Rust on it.


Mind explaining what did you mean by this? For the typical scale of a esp8266 project there is no difference between C and Go and Rust. Actually, C can be much safer of you follow MISRA and use all the appropriate tools.


Have you thought about using devices like the ESP8266? [1]

You could probably work out a way to wire in the humidity sensor onto that, and scale it up via a printed PCB.

And instead of worrying about GETs, you can program the device to report in via MQTT to a central server.

You likely know all this, just curious :)

[1] https://www.sparkfun.com/products/13678


Obnoxious advertisement: my company resells an Arduino-compatible wireless sensor node made by Seeedstudio, http://www.robotmesh.com/seeeduino-stalker-v3 Costs $39.00

Onboard RTC, LiPo charger, temperature sensor, micro SD card socket. Designed to be plugged into a 5 volt solar panel. (Many complaints that the panel Seeed supplies is undersized and degrades quickly in the field, so we don't carry it, so you'd have to source that yourself, or just use a DC wall adapter) Uses XBee-footprint radio modules, sold separately. (We don't carry those either, since Digi got really obnoxious about trademark enforcement)


Unsolicited advice: Use the CHIP as a gateway for a network of devices like the Moteino[1] or JeeNode[2]. I tend to agree with then sentiments re. wifi from this post [3]

[1] http://lowpowerlab.com/moteino/

[2] http://jeelabs.net/projects/hardware/wiki/JeeNode

[3] http://lowpowerlab.com/blog/2015/12/17/esp8266-vs-sub-1-ghz/


I've done 3 and 4 for Arduino; here is my DHCP and DNS server (https://github.com/pkulchenko/DHCPLite) that also handles GET requests for reading analog or digital pin values (full example: https://github.com/pkulchenko/DHCPLite/blob/master/examples/...).


You can get zigbee ones from Omega [1] for around $200. Still kinda pricey but they are battery powered and optionally come with nema enclosures so you can stick them nearly anywhere. But having said that they were are not the most reliable product I've ever used. Getting it under $50 would be nice even if also not reliable.

[1] http://www.omega.com/guides/humidity.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: