Help needed selecting a PICAXE and other components.

Paul_L

New Member
I’m a retired electronics engineer and I’ve never implemented a microcontroller design. I need to control a geothermal heat pump system in my own home. I cannot find a controller that will do the job. The first computer I programmed was an IBM 1401 using assembler in 1956 at Cornell. I know many computer languages but I don’t have the time to learn the various languages used to program different microcontrollers in order to select a controller type or types which will do the job at hand.

The controller needs to repetitively measure the temperature in eight to twelve places and operate relays which will control the off board machinery based on differential comparisons between two temperature readings or on comparisons between a temperature and a setpoint. The controller also needs to repetitively record the temperature readings and the state of the output relays so this data can be transferred to a PC which will statistically validate the controller’s performance.

There is the distinct possibility that this gadget will be saleable if the prototype actually controls the system efficiently.

I am considering using either a PICAXE, PIC, Arduino, or BeagleBone to do this job. I need advice about which controller would be best at controlling relays, making multiple temperature measurements probably using a band gap sensor possibly on a one wire data line, making logical decisions from the temperature data, storing the data in RAM, and transmitting it to a PC probably using a USB.

I know the PICAXE can communicate with a one wire temperature sensor, operate the relays, and make logical decisions. Will the PICAXE store the data in RAM and transmit it to a PC through a USB connection?

Is it also practical to transmit constants from a PC to a PICAXE which will be used to modify algebraic computations, or would it be necessary to transmit a whole new program to the PICAXE in order to change computations?

Paul_L in the Hudson Valley of New York.
 

westaust55

Moderator
Welcome to the PICAXE forum.

One of the X2 PICAXE parts can handle your requirements.
The x2 parts have basic 1-wire commands and allow you to connect many 1-wire devices such as DS18B20 temp sensors to a single IO pin.

PICAXE chips have 256 bytes of user EEPROM which can be used to store constants and data that must survive a power cycling event.

Programmed in BASIC with specific extensions for the on oars hardware.
The BASIC is interpreted and thus slower than compiled to native code but should still be well and truly fast enough for your application.

Using say an AXE027 USB to serial cable your PC can receive and send data from/to a PICAXE.
It will possibly need some for of handshake or tests or press a button to PICAXE input to signal transfer of new constants but all do-able.
 
Last edited:

AllyCat

Senior Member
Hi Paul,

Yes, welcome to the forum. IMHO the main "bullet points" for a PICaxe are:

Pros: Very easy and quick to construct and program for "simple" tasks. Potentially, very low and easy power supply requirements. +EDIT: Excellent support from the forum (not to be underestimated).

Cons: Limited mathematical capabilities; even negative and decimal (fractional) numbers need special procedures. For a "commercial" product (quantities), the additional cost of the (proprietary) embedded interpreter in every chip might be significant, compared with a compiled PIC (or other) solution.

Cheers, Alan.
 
Last edited:

BeanieBots

Moderator
Hi and welcome.
Further to what has already been mentioned, how you would talk between PC and PICAXE depends largely on how often and how much data.
For large changes it might be easier to change the entire program. You do that with a download cable but there are other ways.
The X2 devices support I2C bootload so you could update by plugging in a EEPPROM (good for field updates)
You could download wireless using ERF/URF modules.

Alternatively, you could create your own protocol for passing values, again by cable ERF/URF or my personal favourite via Bluetooth.
I have a system similar to what you are creating. It stores data locally in EEPROM and as soon as a bluetooth device running the correct software connects, it downloads the data that has not already been sent which frees up the EEPROM for more storage. Not too hard a system to implement.
 

lbenson

Senior Member
For what the picaxe is capable of for a moderately complex home automation project (16 inputs, 5 outputs) check here:

http://www.picaxeforum.co.uk/showthread.php?25050-Picaxe-Web-Server-Water-System-Monitor-and-Controller

Of course, you don't need to host a web page on the picaxe, as that project does. As others have pointed out, you can communicate between picaxe and a pc via serial--which on most modern PCs means usb/serial. If the picaxe is not hosting the controlling program (or the analysis and display program), my personal preference is to use--instead of an always-on PC--a small computing device running the openWrt version of Linux--such as the GL.iNet--to communicate with the picaxe:

http://www.ebay.ca/itm/Portable-Smart-Router-GL-iNet-3G-OpenWrt-Mobile-App-control-8M-flash-/321376379317?pt=COMP_EN_Routers&hash=item4ad38661b5&_uhb=1
https://forum.openwrt.org/ [note this is mostly a router forum, so you have to search for instances of use as a small computing platform.]

As others have noted, complex algorithms may be difficult to implement on the picaxe, although BeanieBots has posted PID examples.
 

mpgmike

New Member
In your original post you offered PICAXE, PIC, Arduino, and BeagleBone as possible candidates for your project. I have experience with both PICAXE and PIC. I looked into Arduino, but not BeagleBone.

Both PICAXE and PIC offer you the opportunity to create your own custom peripherals where the processor takes up the real estate of a single IC. With Arduino, you use the entire board. That is the reason I never experimented with Arduino (I like to create my own peripherals). Both PICAXE and PIC are able to use a dialect of Basic (ME Labs .com has the best Basic Editor software for the PIC; PBP3). You have 7 processors to choose from with PICAXE and well over 500 with the PIC (and counting on almost a weekly basis). You can explore the PIC Forum at:

