How to control Servo Motors with .NET MicroFramework

31. December 2009 16:00 | Peter F. Jørgensen

This post illustrates how you can control Servo Motors from .NET MicroFramework using only simple output pins and C# code.

I have this idea of making a walking robot, so in order to test the basic servo control from .NET MicroFramework, I have used 2 servo motors and built a leg. Each Servo motor controls a joint in a leg .

You can start out with a look at the short video on YouTube that I made to show the leg moving.

 

In my first test I have used the GHI USBizi development board, but no special hardware has been used, only simple GPIO pins. I wanted to use the built-in PWM feature of the GHI board, but the program locked up when I initialized the PWM feature! I don't know if this is an error in the GHI firmware or what, but instead of investigating this further I made my own Servo control class in C#, which implements the PWM control.

For now I just want to show you the video of the result and then later I will add some more detailed description about how it is done.

Peter

 

Tags: , ,

Categories: Hardware ; Project ; Software

How to control a Stepper Motor with .NET MicroFramework

31. December 2009 15:45 | Peter F. Jørgensen

This post illustrates how you can control a unipolar stepper motor from .NET MicroFramework using very simple hardware.

The motor which I have scavenged from an old 5 1/4" floppy disk drive (do you remember those?) is controlled by a dedicated Stepper Motor control class written in C#.

You can start out with a look at the short video on YouTube that I made to show the motor running:

 

For now I just want to show you the video of the result and then later I will add some more detailed description about how it is done.

Peter

 

Tags: ,

Categories: Hardware ; Project ; Software

HACS - House Access Control System with fun doorbell

19. May 2009 21:15 | Peter F. Jørgensen

This is the video presentation I submitted for round 2 of the Microsoft "Dare To Dream Different" competition.

The main functions of the system are:

  • Guard dog barks when guests arrive at the door. Activated by movement detected by a PIR sensor.
  • Doorbell playing different individual tunes, stored as MP3 files on USB memory stick. Using VMUSIC2 MP3 player module.
  • Door access control with electronic door lock and door open/close sensor.
  • Door access can be controlled remote by sending SMS to the system from a mobile phone. Using a GSM modem.
  • Door alarms are sent as SMS to predefined mobile phone number.
  • Guest can write a SMS message which is sent to a predefined mobile phone number.

Unfortunately some parts of the video is a little dark, but I hope that you can see it anyway.

As the length of the video for the competition could not be more than 10 minutes, I ran out of time to show all features in the system. Maybe I will add more video clips of this later.

Peter

Adding a hardware button keypad to the AMI board

7. April 2009 22:50 | Peter F. Jørgensen

One of the things you notice when you receive the AMI board, is that there are no hardware buttons on the board.

This article shows you how to connect hardware buttons so you can get started testing all the sample WPF applications that use the navigation buttons and of course write your own programs.

Please note that AUG Elektronik already have a nice looking ready made solution as an add-on board for the AMI. This add-on board have a number of extra features and you can read about it here.

If you feel like making your own simple keypad, then keep reading.

AMI board

The AMI board from the Austrian company AUG Elektronik, is in my opinion more than just a prototyping/development board like you have seen from other vendors. The board is ready to be used and incorporated in your own products.  

When you develop software for this board, you will most definitely need a hardware keypad with a basic set of buttons, like the up/down/left/right/select buttons. But you have to add this yourself or buy the add-on board from AUG. It is however very easy to attach a set of buttons to the board, as all GPIO pins are available on a set of Micro-Match connectors on the back of the board.

Navigation buttons and connectors

What you need is 5 buttons of good quality, a piece of stripboard/vero board to mount the buttons on and some wire. When you receive the box with the AMI board you get  a set of Micro-Match male connectors that connects to the board. Use these to connect the buttons.

A schematic diagram of the wiring will look like this:

 

The AMI board microcontroller uses internal pull-up resistors for the input pins, so a diagram with the detailed connections are as this:

The codes shown as "P5.9", refers to the Micro-Match connector on the AMI board, where P5 is the name of the connector and the ".9" means "pin 9". So "P5.9" means "Connector P5, pin 9".  The references I have used are the same as you can find in the technical manual from AUG Elektronik.

Remember to connect the ground connection, which can be found on P4.2

Click on a picture to see it in a larger version.

 

Additional buttons

In my version of the keypad, I have mounted more than the 5 navigation buttons (although not yet wired). This is only because I found it easier to mount all buttons now when I had heat on my soldering iron and as there are more GPIOs to be used... As you can also see I have used buttons with built-in LEDs. It is always good to be prepared for the future!


Have fun 

Peter

Tags: , ,

Categories: Developer Kits ; Hardware

Maxstream XBee RF module documentation

29. January 2009 21:49 | Peter F. Jørgensen

I have digged out the specifications for the Maxstream XBee RF modules, which I received as part of the "Dare To Dream Different" competition package.

Please note that there is also a Zigbee variant of these modules. The ones I received are 802.15.4 versions. I'm not currently sure of the differences, so you have to look that up yourself if you need it.

You can find the specs. and other information here:

1. XBee XB24-AWI-001 802.15.4 module product manual.
2. XBee XBIB-U-DEV development board diagram.
3. USB driver for Windows (for the development board)

Peter