# Arduino or...?

J

#### j

Jan 1, 1970
0
I'd like to automate my solar heating system. So,I'll need a little
control logic that reads some temps and switches on a fan and possible
some servos.

It's been a while since I've looked at the options, but I see Arduino is
readily available with a variety of hardware.

Recommendations for control logic, sensors, or other hardware? Arduino
or something else?

Jeff

M

#### mike

Jan 1, 1970
0
I'd like to automate my solar heating system. So,I'll need a little
control logic that reads some temps and switches on a fan and possible
some servos.

It's been a while since I've looked at the options, but I see Arduino is
readily available with a variety of hardware.

Recommendations for control logic, sensors, or other hardware? Arduino
or something else?

Jeff
Here's a strategy that works for me.

Use a microcontroller to do the low-level hardware interfaces and real-time
stuff.
Interface it with a RS-232 port. That makes that part pretty easy.
You have lots of choices for hardware. I use PicBasic pro and the
16F877A processor, cuz that's where I started and see no reason to change.
Starting fresh today, the Arduino looks attractive. But pick
something that has a compiler language you can live with.
I don't have the patience for C, and that limits my choices.

I do the heavy lifting on a PalmIII connected to the PIC
serial port. There's a free basic-like language called
"dialect" that makes it easy to get a GUI interface with
touch. Do all your floating point math and string processing
and data logging in the Palm.
PalmIII's can be had at garage sales and scrap dealers
for under a buck.

Here's where it gets interesting. If you want to switch
from the palm to a PC, all you gotta do is use a usb/rs232 dongle.
You don't have to change ANY code.
Ditto for wireless. I can plug on RS-232 to Bluetooth dongles
and the whole thing goes wireless with ZERO changes in the code.
You don't have to know anything about USB or Bluetooth or nothin'.
As a result, you can use a microcontroller with much less horsepower.
Don't discount RS-232 just because it's old. It makes a great
common denominator.

This is a sample of what you can do very easily on a Palm. This
monitors the gas furnace:
http://myplace.frontier.com/~nm7u/pictures.html

One rule I live by is, "don't ask a question if you're not
gonna do anything with the answer."
With home automation, there's the temptation to measure
and control everything.

A few years ago, in a fit of frugality, I sought to reduce
my energy consumption. Another Palm program times the IR
pulses coming out of the smart utility meter and graphs
energy use.
It was fun to watch the fridge or the water heater or the
furnace blower go on and off...for about a week.
Then, I realized that taking shorter showers uses less
electricity. I don't need to measure the water heater
to know that. If I'm already taking the shortest showers
I can tolerate, knowing the power consumption is irrelevant.
Most of what I needed to know was just plain common sense
and didn't need any monitoring.

Same goes for the furnace monitor in the pix referenced above.
The program has the ability to measure inside and outside
temperatures. So, yes, when the outside temperature is
lower, the furnace runs longer. About the only interesting
thing I learned was that there's about a three hour time
lag between outside temperature and the furnace duty factor.
I scrapped the thermometer interface.

There's a thread currently raging in comp.arch.embedded on the subject
of AVR and C.

J

#### Jim Wilkins

Jan 1, 1970
0
There's a free basic-like language called
"dialect" that makes it easy to get a GUI interface with
touch.

Can you post a link to it? Googling "dialect" + computer language
terms brings a flood of irrelevance.
Then, I realized that taking shorter showers uses less
electricity. I don't need to measure the water heater
to know that. If I'm already taking the shortest showers
I can tolerate, knowing the power consumption is irrelevant.
Most of what I needed to know was just plain common sense
and didn't need any monitoring.

I solved that by replacing the shower head with an extended-length
sink spray, which shuts off when released. The head end is a
replacement hose for one of the big multi-function shower sprays that
does everything EXCEPT shut off automatically when released. The
threaded ends fit a brass coupler, though they don't look like pipe
threads. I checked in the store. Anyway if it leaks a little, so what?

A sink spray hose also converts a (new) pump bug sprayer into a shower
that operates with water heated on the stove. I replaced the skinny
outlet pipe with 3/8" copper tubing. Have a separate bucket to temper
the hot water because it may be difficult in the tank. The 2 gallon
sprayer I bought seems a good compromise between run time and handling
awkwardness in the slippery stall, though I have to refill it at least
once.

jsw

M

#### mike

Jan 1, 1970
0
Can you post a link to it? Googling "dialect" + computer language
terms brings a flood of irrelevance.

OOPS! I screwed up.

Dialect is the similar interpreter for the Windows PocketPC/Wince.
Also runs on windows desktop PC.
http://dialect.sourceforge.net/
http://sourceforge.net/projects/dialect/files/

