To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 15832
Subject: 
RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Sun, 29 Jul 2001 22:41:01 GMT
Original-From: 
Pink Tail <pinkmice@borg./AntiSpam/com>
Highlighted: 
(details)
Viewed: 
910 times
  
Having decoded the manas remote controllers protocol, with a
couple of hints from RCX2 users, Zhengrong Zang amongst them,
I realised the 76kHz, 25% duty cycle, 4800 baud settings were
exactly those of the Manas.

As a result, I present for your appraisal, a tested nqc program which
controls all four Manas motors. This could easily be expanded to
include six, if you have two sets, ie; three receivers.


#define MANAS_1 5
#define MANAS_2 6
#define EM_OFF 0
#define EM_FWD 7
#define EM_REV 15

int em1,em2,em3,em4;  //Global motor control locations

task main()
  {

// This demo starts the manas comms task, then loops forever.
// In the loop, it steps through three control phases setting
// the motors to off, and then paired forward and reverse.

  start manas;

  while (true)
    {
    em1=EM_OFF;
    em2=EM_OFF;
    em3=EM_OFF;
    em4=EM_OFF;
    Wait(100);
    em1=EM_FWD;
    em2=EM_REV;
    em3=EM_FWD;
    em4=EM_REV;
    Wait(100);
    em1=EM_REV;
    em2=EM_FWD;
    em3=EM_REV;
    em4=EM_FWD;
    Wait(100);
    }
  }

// The manas task continuously resends the motor settings.
// When the RCX is halted, this task stops and the manas
// motors automatically shut off

task manas()
  {
  while (true)
    {

// First ensure serial settings are still ok

    SetSerialComm(SERIAL_COMM_4800|SERIAL_COMM_DUTY25|SERIAL_COMM_76KHZ);
    SetSerialPacket(SERIAL_PACKET_DEFAULT);

// Set to low power so we don't run the battery down too quick

    SetTxPower(TX_POWER_LO);

// Set the first unit two message bytes and send them

    SetSerialData(0,MANAS_1*0x10+em1);
    SetSerialData(1,em2*0x10+0x10-((MANAS_1+em1+em2)&0xf));
    SendSerial(0,2);

// Set the second unit two message bytes and send them

    SetSerialData(0,MANAS_2*0x10+em3);
    SetSerialData(1,em4*0x10+0x10-((MANAS_2+em3+em4)&0xf));
    SendSerial(0,2);

// Delay for a while so we can resend them regularly

    Wait(10);
    }
  }


I hope this is encouraging to you as it is to me, it expands the RCX
output capability greatly.

John Barnes





--
MIME ATTACHMENTS DISCARDED:

1.  Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    Content-Length: 4886


Subject: 
Re: RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Mon, 30 Jul 2001 03:51:24 GMT
Viewed: 
629 times
  
This is fantastic!  Thanks for your efforts!
Anyone want to split a second manas so we each
can have three motors?

Would it be possible to put an image of the
manas motor unit up on brickshelf?  I can't
tell from the catalog images what the dimensions
of the motor units are.

And, as a follow up, can the RCX receive messages from
the control pads?

-gyug
Lugnet member #9

In lugnet.robotics, "Pink Tail" <pinkmice@borg.com> writes:
Having decoded the manas remote controllers protocol, with a
couple of hints from RCX2 users, Zhengrong Zang amongst them,
I realised the 76kHz, 25% duty cycle, 4800 baud settings were
exactly those of the Manas.

As a result, I present for your appraisal, a tested nqc program which
controls all four Manas motors. This could easily be expanded to
include six, if you have two sets, ie; three receivers. • [...]

I hope this is encouraging to you as it is to me, it expands the RCX
output capability greatly.

John Barnes


Subject: 
Info and source for Manas motors?
Newsgroups: 
lugnet.robotics
Date: 
Mon, 30 Jul 2001 19:21:57 GMT
Original-From: 
Bruce Boyes <BBOYES@SYSTRONIXspamcake.COM>
Viewed: 
741 times
  
After a brief and fruitless web search (apparently "Manas" is the hindu
mind) I'm asking for help with technical info, prices, etc on Manas motors.

Thanks

Bruce Boyes
------- WWW.SYSTRONIX.COM ----------
  Real embedded Java and much more
     High speed 8051 systems
+1-801-534-1017  Salt Lake City, USA


Subject: 
Re: Info and source for Manas motors?
Newsgroups: 
lugnet.robotics
Date: 
Mon, 30 Jul 2001 19:35:13 GMT
Viewed: 
682 times
  
http://shop.lego.com/productinfo.asp?product_number=8539

On Mon, 30 Jul 2001, Bruce Boyes wrote:

After a brief and fruitless web search (apparently "Manas" is the hindu
mind) I'm asking for help with technical info, prices, etc on Manas motors.

Thanks

Bruce Boyes
------- WWW.SYSTRONIX.COM ----------
  Real embedded Java and much more
     High speed 8051 systems