http://www.picbasic.co.uk/forum/forum.php

Post the same question there and see what comes back at you, then make a decision that works best for you.

Mike
 

Paul_L

New Member
WOW! Five meaningful replies in one day. I read them all on Wednesday and I've been digesting them since then. Thank you guys.

Mike, I would prefer working with a PIC or PICAXE because they will easily poll a DS18B20 temperature sensor and will easily control a bunch of relays. I included the BeagleBone in the mix because I need to store a lot of temperature readings in order to validate the performance of the controller and the Beagles will run Linux and write disk files readable by Windoze for analysis.

lbenson, you really outdid yourself! I never have been able to balance a laptop when I'm sitting in my La-Z-Boy. How do you do it? About ten years ago nesting pairs of bald eagles began setting up housekeeping along the lower Hudson. At last count there were 63 pairs! I don't believe there are any otters near here since I am near the terminator zone. I live 6 miles from the IBM mainframe plant in Poughkeepsie and 4 miles from the IBM/Phillips 300 mm. microprocessor fab in East Fishkill. The Hudson is a tidal estuary for 120 miles (as far north as Troy, NY) which flows both north and south. I guess that means it is ac. The terminator is the zone where the fresh water ends and sale water takes over. It moves from Peekskill north to Beacon seasonally. Otters would only be found well north of here. There are lots of swans, geese, mergansers, goldeneyes, mallards, cormorants, terns and gulls. The really startling denizen is the Atlantic sturgeon. Usually a bottom feeder, I came on one last summer sunning itself on the surface. I pulled up next to him in my 16 foot Whaler and he was only about 3 feet shorter than the boat! He probably weighed about 700 pounds! They almost went extinct, probably because GE was dumping all those PCPs into the river up at Hudson Falls, but they seem to be recovering now that the dumping has been stopped. Take a look at http://www.dec.ny.gov/lands/5084.html . I took a first readthrough of your description of your Water System Monitor and Controller. What a magnificent piece of work! I am going to be asking you lots of questions.

BeanieBots, thanks for the idea of using Bluetooth for downloading data from EEPROM upon connection.

AllyCat, or rather Alan, I don't think the limited mathematical capabilities will hamper what I want to do. I presume it can handle integer math up to 4 digits so it should work. The additional cost of the (proprietary) embedded interpreter in every chip will not be a problem. Installing a good sized geothermal heating system is very capital intensive due to the extensive earth moving required. My system has cost me about $70,000 so far. In two years of operation it has reduced my consumption of heating oil from about 6500 gallons to less than 400 gallons for a net fuel saving of about $24,000 so far. In addition I have received a federal income tax credit of about $21,000 and New York state tax credits totaling $4,000. The few extra dollars for the interpreter are meaningless.

westaus55, how are things down under. I haven't been down your way since 1947 when I took the train (with my parents) from Sydney to Perth. It took a full week with a few overnight stops. I don't think the slowness of interpreted BASIC will interfere with this job. I am worried about the ability to store enough temperature measurement data to enable in depth analysis.

Anyway, thanks to all of you for chiming in with your suggestions. I'll post a better description of the problem in a couple of days.

Paul_L

in the Hudson Valley right between the IBM mainframe plant and microprocessor fab
 

oracacle

Senior Member
you could use the 24lxx series EEPROMs, they can store some where in the reigon of 65000 byte variables each, with 8 connected at once giving in over 1/2 million readings.

however it could be slow reading the data back. there is the option using an SD card but i have no experience with that route
 

lbenson

Senior Member
Thanks for the kind words, Paul.

I also live near the transition zone on the Mersey River in Nova Scotia--about a quarter-mile above the tidal area, but it's more definitively demarked here with a 6-foot pourover dam. It makes for an interesting mix of bird life. I'd love to get close to a sturgeon in my kayak--15-20 pound carp are the biggest fish I've seen kayaking (not here--in the Potomac).

I don't see that balancing a loptop while sitting in a La-Z-boy is more difficult than balancing a newspaper--it's when you have two laptops plus a breadboard plus a cat plus another cat wanting to come up that it gets really tricky.

If you want to look at another project using the picaxe as a web server, there's this, with the same basic underlying code as the other:

http://www.picaxeforum.co.uk/showthread.php?25199-Pin-protected-Web-enabled-28X2-Home-Security-System

As others have mentioned regarding your need to store many readings for analysis, additional eeprom (24LC256, etc.) or even an SD card should do the trick.

One advantage of using the picaxe is this forum. There is a lot of diverse expertise, and contributors are especially willing to spend time to help with real world problems.

I'd be very interested in looking at the specs for your project. I'm continuing to look for meaty projects for which I could further diversify and generalize my web server/controller code.

Lance
 

Paul_L

New Member
Hi everybody. I'm glad to be back after a 10 month absence. I got sidetracked by an infection, a hospital stay, a leak in a shower floor pan, an installation of a large walk in bathtub for my wife, an ice dam on the roof and some resultant leaks into a plaster wall behind a veneer brick front wall. It looks like it will warm up enough on this coming Wednesday to melt some of the 2 foot snow pack on my roof.

I am starting to flesh out the specs for this geothermal control project. I should be able to post initial specs later this week. I'm looking forward to comments from all of you guys, especially you Lance!

Paul
 
Top