The SmartShelf Implementation Process
Using the handyboard with electromagnets has been very frustrating. Here is the story of our implementation process.
About the Magnets:
First we tried to make our own electromagnets by wrapping wire around an iron core and sending electricity through it, but it wasn't terribly effective. We then purchased electromagnets (picture on left), they are stronger than anything we could make but a similarly simple design. They draw as much power as you will give them. They accept a variety of voltages and currents. More current leads to more pull. High or low voltages cause the magnet to vibrate. Initial experiments revealed that though the U shape enhanced the pull of the magnets, we could get enough pull from just one magnet so we took them to the Mechanical engineering dept. and they were kind enough to cut them for us.The apparant problem with hooking several magnets into the handyboard motor ports directly is that the handyboard bugs out when too much power is being drawn from it. It exhibits this behavior by channeling all the power into just one of the motor ports. When it does this everything stops working and you cannot stop it. The only way to break it out of this weird behavior is to unplug the one motor now getting all the power.
Solving the power issue with the Handyboard:
Our solution was to use an external power supply. And use the microcontroller to control a relay(pictured left) which decides when the magnets get power. Normally a relay works by simply making or breaking a circuit, an on/off relationship. We wanted more of a range of powers so that we could create many different magnet strengths, and we didn't want to have to use more than one relay per magnet because there are limited ports on the handyboard. We were very surprised to discover that we could get the relay to provide varying strengths of current when we used a relay rated for very low voltage. I have developed a theory why this works. Inside the relay is an electromagnet (oh the irony) and thats what it uses to flip the switch. We learned when experimenting with our own electromagnets that they vibrate at low high voltages. I think we produced a similar effect on the relay's electromagnet causing it to vibrate very quickly, and move the switch very fast between on and off. This vibration was made evident by the buzzing sound that came from our relays. For a more complete explanation of how relays work, visit http://www.bcae1.com/relays.htm but this site doesn't explain the variable strenght property we discovered.Interfacing the handyboard with the info from the RFID reader:
The next problem we encountered was getting the handyboard to communicate with the RFID reader. We thought initially that we could use the Java Code that Orit had posted online, however that only reads information from the handyboard and we needed to use the RFID information to send signals to the handyboard. Because there was a time constraint we decided to use the ability of Java to generate its own mouse and keyboard directions. We used this feature to run interactive C (the language that interfaces with the handyboard) in interactive mode so we could update the power coming from the motor ports dynamically. So essentially our code clicks up on the screen and types the appropriate commands into interactive C. If you try to run our code beware that interactive C must be open, working, and perfectly positioned.


0 Comments:
Post a Comment
<< Home