Arduino

The Arduino. This guy packs an Amtel ATmega328 microcontroller, with 32KB of flash memory, 2KB of ram, and a 16Mhz clock, all while pulling something in the neighbor hood of a 10th of a watt. On the board is all necessary support hardware, including a usb <-> serial adaptor chip to insure solid communication with modern pc, clock. and voltage regulator. I just recently picked up one of these to be the brain of the OpenShed.

LCD ShieldI also picked up a LCD terminal shield. It provides a nice user interface for any direct interaction. It includes a 2×16 character display, LED backlight, and a 5 button input pad.

I intend to use this for a couple of processes in the open shed, as an always on monitor. Here is a list of the intended functionality:

  • Interactive Controller: While not really a function, I’m throwing this up just to note the used pins. the Arduino has a total of 14 digital pins, and 6 analog pins. The LCD shield mentioned above uses Digital pins 4 through 10 for output, and analog pin 0 for input. All built-in options will have at least a single screen to display status, as well a direct way to alter state via the keypad.
  • Lighting Controller: As a method of energy conservation, I’ve split up the lights in the Open Shed into two categories: ambient and task.Ambient lighting is a gentle glow, most likely provided by a continuous strip of LEDs along the edge of the ceiling and the wall. It’s only meant to provide as much light as a couple of candles, or enough light to allow a person to navigate the space without stubbing her/his toe. It should use no more than a watt and a half, and come on automatically when it gets dark enough to be necessary and turn off automatically when it gets bright enough. An internal light sensor will be used for ambient light level detection.The series of task lights are highly directed lights used for reading, working at the desk, or cooking on the stove. Again, to limit power usage as much as possible, each should illuminate only a very limited space, and no more than one on at a time. I think I’ll have 6 total (two on couch, one on desk, one on kitchen counter, one in storage/sleeping shed, one in bathroom). Each will have an associated push button which can toggle between “This Task Light”, “Previous Task Light”, “Ambient Only”, “All Off”. The LCD monitor will display the status of all lights on a single line, and allow each task light to be selected and triggered through all the states.

    Of the remaining 7 digital pins, one will be used as a input/output indicator. If the 6 digits in output mode (a latched output), they will go to a decoder (turns binary commands into discrete commands) providing up to 64 unique controls. The controls for all lights will go to a latch to turn on a light at one pulse, and turn it off at the next.

  • Climate Control: As I’ve said before, I want to build the open shed to make the most of passive solar heating and cooling. Most of this is implied by material selection and design to keep the building insulated, with enough glazing to keep it warm in the winter and enough of an awning to keep the sun out during the summer.There are however things you should do from time to time to keep the structure as comfortable as possible. This includes: opening windows to exchange air with the exterior, opening and closing insulated shutters to prevent heat from moving through the relatively weak insulation of the (closed) windows, and in extreme cases, run a swamp cooler, AC, or light a heater or wood stove. I hope to be able to make a predictive model of the energy in the ‘Shed based on weather forecasts, instantaneous interior and exterior temperature sensors and the same light sensor used for the lighting controller. With this, I can set a “Comfort Zone” which I want the temperature to sit in, it the controller will know when naturally the temperature will leave this zone, and hopefully make the necessary changes to keep it in zone well enough in advance that the extreme energy usage events never are needed.

    Take this as an example. It’s now 10pm in the evening in the summer. Inside it is 72 degrees and outside it is 71 and falling. My comfort zone is between 72 and 65. A dumb thermostat will do nothing. However, I know from the expected forecast that with my insulation my internal temp will drop to 69 by the morning, and then raise to a 75 degree high the next day. The exterior will go down to 65 during the night. Again, a dumb thermostat will do nothing until the next day and then kick on the AC. However, my smart controller, with this knowledge, will open up the windows during the evening, let the temp inside drop to match the exterior, preventing the running of the AC the next day.

    Pretty slick idea, huh? I how to works nearly as nice. The two temp sensors and the light sensor will all use one analog pin each, and the two windows will each have open and close actuators for both the window itself and the shutters, which will take 8 more of the decoded digital outputs.

  • Power Controller: Finally, I want the system to work as a bit of a battery monitor. I’ll still be using a commercial charge controller, but a relatively simple one. The Arduino will monitor the battery charge, showing a capacity gauge, instantaneous power in, instantaneous power out, and a lower power warning, which might be able to eventually start an emergency generator, or cut power to “non-essential” circuits. All of which are controlled as part of the 64 latched digital outputs.

I’ll need to design and get the circuits put up here soon, as well as the code of course.  Another pretty long planning post. That’ll be all for now.

Advertisements

About Grant Wagner

General class ham: KC9SJQ https://grantwagner.wordpress.com
This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Arduino

  1. Dizzy-Dick says:

    Howdy from Texas. Nice stuff, and here I am thinking about just going back to the old tube type radios. So much simpler. :0)

    I used to do a lot of PLC programming. Loved that. Did my own ladder logic, not some program short cut. The short cuts always made a much larger program file and I could make it smaller and get more things in it. Haven’t done any for quite awhile, so things have probably changed a lot.

  2. Grant Wagner says:

    Hi Dizzy,

    I’m a programmer by occupation, but I never did anything with the embedded machines. The Arduino really makes it simple. I chose to avoid working on any chips directly as they all need special programmers at least once to burn a boot loader (already done with the Arduino), and a bit of supporting circuity. The only other kit I knew of was the basic stamp, which is a PIC running a basic interpreter. I didn’t think I wanted that overhead on such a small processor, so the Arduino really is an ideal solution. I love C, and miss doing it professionally.

  3. Tom Bruzan says:

    Hey Nerduino, just wanted to say that I have a little page myself now http://radiotelegrapher.posterous.com/ Sure hope your doing well Grant.
    73, Tom, AB9NZ

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s