+1-801-534-1017  Salt Lake City, USA


Subject: 
Re: RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Mon, 27 Aug 2001 22:20:48 GMT
Viewed: 
1039 times
  
In the included message below, I have edited the code from the previous
message to remove some stray characters and to add code for a third
Manas dual-motor unit. I haven't tried to find the address for "all" Manas
units.

In experimenting with control codes, I found that EM_OFF, as defined in
this code as zero, is really a float command and that 8 appears to be
immediate off. I propose that these names and values be used in a way
that parallels the RCX commands. So:

#define EM_FLOAT 0
#define EM_OFF 8

Has anyone else determined what other bit patterns do? Once they are
completely understood, someone should put together a manas.nqh file with
#defines and appropriate function definitions.

It is now possible for an RCX to directly and independently control up
to nine motors! And by slaving Scouts and Micro Scouts...

Dennis Williamson


In lugnet.robotics, "Pink Tail" <pinkmice@borg.com> writes:
Having decoded the manas remote controllers protocol, with a
couple of hints from RCX2 users, Zhengrong Zang amongst them,
I realised the 76kHz, 25% duty cycle, 4800 baud settings were
exactly those of the Manas.

As a result, I present for your appraisal, a tested nqc program which
controls all four Manas motors. This could easily be expanded to
include six, if you have two sets, ie; three receivers.


   #define MANAS_1 5
   #define MANAS_2 6
   #define MANAS_3 7
   #define EM_OFF 0
   #define EM_FWD 7
   #define EM_REV 15

   int em1,em2,em3,em4,em5,em6;  //Global motor control locations

   task main()
     {

   // This demo starts the manas comms task, then loops forever.
   // In the loop, it steps through three control phases setting
   // the motors to off, and then paired forward and reverse.

     start manas;

     while (true)
       {
       em1=EM_OFF;
       em2=EM_OFF;
       em3=EM_OFF;
       em4=EM_OFF;
       em5=EM_OFF;
       em6=EM_OFF;
       Wait(100);
       em1=EM_FWD;
       em2=EM_REV;
       em3=EM_FWD;
       em4=EM_REV;
       em5=EM_FWD;
       em6=EM_REV;
       Wait(100);
       em1=EM_REV;
       em2=EM_FWD;
       em3=EM_REV;
       em4=EM_FWD;
       em5=EM_REV;
       em6=EM_FWD;
       Wait(100);
       }
     }

   // The manas task continuously resends the motor settings.
   // When the RCX is halted, this task stops and the manas
   // motors automatically shut off

   task manas()
     {
     while (true)
       {

   // First ensure serial settings are still ok



SetSerialComm(SERIAL_COMM_4800|SERIAL_COMM_DUTY25|SERIAL_COMM_76KHZ);
       SetSerialPacket(SERIAL_PACKET_DEFAULT);

   // Set to low power so we don't run the battery down too quick

       SetTxPower(TX_POWER_HI);

   // Set the first unit two message bytes and send them

       SetSerialData(0,MANAS_1*0x10+em1);
       SetSerialData(1,em2*0x10+0x10-((MANAS_1+em1+em2)&0xf));
       SendSerial(0,2);

   // Set the second unit two message bytes and send them

       SetSerialData(0,MANAS_2*0x10+em3);
       SetSerialData(1,em4*0x10+0x10-((MANAS_2+em3+em4)&0xf));
       SendSerial(0,2);

   // Set the third unit two message bytes and send them

       SetSerialData(0,MANAS_3*0x10+em5);
       SetSerialData(1,em6*0x10+0x10-((MANAS_3+em5+em6)&0xf));
       SendSerial(0,2);

   // Delay for a while so we can resend them regularly

       Wait(10);
       }
     }



I hope this is encouraging to you as it is to me, it expands the RCX
output capability greatly.

John Barnes


Subject: 
Re: RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Thu, 30 Aug 2001 01:50:58 GMT
Viewed: 
739 times
  
Someone pointed out to me that I made a typo in the program lines shown below.
The original program reads:

       SetTxPower(TX_POWER_LO);

I had changed it during testing since I was talking to three Manas motor units
and I didn't want to have to be particularly careful to position them and the
RCX precisely enough to have the communication work reliably.

Dennis


In lugnet.robotics, Dennis Williamson writes:
[snip]
  // Set to low power so we don't run the battery down too quick

      SetTxPower(TX_POWER_HI);
[snip]


Subject: 
Re: RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Thu, 3 Jan 2002 21:48:22 GMT
Viewed: 
964 times
  
I just wanted to say "thanks" to everyone who contributed to this thread!

After installing NQC and BricxCC last night, and pasting the code you wrote
into a program, my sons (home on Christmas break) are happily making their
RCX drive their manas motors crazy. :)

We even went through the exercise of writing a program to test-send all 16
different codes to the manas units.  Good time for all of us, and my sons
are learning a new programming language.

Steve


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR