Wednesday, July 25, 2012

Rensas RL78/G13 Promotion Board

Well, I got my Rensas promotion board today, so Im excited to see what features it can provide me, and if it can fit into my project. Great thing is, I made the sample request yesterday, and they sent it with 1-day shipping. You better get one while this lasts, even if you dont have a need for it, its free!

The features according to the RENSAS Website
  • World’s leading low power performance for equivalent MCUs in its class 
  • Scalability of line-up, including smart pin layout 
  • System cost saving features 
  • Wide voltage operation 
  • Wide temperature operation 
  • Built-in safety features
The RL78 MCUs‘ innovative “Snooze“ mode achieves ultra-low power by allowing ADC operation and serial communication, all while the CPU is turned off. This makes the RL78 MCUs best in class for low power applications.

Monday, July 23, 2012

Darlington Transistor Arrays

After a bumpy period in my personal life, I am back on this project. Its going to be a bit slow over the next few weeks due to Ramadan, but I feel like I am excited to get the project back on track.

The relay board did get assembled, but after finding a fault in the circuit design, Im having to fix it and make another revision. I have to say though, Im glad I came across this post on Adafruit about the ULN2003 Darlington Array, because that part (in its DIP or SMD packages) should allow me to shrink the dimensions of the relay board. 

Also, if you're interested, RENSAS is offering a free promotion board for their new RL78 chip, to those who are willing to provide some information on the project it will be used in. They describe, “The YRPBRL78G13 is a promotion board for the new Renesas RL78 microcontroller family. It supports on-board debugging, flash programming, and is pre-programmed to work with the GUI provided on the included DVD to demonstrate the low-power capabilities of the Renesas RL78 MCU.”<via DangerousPrototypes >

Thursday, June 7, 2012

G8P Relay Controller Part 2

Well I sent my boards off to the Fab shop, so hopefully they'll be in sometime next week.

In the meantime, Ive started coding for the board to control the relays remotely. I've also begun work on the Relay control library to make coding a lot easier. The goal is to get a VB GUI program to interface with the relay controller to flip relays on and off. If that works, then the I'll try to make a Web server PHP script to control the relays remotely. As much as it is nice to have control over lighting at each station, the end goal is to interlink all these relay boards so that the Smart Home system maintains each system rather than the user. I've already begun making plans to make the next revision of these boards XBee Wireless.

For the moment, I see a great need for single and dual relay controllers, but not so much for triple, quadruple or more relays per board. However, if the need arises, I can design larger sized relay controllers. Most people have one lamp here and another there; some just want control of their ceiling fans and lights. While the initial revision is dual relays, I see a future for making single relay boards. 

I've decided to say a little bit (benefits) about why I've selected the Omron G8P Automotive relays:

First, theyre capable of handling high currents at high voltages. An SPST relay can handle 30A at 220VAC, while an SPDT can handle 20A at 220VAC. That goes a long way for controlling devices in a home.

Second, there are quick connect pins on the top of the relays, which allow an electrician to use quick connect crimp connectors to wire each relay into a lighting circuit. This is beneficial, since they most electricians are already aware of this connector, and probably stock up on them. 

Third, the PCB board doesnt have to account for high currents running through it, so price of fabrication is lower, and thus price to sell a controller is lower. This is more a technical aspect, but its important for the user in that theres less of a chance of a fire in case of failure of the PCB. Fourth, these relays are already being used on production lines in manufacturing facilities and in automotive applications. They've proven their worth and their reliability. I can say from experience using these relays before in a couple of projects, that they never let me down. 

So benefits all the way around. Finally, there's only one company I'm aware of that sells relay controllers with G8P relays. As their pricing stands today, the boards are way over priced, and totally unaffordable by electronic hobbyists. The plan is to make my boards affordable, and still try to give the same range of features. 

Monday, June 4, 2012

G8P Relay Controller

Well I've been developing a dual relay controller board for use with my Smart Home system (its meant to be controlled via the Beagle Bone or Raspberry Pi). Its somewhat based on the NCD USB Relay board, but I've changed a few things and made it smaller. Trust me, my board looks nothing like theirs.

I wont go into too many details until I've gotten the board fabricated, assembled and tested. For now, I'd like to highlight some specs and code. The benefit of this board is that I've decided to embed a Teensy microcontroller into it, which means that this is a USB-to-Serial Relay board. So the Teensy is powered via USB. The relays however, will be powered via a 12VDC adapter. The relay power supply is separate from the Teensy power supply.

There are two Quick-Connect Contact G8P Relays on board. If I decide SPST, its rated at 30A at 250VAC, and if SPDT, its rated at 20A at 250VAC.

For reference, here is the ASCII byte command chart:

