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
15831  |  15833
Subject: 
RCX drives Manas motors!
Newsgroups: 
lugnet.robotics
Date: 
Sun, 29 Jul 2001 22:41:01 GMT
Original-From: 
Pink Tail <pinkmice@*spamless*borg.com>
Highlighted: 
(details)
Viewed: 
876 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



Message has 3 Replies:
  Re: RCX drives Manas motors!
 
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 (...) (23 years ago, 30-Jul-01, to lugnet.robotics)
  Info and source for Manas motors?
 
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 (...) (23 years ago, 30-Jul-01, to lugnet.robotics)
  Re: RCX drives Manas motors!
 
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 (...) (23 years ago, 27-Aug-01, to lugnet.robotics)

7 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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