All things Arduino


arduino-microcontrollersFor the last few years I’ve been experimenting with the Arduino Microcontroller as part of my attempt to find off the shelf hardware to automate my house. To date the Arduino has been the only highly versatile multi-vendor obtainable controller on the market and at rock bottom prices. It’s so versatile that it has spawned an entire industry making plug on boards (known as shields) and is being used for everything imaginable.

Interesting Article Find: http://www.electronhacks.com/2014/04/arduino-modbus-plc-rtu/

December 2014 update

I have been making great progress on my Home Control System, this month I have purchased some of the DIN rail hardware (terminals), mounted the industrial enclosure and run the first batch of cables to it. On the software side the initial concept code has been engineered and tested, a lot of thought has gone into the architecture of the controller software using C++ OO design principals. Read my first article on the C++ based HCS.

Part 2 is due in mid January 2015 and Part 3 in Mid February 2015. There should be more to follow after that. I’ll upload the code to GITHUB when the final code design is complete.

arduino_nanoI bought a Nano for next to nothing to see what you can do with it. See my latest post on the Nano.

There are also some shields to make it easy to connect the Nano so I will look into these later, the Nano has 1K of SRAM so its OK for a small project and at $3 for a controller its cheap to buy a few.

 

For my HCS project I needed networking, storage and I/O in the form of inputs from keypads and sensors and output to relay modules to control mains power. As I started experimenting with the Arduino Duemilanove controller I began to purchase additional hardware from eBay, this includes:

  • nRF24L01+ RF devices
  • An 3.2″ LCD touch pane
  • A DF Robotics LCD/keypad module
  • 3 Ethernet modules (Wiznet chip sets)
  • 3 Arduino Duemilanoves
  • 1 Arduino Mega (a 1280 model)
  • 2 xbee shields but not the xBee modules yet
  • Numerous Relay Boards

And now I’m looking at some WiFi modules!

Originally the Ethernet boards have offered the best solution for networking the devices together and they are very cost effective (and more secure) than WiFi or other Radio Based Shields. However, I have now started looking in depth at the Nordic Semiconductior RF product range, particularly the nRF24L01+ RF transceiver, which is a highly integrated, ultra low power 2Mbps RF transceiver for the 2.4GHz ISM (Industrial, Scientific and Medical) band. It has an SPI interface and can be wired into the Arduino with little effort.

nRF24L01+ Device

Having now obtained my RF devices its time to start playing with them over my break period. A new library has become available that’s compatible with the original Maniacbug RF24 library. The new library is very promising, the link to it is here -> http://tmrh20.github.io/RF24/

The original software library on GITHUB is called RF24 and the author of that library maintains a number of pages on the device, a partial list is here:

There is also an RF24 mesh network library on Github, by the same author, however the TMRH20 library also has a mesh networking library with enhancements.

One of the goals of this page is to document my home control system (HCS) over time. So I have written and collated some articles with a view to adding more. The primary goal is to built the HCS from off the shelf parts with minimal hacking of bits and pieces, it needs to look like its built in a factory and shipped, not made by a home brewer.

Older Articles

Some older articles appear below:

Arduino – MAC address in EEPROM
Arduino – EEPROM Access
Arduino – EEPROM/FLASH
Arduino – Tips and tricks

DIN Rail Hardware for mounting your Arduino

 

Multitasking

The future of Arduino from what I can see is multitasking. For it to move beyond simple educational use, it needs to be commercially used and deployed, for this it will need an RTOS of some kind. I’m going to explore the following in 2015 in greater depth.

I originally started looking at the DuinOS port and I’ve also tested FreeRTOS and Chibios which look great but did not have working ethernet ports for the Arduino. Of all the RTOS ports I have looked at, the Chibios ports looks like having the best potential and I will look at trying to port the Ethernet libraries to it once I get my head around how to do that. I did manage to port the older DuinOS code into a new IDE but had issues with getting the Ethernet libraries to work. Since reviewing the code and studying how other RTOS systems function I think I can implement the Wiznet code into Chibios so the Arduino can be used for true multitasking using a Mega 256K version which has sufficient RAM or a later model board.

 

FreeRTOS Links

Advertisements

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