Wednesday, December 15, 2010

Some progress

First off, some of my own joystick code, mostly messing around.
http://pastebin.com/t0JsTtL2
Basically the joystick controls a "ship" to fly around with 6DOF (and afterburner! :P)
The sample code is a bit challenging, as I've never seen/dealt with the .dict or .type attribute before, or the 'pass' or chr() command, but that's just something I'll have to read up on. I'll do that and comment out the code later this week probably.

I also was playing with the killswitch stuff yesterday. On the radio controller board, when a button is pressed, I discovered that it maintains the corresponding output 'high'. The only way to cut that signal is to cut power feeding the board. This means pressing the button can only turn ON the N-channel FET, but not off. I think we may need to use a P-channel FET instead if this IS supposed to be a killswitch. Also, the diode is supposed to go in inverse parallel with the load, right?(cathode to positive, anode to negative/ground/drain) For the regulator I have a cap from each leg to ground.
-Andy
EDIT: Nevermind, it all works now. Turns out the little remote is fussy about the voltage it needs. If it's below 5V it can only turn on but not off. The wallwart i was using was to weak for my load, so when I pressed the remote button, the voltage to the device dropped below 5v and wouldn't shut off. I stuck a cordless drill battery in there instead and now it works perfectly! :D

1 comment:

  1. Good work Andy,

    It sounds like you have the regulator setup correctly. Here is a link to the schematic for using the 7805. http://profmason.com/wp-content/uploads/2007/02/moz-screenshot-37.jpg
    I do have a power on LED included.

    Here is a link to the datasheet (such as it is) on the remote you are using. http://www.virtual-village.ca/433mhz-radio-wireless-control-001540-015.html
    If the voltage is <4.5 V it won't switch.

    The code looks fine. See if you can figure out how to display the image in pygame (look on their website for help) and get the robot driving around on the image.

    I also left the GPS unit for you in the robot room. When you get it take a look at my GPS code here http://profmason.com/?p=1440.

    I would like you to get the GPS integrated with your joystick driven robot model on a map to give you an image something like this:
    http://profmason.com/?p=1391

    Great work!

    ReplyDelete