Page 25 of 31 FirstFirst ... 15212223242526272829 ... LastLast
Results 241 to 250 of 302

Thread: PhantomX using a Teensy 3.1

  1. #241
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,176
    Images
    27
    Rep Power
    267

    Re: PhantomX using a Teensy 3.1

    The basic concept of an RTOS is scheduling tasks to always occur within some fixed-length block of time (a bit like a generalized callback function). If you have a cycle time of 10ms and you have three tasks that take 5ms, 4ms, and 2ms, respectively, then you can only actually guarantee that two tasks will be performed in each 10ms cycle. A hard-RTOS would usually just reject the task with the lowest priority, while a soft-RTOS might attempt to complete the additional tasks in the leftover time of every cycle (high priority tasks get completed once every cycle, while low priority tasks get completed once every however many cycles required) or increase the cycle time length. You get into all sorts of complicated problems when designing the scheduling system (a bit like switching between threads) and dealing with task errors and/or time overruns.

    Hopefully I will be completing a few house projects over the next couple days, but there are so many they make me want to curl into a little ball and/or burn the place to the ground. If I could afford to replace it outright, I would strip it of just about everything reusable/recyclable before offering it to the local fire department for a training session.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  2. #242
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    786
    Images
    276
    Rep Power
    72

    Re: PhantomX using a Teensy 3.1

    Hi Kurt,

    I'm just about to connect my Teensy 3.1 to the PhantomX hexapod for testing. And finally start learning more C++ and play with the code. Using Arduino 1.0.6 and Teensyduino 1.20. It's been a while since I tested it, but loading your test program worked fine.

    At the moment I'm a bit puzzled what files to use on your github. Did you upload the floating point version you worked on? Did you setup the XBee to same rates as for the ArbotiX?
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  3. #243

    Re: PhantomX using a Teensy 3.1

    Hi Kare,

    I am sorry I am a bit rusty on the Teeny Phoenix stuff... Been playing with too many other things lately

    I have done most with the fixed point math. I believe the floating point version still has issues. At least it does on my Edison. Keep meaning to go and debug it more.

    I believe the fixed point I am using: https://github.com/KurtE/Phantom_Phoenix_Serial
    Floating point version: https://github.com/KurtE/Phantom_Phoenix_Serial_float

    I should some time take a pass again and make sure which things are the most up to date.

    Yes - mostly been playing with Arbotix Commander so I keep XBees at 38400. I believe the DIY stuff is setup to again be at 38400 and the code does the switch to command mode...

    Again sorry, at some point I will probably try to simplify some things for myself. That is I will probably keep some of the old stuff for any RC servo stuff, but then all new stuff will probably be AX (or MX...) servo only... Probably no longer worry about PS2, RC radios...

    As I mentioned earlier will probably sell off several of my older robots...

    Kurt

  4. #244
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    786
    Images
    276
    Rep Power
    72

    Re: PhantomX using a Teensy 3.1

    Thanks a lot Kurt!

    I'll start with the fixed point at first. You sure had a lot of WIP warnings on the float, lol.

    Yeah, I understand if you want to sell some of the robots. So far I'm mostly using them for demonstration and I find it useful to have many different of them for the show. I have them all stored in boxes, so they are not collecting dust..
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  5. #245

    Re: PhantomX using a Teensy 3.1

    Yep it is for sure WIP WIP WIP Although lately not too much progress :lol:

    I will probably work on debugging it soon. Will probably work on it mainly on the Edison side, where I have source level debugging which can for sure spoil you... I keep playing around with simple TFT display app for the Edison, which has a few logical buttons. The buttons allow me to launch either the Fixed or floating point version and to shutdown the system... When I launch one apps, it has an area that can display what the app outputs, in an area that is scrollable, Currently don't have the code in yet to actually be able to scroll back, but will soon... will also add a button or two, to maybe output some simple commands (debug on), Servo Test, ... that can let me see some status on the TFT display. Will then probably have this app start up when I power-up the Edison.

    Might also build a mixed version where it runs both and shows me where they diverge... But that might be cheating!

    As for selling stuff, it is more for clearing out some stuff to make room both mentally and physically for new stuff.

    Kurt

  6. #246
    Join Date
    Jan 2008
    Location
    Norway, Stavanger
    Posts
    786
    Images
    276
    Rep Power
    72

    Re: PhantomX using a Teensy 3.1

    Hi Kurt,

    Yeah! I've a working PhantomX V1 with Teensy3.1 on my desk!
    Click image for larger version. 

Name:	PhantomX with Teensy01.jpg 
Views:	60 
Size:	101.6 KB 
ID:	5788

    At first I paired the XBee's, then uploaded the Phantom_Phoenix_Serial to Teensy and uploaded the standard Commander software to a Commander 2. Hooked one AX-12 to Teensy just to confirm I had some cycling movement.

    The challenge started when I mounted the Teensy board to PhantomX.. At first only the rear and front legs crammed together like a flower, lol. I then realized that you had a PhantomX V2 and a quad was defined. No problem I thought.. The OPT_WALK_UPSIDE_DOWN does not work properly, so I simply change the value 900 to 1800 when calculating the tibia angle. That should make it ok?.. I think I've to spend some hours studying your changes. After a while I realized that I had to comment out all the tibia inversion stuff (#define cRRTibiaInv 0). Naturally that did the trick.

    The translation and body rotation work very well on your code, nice!

    After a while I think I'll move over to the DIY remote, I miss all the extra functions. That said, I'm glad to see that the Commander 2 is far much better than using a PS2. The gimbals data seem more accurate.

    Having fun!

    Thanks for sharing all your work Kurt! Highly appreciated!
    Kåre Halvorsen aka Zenta
    ---------------------------------
    Zenta's YouTube channel
    Zenta's Blog
    Zenta's Instagram

  7. #247

    Re: PhantomX using a Teensy 3.1

    Glad you are having some Fun!

  8. #248

    Re: PhantomX using a Teensy 3.1

    My new smaller(1.8"x2.8") breakout boards arrived that I had fabricated arrived yesterday from Seeedstudio. I was sort of surprised they arrived as I had not received notification they shipped...

    Click image for larger version. 