//The first is the command mode byte (not implemented); The second is the command byte. 

          (254),0-1 Turn ON Individual Relays
          (254),2-3 Turn OFF Individual Relays
          (254),4-5 Get the Status of an Individual Relay
          (254),6 turn all on.
          (254),7 turn all off.




Tuesday, May 22, 2012

Cosm, Prowl and The Internet of Things

I've been really distracted lately with various projects, and trying to explore my cooking creativity now that I'm getting bored of looking for work all the time. However, this blog isn't about my life, its about my tech research, which I've done a little bit of in the past month. Granted, I haven't gotten the Dragino to post sensor data to Pachube yet, but I'll get there. Which brings me to my first topic.

Pachube is now Cosm!

You heard it. Apparently, nobody could pronounce PATCH-BAY, so now its COS-M.
Now its interface has changed a bit from what it used to be. It's no longer just a cloud to aggregate and share your sensor data, but rather an Internet of Things system to help you control hardware based on that data. This is quite similar to PushingBox and Sen.se, except that Cosm has a much larger community, and doesn't really have to start from the ground-up. In any event, it should be interesting to experiment with the new system.

That brings me to another topic: the Internet of Things. I've found a really nifty (and very useful) iPhone app called Prowl, which allows an external site to push notifications to your phone for practically anything. Using Prowler for Firefox, Prowl for Chrome and Growl for Safari, you can push text and links to your iPhone. PushingBox can take in a sensor feed from an Arduino, and set an action to push a notification to you via Prowl. It can also send you an email, post to twitter and more. There are so many possibilities to this, but the big one that comes to mind is a notification when someone enters your home when you are not home. Doorbells are cool, but if you've got a small home, it doesn't really matter. If you're in the backyard, how likely will you have your phone in your pocket? Right. So, security is the big use that comes to mind when using this notification system. Very convenient, isn't it.

There will more plenty of time to discuss other topics I'm working on, but I wanted to give the run down on Cosm and Prowl, just to let you know of the technologies out there to give life to your next project. 

Take Care.

Saturday, April 28, 2012

Xubuntu 12.04 LTS

Well I ran into a bit of a snag when trying to install TFTP so that I can transfer the compiled hex program from my laptop over to the Dragino. Apparently Ubuntu 9.10 is no longer supported by the Application Manager, so you have to change the sources.list over to old-releases.ubuntu.com. That would have worked if I could get a working internet connection. 

So I decided to throw out the old version of Ubuntu, and switch over to Xubuntu 12.04 LTS. I managed to get internet on that over an Ethernet cable, so I was able to get all the software updates and installs done. I also managed to get the Broadcom 4360 driver installed so that I can get WiFi going on the laptop. If you are running into the same problem on Ubuntu, use this fix and reboot.
~$ sudo apt-get install b43-fwcutter firmware-b43-installer
Long story short, my system is back up and running in working order. 

Wednesday, April 25, 2012

Dragrove Daughter Board

I found out why the Dragino doesnt want to boot once the Dragrove daughter board is plugged in. According to the Dragino schematic (Page 2, top left corner), Pin 4 on the Router connector (Dragino CON5), is the COLD reset pin via the daughter board. Using the Dragrove daughter board schematic as a reference, you can see that Pin 4 of the Router Connector links to Pin 7 of the Sensor connector (Dragino CON4) and to Pin PD4 of the ATMEGA micro-controller on the daughter board. 


My guess is that one of two things could be happening. Either the default code programmed on it is broken, or it wasnt programmed at all. In any case, Pin PD4 is set to HIGH when the board is powered. That causes the Dragino to COLD reset nonstop, which doesnt allow it to boot. The solution is to link a wire between Pin 4 and Ground. Use the following image as a reference for your jumper: 


This solution forces Pin 4 to LOW, which then allows the board to boot.

Once the Dragino boots, then you can SSH into it (and continue the tutorial), as instructed in the Wiki

Ive been working with Ubuntu, so for SSH its simple. 

Type in the terminal:
~$ ssh root@192.168.255.1
Then login with the password you set (or the default if you didnt set it). That allows you to get the Daughter board upgrade script from the SVN server. 
Then using a tftp-server you can upload your Arduino hex files to the daughter board. Make sure when you compile your code to include a line in there to set Pin PD4 of the ATMEGA to LOW. Remember to set the board type in the Arduino IDE as <Arduino Diecimila or Duemilanove w/ATmega168>.
#define COLD_RST (4)

void setup(){

pinMode(COLD_RST, OUTPUT);
digitalWrite(COLD_RST,LOW);
}

void loop(){
//return 0;
}
Flash the Daughter board using this guide, or as an alternative, you can unplug the daughter board from the Dragino and upload the bootloader with an AVRISP MKII. Afterwards, you can remove the grounding jumper. Just remember to add this piece of code to each sketch.