The Palm program is called HotPaw Basic interpreter v 1.4.7(b0)
http://www.hotpaw.com/rhn/hotpaw/ybas147b0.zip
Works up thru PalmOS4. I don't remember whether it has issues
with PalmOS5 or just won't run at all.
http://www.hotpaw.com/rhn/palm/#6

You're also gonna need mathlib.prc
http://www.4shared.com/mobile/G2Ek9fDy/MathLib.html

This stuff is very old and there are lots of obsolete/broken links.
Getting harder to find, so save a copy somewhere you can remember.

Pick up a PalmIII whenever you find one under a buck. They make excellent
user interfaces for hobby projects. Cheaper and easier to use
than a dedicated character LCD display. Far more versatile.
You can get crude wireless via the infrared serial port. Just pull
the IR transceiver module out of a dead palm and cobble it onto

The PalmIIIC has color and backlight, but I never figgered out how
to turn off the backlight. Makes it unsuitable for battery-powered
projects that need to run for very long. The plain PalmIII is mono
but runs a lot longer on battery.

Problem with any of these is that, when the battery goes, so does your
program/data. You can use the PC to reload thru a cradle, but I find it
much
easier to have a PDA on hand with a flash card.
Just reload the palm thru the infrared.

Handspring Visor is another alternative. There's a flash memory module
for it so you can reload it when the battery goes dead and the ram
gives up its bits...but they're rare.

J

#### Jim Wilkins

Jan 1, 1970
0
mike said:
...> This stuff is very old and there are lots of obsolete/broken
Getting harder to find, so save a copy somewhere you can remember.

Pick up a PalmIII whenever you find one under a buck. They make
excellent
user interfaces for hobby projects. ...

At several places I worked the engineers preferred obsolete
front-office laptops to PICs etc to run experiments. Their power
consumption isn't that high if set up right. My late 90's Compaq
Armada draws 7W at idle, 12-13W running a program. My dual-core Dell
Latitude with Windows 7 takes ~14W idle, low 20's running with the
display off, for example after waking from Sleep to record TV. Both
can use an Auto-Air adapter and an old car battery to log data for a
long time, then switch to AC for data-crunching with the full power of
a spreadsheet on a large display.

The engineers had the funds for special add-ons such as CAN converters
to communicate with electric vehicle controllers, but I cobbled up a
similar I2C interface using the printer port. Cardbus plug-ins with
extra serial or USB ports are cheap. I'm using this to add USB3 to a
5-year-old machine, limited only by hard drive speed:
http://www.amazon.com/J-Tech-Digital-ExpressCard-SuperSpeed-Express/dp/B005STWIQ2

National Instruments made data acquisition cards for laptops:
http://www.artisan-scientific.com/68648.htm
or you can buy external ones like this:
http://www.dataq.com/products/startkit/di145.html?source=pla&gclid=CNeNouOf9LMCFc1lOgod2gcAkg

The Radio Shack 22-805 PC Link Multimeter was a great data acquisition
device for a laptop, I don't know if an equivalent is still available
new. It can record the current in 240V house wiring with a clamp-on
probe and with its optical isolation is safe to wire into a circuit,
such as the current monitor in a battery tester.

If the hard drive is formatted FAT32 the laptop can dual-boot DOS and
Windows 2000 or XP and both can read and write the data files. The
advantage of DOS is very low overhead, only the clock ticks, and full
unhindered access to the I/O ports, though USB is a problem unless
your language can configure it as virtual serial ports. The printer
port appears as one 8-bit read/write Data register and smaller
write-only Control and read-only Status registers. These ex-office
freely available to reinstall.

jsw

J

#### j

Jan 1, 1970
0
Damn Thunderbird...

Here's a strategy that works for me.

Use a microcontroller to do the low-level hardware interfaces and real-time
stuff.
Interface it with a RS-232 port. That makes that part pretty easy.
You have lots of choices for hardware. I use PicBasic pro and the
16F877A processor, cuz that's where I started and see no reason to change.
Starting fresh today, the Arduino looks attractive. But pick
something that has a compiler language you can live with.
I don't have the patience for C, and that limits my choices.

I've been mulling all this over. Thanks for the detailed reply.

I don't mind the pseudo C,and the Arduino is gaining traction.

I do the heavy lifting on a PalmIII connected to the PIC
serial port. There's a free basic-like language called
"dialect" that makes it easy to get a GUI interface with
touch. Do all your floating point math and string processing
and data logging in the Palm.
PalmIII's can be had at garage sales and scrap dealers
for under a buck.

This is an interesting way to go.
Here's where it gets interesting. If you want to switch
from the palm to a PC, all you gotta do is use a usb/rs232 dongle.
You don't have to change ANY code.

That is way cool.
Ditto for wireless. I can plug on RS-232 to Bluetooth dongles
and the whole thing goes wireless with ZERO changes in the code.
You don't have to know anything about USB or Bluetooth or nothin'.
As a result, you can use a microcontroller with much less horsepower.
Don't discount RS-232 just because it's old. It makes a great
common denominator.

Serial is good. I like the bluetooth.

Arduinos come with USB. I think USB to Wifi is better as the range is
better and so is the possible security.

I know about web servers and web programming, so what I am thinking
about is a little raspberry pi lamp (linux,apache,MySQL,PHP) server. The
lamp gives you higher level languages to work in. That could talk to any
Microcontroller on the WiFi and display the data as a web page. The web
page could talk back through the server and send or receive from any of
the Microcontrollers. I see that Arduino can talk X10, so that leverages
a huge amount of cheap dimmers and switches and such.

Jeff

J

#### Jim Wilkins

Jan 1, 1970
0
j said:
I don't mind the pseudo C,and the Arduino is gaining traction.
I like the quick and easy Arduino c compiler too, but it encourages
writing and testing in short pieces which can eat into the program
memory's limited write cycle life.

I don't like the low A/D converter resolution for serious
experimenting.

jsw

M

#### mike

Jan 1, 1970
0
I like the quick and easy Arduino c compiler too, but it encourages
writing and testing in short pieces which can eat into the program
memory's limited write cycle life.

I'm sure professional C programmers don't have the problem...but
for the occasional hobby program, I like BASIC-like languages.
If I have the algorithm right, I can usually make it work easily
with BASIC. With C, I spent more time being hassled by the compiler
than I did debugging the algorithm. I exceeded my frustration
limit and attention span.
I went back to BASIC.
Yes, it's clearly my fault, but the result is the same.
I don't like the low A/D converter resolution for serious
experimenting.
..
With the breadboards and single-layer PCBs that fall within my
attention span, I find that 10-bits is more than sufficient resolution
to measure the system noise. ;-)

J

#### Jim Wilkins

Jan 1, 1970
0
mike said:
I'm sure professional C programmers don't have the problem...but
for the occasional hobby program, I like BASIC-like languages.
If I have the algorithm right, I can usually make it work easily
with BASIC. With C, I spent more time being hassled by the compiler
than I did debugging the algorithm. I exceeded my frustration
limit and attention span.

Agreed. I started with Pascal on a mainframe, then wrote a lot of
QBasic under DOS on the lab test systems I mentioned. QBasic has
nearly the same structure as c but it's wordier and requires explicit
definitions of functions and variable types, which makes it easier to
understand and modify two months later if you aren't a full-time
programmer.

I'm still looking for a good open-source replacement for QBasic with
its simple power and interpret/compile flexibility and a real Windows
interface. Visual Basic dropped the INP and OUT statements that talk
to the hardware registers, so I can't write low-level device drivers
in it.
jsw

M

#### mike

Jan 1, 1970
0
Agreed. I started with Pascal on a mainframe, then wrote a lot of
QBasic under DOS on the lab test systems I mentioned. QBasic has
nearly the same structure as c but it's wordier and requires explicit
definitions of functions and variable types, which makes it easier to
understand and modify two months later if you aren't a full-time
programmer.

I'm still looking for a good open-source replacement for QBasic with
its simple power and interpret/compile flexibility and a real Windows
interface.

Not clear what you seek. I switched my non-gui stuff to freebasic.
It has a real windows interface, but doesn't create an app with a
Windows GUI.
The base program is spartan, but fbide.exe is the GUI you want.

Gambas3 looks interesting. It can create a windows GUI (small w) but
runs on linux.

Visual Basic dropped the INP and OUT statements that talk
to the hardware registers, so I can't write low-level device drivers
in it.
Have you tried this?
http://hem.passagen.se/tomasf/UserPort/
I can't recall whether I've tried it with win7, but it worked well in XP
when called from VB6.

C

#### Curbie

Jan 1, 1970
0
I'd like to automate my solar heating system. So,I'll need a little
control logic that reads some temps and switches on a fan and possible
some servos.

It's been a while since I've looked at the options, but I see Arduino is
readily available with a variety of hardware.

Recommendations for control logic, sensors, or other hardware? Arduino
or something else?

Jeff
Jeff,

I use the Arduino also (more about that later), but Mike's post caught
my eye, if you're way more comfortable programming in BASIC are not
comfortable programming in C, I'm told there are other "Arduino like"
alternatives which use BASIC that have their supporters, I've only
ever used the Arduino.

The Arduino we did has an LCD, 4 control buttons, 3 DS18B20
temperature sensor and controls:
1. Heater control (AC electric heater; SSR control - on/off)
2. Water feed control (DC motor fixed speed pump - on/off)
3. Beer feed control (Parastaltic pump run by variable speed stepper
motor - step pulses or motor winding phases)
4. Reflux control (solenoid controlled valve - on/off)
5. Alarm (relay control - on/off)
6. Alert (piezo buzzer - pulsed to create beep, or on/off
continuous).

Here's a picture:
http://i825.photobucket.com/albums/zz177/Curbie_Pics/Controller.jpg

It's open source and would make a fine differential controller as is
if you rewrote the control software section.

I can find the on-line link if you're interested, there is also an
custom sheild board for all the I/O avaliable.

Curbie

C

#### Curbie

Jan 1, 1970
0
Agreed. I started with Pascal on a mainframe, then wrote a lot of
QBasic under DOS on the lab test systems I mentioned. QBasic has
nearly the same structure as c but it's wordier and requires explicit
definitions of functions and variable types, which makes it easier to
understand and modify two months later if you aren't a full-time
programmer.

I'm still looking for a good open-source replacement for QBasic with
its simple power and interpret/compile flexibility and a real Windows
interface. Visual Basic dropped the INP and OUT statements that talk
to the hardware registers, so I can't write low-level device drivers
in it.
jsw
Jim,

It's a BIG programming No-No, to address hardware directly in Windows,
you're support to API calls, I may still have a VB serial port API
Library laying around somewhere on my system if you're interested in
it.

Curbie

J

#### j

Jan 1, 1970
0
Jeff,

I use the Arduino also (more about that later), but Mike's post caught
my eye, if you're way more comfortable programming in BASIC are not
comfortable programming in C, I'm told there are other "Arduino like"
alternatives which use BASIC that have their supporters, I've only
ever used the Arduino.

I don't have a problem with C. It's just more tedious to have to compile.
The Arduino we did has an LCD, 4 control buttons, 3 DS18B20
temperature sensor and controls:
1. Heater control (AC electric heater; SSR control - on/off)
2. Water feed control (DC motor fixed speed pump - on/off)
3. Beer feed control (Parastaltic pump run by variable speed stepper
motor - step pulses or motor winding phases)
4. Reflux control (solenoid controlled valve - on/off)
5. Alarm (relay control - on/off)
6. Alert (piezo buzzer - pulsed to create beep, or on/off
continuous).

Here's a picture:
http://i825.photobucket.com/albums/zz177/Curbie_Pics/Controller.jpg

I'm impressed! And I like the off the shelf box you used!
It's open source and would make a fine differential controller as is
if you rewrote the control software section.

I see the 10 bit A/D has no problem reading temps to a .1F. I don't need
that much accuracy.
I can find the on-line link if you're interested, there is also an
custom sheild board for all the I/O avaliable.

Sure. I'm juggling money at the moment and it'll be a week before I buy.
It's like Summer!

Jeff

C

#### Curbie

Jan 1, 1970
0
Jeff,

I haven't gotten around to a diiferential controller yet, but it's on
the todo list.
I see the 10 bit A/D has no problem reading temps to a .1F. I don't need
that much accuracy.
The DS18B20 temperature sensors have a .5C or 1F accuracy with a 10
bit resolution and cost about $1.75, the point being, that they're not that much more expensive for those that don't need that much accuracy and resolution, but have the accuracy and resolution for those who do. It's pretty easy to convert the same controler for or between different funtions we use them for fermentors, incubators, feedstock processing, all with a software change. (the funtion control section of the software) The software that controls all devices is always the same. Sure. I'm juggling money at the moment and it'll be a week before I buy. It's like Summer! http://www.liquidsunenergy.com/controller/controller.html Curbie J #### j Jan 1, 1970 0 The DS18B20 temperature sensors have a .5C or 1F accuracy with a 10 bit resolution and cost about$1.75, the point being, that they're not
that much more expensive for those that don't need that much accuracy
and resolution, but have the accuracy and resolution for those who do.

Where do you get them for that price?

What I would like to do is run cat5 throughout the house and outside
also. Is there a limit on how far you can run a one wire?

Jeff

C

Jan 1, 1970
0
J

#### j

Jan 1, 1970
0

Oh man, I love this place, the prices are right, and they got a lot of

I've got a half dozen things I'm going to get from them now!

All the parts links are in the manual. Which is quite good.

10 meters for the temperaure sensor one wire bus (I think, it's been a
while) I up to 8 sensors per bus (I think).

Thanks, I'll look into it more.

Jeff

Replies
3
Views
228
Replies
8
Views
286
Replies
1
Views
331
Replies
4
Views
868
Replies
13
Views
1K