Name:	Teensy-AX-board-fab.jpg 
Views:	74 
Size:	42.8 KB 
ID:	5900

    Now I need to get the parts to fully assemble 1, but in the mean time I will probably do a minimal build.

    I am thinking of trying one out to see how well it could replace the USB2AX. I may write a sketch that emulates the protocol of the USB2AX, including my enhancements to allow the device to do the interpolation between poses, as well as to handle some power management and potentially some sound stuff.

    For that i am not sure how much of the power supply I will need for this. That is if the Lipo battery pugs into powered AX bus.

    The board can take power from the ax-buss, have option to put on VR plus caps. If I do that +5v can be used to power the logic of the board. I can also then jumper the power from here to power processor board (RPI2, ODroid, Edison). Assuming VR is strong enough, it would power the USB of those cards...

    Or I could use a BEC to create +5v, which I feed into Processor board (RPI2, Odroid...), and use the USB of that board to power my Teensy board, which would imply I need very few components on the board...

    Anyway should be some fun. May be a few days before I build one, as probably need to get parts, plus several other projects in progress.

    Kurt

  9. #249

    Re: PhantomX using a Teensy 3.1

    FYI - Yesterday I assembled one and made a few mistakes along the way.

    Click image for larger version. 

Name:	Teensy-ax-board-bld.jpg 
Views:	77 
Size:	50.8 KB 
ID:	5917
    Please pardon the quick and dirty photo...

    I was curious to see if the power circuit worked, so I took a short cut and did not do a step that I would normally do, which is to use multimeter to check for shorts (which I should have done) as I had a solder bridge between the VIN and GND of the VR. So when I connected battery, it fried the etch from connector to VR. Was able to solder in a bridge, but not sure, but may have killed VR and the like... But can still do some testing using USB power. Note: in many cases, I may not populate the power circuit anyway. That is if I use this like USB2AX or USB2Dynamixel, I may power it through the Linux board.

    Example: PhantomX, in process of installing ODroid C1, which requires 5v. I have a 10amp 5v BEC, which I will adapt to plug into powered AX HUB and then as connector into ODroid (or could be RPI2...).

    I have a simplified sound circuit on this board (RC) instead of the transistor circuit my other boards use. But circuit may be incorrect for what I was setting it up for. That is to hook up to the DAC of the T3.1 and then be able to use the Audio library to play more advanced sounds... Lucky setup with jumper(shunt), to DAC pin. More or less no sound that way, but jumpered to other IO pin plays sounds...

    May have to partially setup 2nd board with Teensy LC, with AX buss stuff and verify first I can drive AX servos and then see about using the USB in raw mode and emulate something like USB2AX or the like and see how well it works...

    But right now probably back to normal interrupts of working with HR-OS1 or finishing mounting stuff on PhantomX to verify works again with Linux board and prepare for ROS (some required sensors for this should arrive in the next couple of days).

    Kurt

  10. #250

    Re: PhantomX using a Teensy 3.1

    may have killed VR and the like
    If Vin and GND were shorted, that should have protected the regulator.

    When I blow a trace, I run hookup wire between two component pins on that same circuit -- I haven't had much luck trying to salvage traces. Luckily, this doesn't happen often :-)

    But circuit may be incorrect for what I was setting it up for.
    Yeah, I don't think the DAC can drive much current at all. You need, at a minimum, some kind of bipolar transistor amplifier, and, typically, a LM380 or similar integrated amplifier.

    A carefully tuned and biased single bipolar transistor can conceivably be used as an amplifier, although the exact amount of gain and linearity/saturation then depends on the specific transistor device. Using push/pull, or even better, using pre-integrated amplifiers is much easier, and doesn't really use much more board space :-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PhantomX Hexapod Kit
    By SuperMiguel in forum Projects For Request and/or Sale
    Replies: 12
    Last Post: 12-29-2013, 09:36 PM
  2. Question(s) PhantomX AX Quadruped Mark II PhantomX Robot Turret Equipped??
    By hwan we in forum Robotics General Discussion
    Replies: 1
    Last Post: 03-11-2013, 02:09 PM
  3. Question(s) PhantomX Drawings?
    By phil0stine in forum Humanoids, Walkers & Crawlers
    Replies: 2
    Last Post: 01-03-2013, 02:09 PM
  4. For learning: PhantomX Hexapod vs PhantomX Quadruped
    By Leugim in forum Humanoids, Walkers & Crawlers
    Replies: 4
    Last Post: 10-26-2012, 08:50 AM
  5. My PhantomX Hexapod
    By Gilrock in forum Humanoids, Walkers & Crawlers
    Replies: 0
    Last Post: 09-26-2012, 02:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •