Continuing the experiment from last time, next up I needed to build a more real prototype using the actual ATTiny85 chip. I wanted the firmware to be buildable outside of the Arduino environment, ideally inside of Atmel Studio as well as using a Makefile on the command line. This involved stripping the code down to bare AVR register manipulation. I initially wanted to just use the built-in 8 Mhz oscillator on the chip, but based on a clue from the TV-Be-Gone Kit project, discovered a bit later, I found the reason my new prototype was not working was because the internal oscillator is not quite stable enough. So I used an 8 Mhz ceramic resonator. The TV-Be-Gone project’s help also allowed me to strip the complicated timing code from my project. The result is now on GitHub.
There are a couple other additions here versus the original breadboard prototype. One is the addition of a slide switch from the positive bus to the VCC pin on the ATTiny85, and the other is an actual dedicated power supply attached to the power bus. Astute observers will note that this is not the same as the photo above; that is merely because the LiPoly battery is just what I happen to have on hand currently. I put the AA battery holder into the drawing because those are cheaper and more readily available.
This prototype was also successful. When tested on the Roomba, the vacuum turns around at the proper time, as expected. Now I intend to build a new prototype on an actual PCB.
Shortly after we bought our Roomba, it became clear that the virtual wall idea is truly useful. However, there are a few flaws with the one that comes with the vacuum: the device is rather large, it doesn’t sit in a very stable way on carpet, and it is generally too easy to move—mainly because of the prior two issues. Therefore I immediately began thinking about building an alternate version of the device. It would have two main features:
- It must be as small as possible
- It must be easy to wall-mount
These made me think of the ATTiny85. It is both small and cheap, and comes in a DIP package that would be easy to solder. These days, I like to test my initial ideas out on the Adafruit Trinket, and I build my first prototype with that. The code is on GitHub, and the assembly pictures are below.
This has no dedicated power supply because it relies on the +5V coming from the Trinket. Also notice that there is an IR receiver and a few more jumpers on the actual breadboard in the photo. That is from an additional test sketch that I was running on a separate MCU board to test the actual transmissions that were coming off of the IR LED. Testing this circuit on the Roomba proved successful. Initially, I had too large of a resistor on my IR LED, and the signal was too weak. But with the 51 ohm resistor, it has a range of a little over two feet, which is more than enough.
Next up was building a more real prototype using the actual ATTiny85 chip. I’ll talk about that in my next entry.
We have a bunch of spots around our house where the previous owner had planted something, and for one reason or another, the plants are now dead. Not wanting to make the same mistake, I decided to make something useful out of the little IoT kit that I received at Build. It has been in a sort of planning phase for a while now (mostly while we wait for Winter to defrost); so I already had a few more of the components on hand and on order.
After testing out a simple photo resistor that I already had, I opted for the log-scale analog light sensor sold on Adafruit. Rather than forcing me to set the circuit up for a specific light range, it allows the device to be sensitive from 2-3 lux all the way up to 55000—direct sunlight. I also went for a waterproof enclosure, since it will sit outside for long periods of time unattended, and I don’t want it to get ruined in the elements. (The enclosure works beautifully, by the way—it rained for the first three days I had it outside, and I had no issues.)
I went with Adafruit.Io for my data logging, and initial data seemed promising. I also decided to log the battery output voltage to try to monitor the life of the device, as well as to log a data point whenever the device had to reset itself. I setup the watchdog timer, because initial versions appeared to lock up. Plus, resetting manually is kind of a pain when you’re using a waterproof enclosure.
After a little iterating, it seems like it is giving me useful data. Here you can see the device in three different areas over the course of three days—the first area getting full sun for maybe two to three hours, and the third not really getting much sun at all. Eventually I may clean my code up and release it, in case anyone else finds this useful.
I received one of these fun kits this year at Build 2016. Here is the link, in case anyone is curious or wants to buy one. It contains Adafruit’s custom ARM M0 SAMD board (similar to the Arduino Zero, but much smaller), and a bunch of components to mess around with on it. Anyway, I figured that since the Azure guys (essentially) gave me the kit, I should use it to run through their tutorial.
After getting the graphics test running with the OLED Featherwing board, I ran through their Azure IoT Hub tutorial. (Also pictured here is the temperature, pressure, and humidity sensor.) NB: Make sure to follow the steps explicitly—the tutorial requires at least one forked version of a library that’s already available on the normal Arduino library manager. Plus check to see if you have at least Arduino 1.6.8, which was just released in March. I had an older one, because I was unaware of this fact.
Huzzah, data! The spike pictured here is me breathing on the humidity sensor. Later, I discovered that the standard Azure setup they had me use for this tutorial would have run me out of credits in about three more days; so I removed it! Alas. Maybe there will be less pricey tiers later on. It was fun to try out though.
On and off, I’ve been working on a project to build a learning toy for my son. It started out in various forms, but is now destined to become embedded within an old PS/2 keyboard I’ve had lying around unused for a good while (except as an occasional toddler plaything). At any rate, I needed a display of some sort to permanently embed in the project, and since it will likely take a beating over time, I wanted it to be fairly inexpensive. I ended up finding this device on Amazon, and finally received it last week.
Using Adafruit’s ST7735 library, it works perfectly. Thanks to the blog post here, I was able to set it up fairly easily. Here, you can see it hooked up to my Adafruit Pro Trinket. The only addition I had to make was to insert a LD33CV 3.3V voltage regulator between the Trinket’s power supply and the bread board’s power bus. The product claims that it has a built-in level shifter, but the data sheets have conflicting information about this. Better safe than sorry. Once the project is more complete, I plan on swapping the Trinket out for a dedicated ATMega328P, and will give it a lower voltage power supply also.
In small increments of free time, I’ve been building another new engine, this time based natively in DirectX 11, targeting native WinRT for Windows 8 and Windows Phone. In the process, I’ve found that I need yet another tool to help me make particle effects (ever one of the best bang-for-buck programmer art solutions); and to that end, I’ve decided to make a tool out of the state of my engine thus far, with a WinRT XAML interface on top, and release it to the app store. It’s a work in progress, and will obtain more features as needed and as I have time to work on them, but I wanted to at least get it to a state where I could release something. Now that that hurdle is overcome, updates may come more frequently for it.
Visit the info page
Get Scintillator from the Windows Store
BlarghPad is back as a Windows Store app. I can’t honestly say the words “new and improved”, because it would be like comparing apples to oranges; but it certainly has features that are new compared to its old incarnation. I made this release for the faithful supporters of the old version (Thanks Jon F.—there may have been others also). Over time, if I have the time and inclination, new features may spring into existence, and updates will show up in the store also.
Visit the info page
Get BlarghPad from the Windows Store
My division just announced our release candidate for Visual Studio. Of course, you should run it on the new Windows 8 Release Preview that was announced today also. 🙂
Update: Our Blend Insider articles are out now too: here and here.
There were a few reasons contributing to the decision to start over completely. The old one had languished, untouched, for so long, that it seemed silly, at this point, to simply write new articles or posts for it. Additionally, I had the idea that it might be nice to form a joint blog where both Bonnie and I could write and share the same space.
While these first two ideas existed, the catalyst for actually doing it was that I now have a shiny new Windows Azure space; and since I have that, I now have an opportunity to save a bit of money by moving all my web-hosted stuff over to it. So, given the various articles and resources that document the process, I decided to try it out.
For the record, there are a few different articles that outline how to accomplish this, but this one seemed the best written of the ones I found: “WordPress on Windows Azure: Single-Site Deployment.” It”s worth a read if it interests you at all. Note that the steps about the “FileSystemDurabilityPlugin” are no longer necessary; it was removed from the scaffolder. That tripped me up for a bit, until I found this section on an article on the AzurePHP website.
Update: For those that might be interested, it doesn”t quite work out of the box. One small tweak is required to get it to work properly.