24. November 2005 20:26
In Interfacing a PC to the outside world Part 1 I mentioned that I wanted to work on a set of articles to discuss interfacing your PC to the outside world. In part 2 I am going to continue the series and talk about what my first connection to the outside world is going to be.
There are a number of devices that are designed to communicate over I2C. I2C is a serial interface developed in the 1980's at Phillips Semiconductor. The architecture allows for multiple devices to co-exist on the same 2 wire bus. You can get more information on the I2C bus at the following: http://www.esacademy.com/faq/i2c/.
There are a considerable number of devices that support the I2C bus. A compass can be used to determine direction. A sonar module can be used to detect obstacles. A motor controller can be used to drive motors on a robot. A servo controller to drive hobby servo motors. All of these I2C capable devices (and several more) can be found at www.acroname.com. I have done some research on PC I2C devices but so far everything I have found is fairly expensive. I believe I can make a device that will bridge the PC to I2C gap and open up the world of I2C devices to PCs.
So a .Net I2C library is going to be the first project that I will do. The library will support communicating on the I2C bus to other devices. The consumers of this library should not care how the I2C communication is actually implemented. So the primary goal of this exercise is to architect a provider model for communicating to these devices. The benefits of this model allows for different I2C providers to be used without affecting the consumers.
The first provider I will be creating will be a micro controller RS232 I2C Provider. This will be a small device that sits between the PC and the I2C devices. The micro-controller's job is to intercept the serial commands from the PC and convert them into I2C commands. I will be using a BX24 from Netmedia as this micro controller. Later I will create a parallel port I2C provider that can be used in place of the micro controller RS232 provider.
The PC to BX24 I2C solution is a little more expensive than I intended to start with. However I have a few BX24s lying around from other projects so it won't take a dent out of my pocket. Also I have a Deventech compass to try the library out on. Besides I also intend to use the BX24 for other interfacing projects.
23. November 2005 10:15
I have been reading some of the Coding4Fun articles that are on MSDN. Several of the articles are focused on connecting your computer up to external devices and writing .Net code to interface with the devices. This has always been a main interest of mine since I am interested in robotics and home automation. The resent release of .Net 2.0 has made some nice features available for doing serial communications. Also Microsoft has made the Visual Studio Express editions freely available for 1 year. This makes up a great solution for the general hobbyist to play with software and hardware. So I thought it was time that I start my own set of articles on building software and integrating it to hardware devices.
So I gave it some thought on where to begin. What project will be a prime candidate? How would I build the foundation so I could leverage different hardware solutions to a given interface problem. So I decided on a few goals to keep in mind about the project:
- Provide a solution to an interfacing problem that could be used in many projects.
- Build the library using .Net 2.0.
- The library should extract the consumer from any hardware implementation.
- The library should be testable without hardware implementation.
- The library can use external pluggable components to fulfill the interface to the hardware itself. So 3rd party components can be built and plugged into the library.
Stay tuned for a series of articles on this project
19. November 2005 17:53
Hey looks like the new .Net 2.0 supports a serial class that makes serial communications a snap.
I need to get going on some project to try this out. Maybe a PC to BX24 project that will be useful in my house. I need to give it some thought.