Results 1 to 31 of 31

Thread: Interested in Robotics AND VB? Look here!

  1. #1
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 00
    Location
    Canada
    Posts
    306
    I was looking on the internet at different types of robots. The usual hobby robot is controlled by a single chip, called a microcontroller. A typical microcontroller contains 8 to 32 I/O pins for sensors and/or motors. Also, the typical microcontroller is programmed by your computer via a serial port in C, C++, or Assembly... Until now! While I was searching on these robotics sites, I came upon Visual Basic-like code. Infact, I was positive it was VB code because I put it into VB and it ran! This microcontroller had VB runtimes preloaded. You don't even have to compile the EXE. Just send the module(s) and/or Class module(s) via the serial port to this special microcontroller.

    The chip itself is called OOPic; Object Oriented Programmable Intergrated Circuit. I am into robotics and I am currently designing one, so when I saw this I thought "THIS IS AWESOME!!!". I looked at it even more: It can be programmed in Basic, C, Visual Basic, and Java!

    OOPic - 40 pin DIP Chip, 31 Digital I/O lines, built-in Serial pins(just connect a 9-pin serial port), and much more.

    Here is some example code for the OOPic:
    Code:
    'This program used the String Basic Version of the OOPic compiler, 
    'which at the time of this writing is in Beta.
    
      Dim D As New oDio4          'Initializes a new object called D as a nibble I/O
      Dim E As New oDio1          'Initializes a new object called E as a single bit I/O 
      Dim RS As New oDio1         'Initializes a new object called RS as a single bit I/O 
      Dim thermo as New oI2C      'Initializes a new object called temp as an I2C port 
      Dim thermo8bit as New oByte 'Initializes a new object called temp8bit as a 8 bit byte
      Dim LCD as New oDataStrobe  'Initializes a new object called LCD as a Data Strobe
    
      Sub main()
        'Start of main program
        Call IOSetup                    'Calls sub program Setup 
        Call ThermoSetup                'Calls sub program TempSetup 
        Call LCDSetup                   'Calls sub program Configure 
        LCD.String = "The current temp" 'Write the text to the LCD
        Do                              'Start of do loop 
          thermo8bit = thermo/255       'Convert 16 bit temp into 8 bit value 
          Call SetLoc                   'Calls sub program TempLoc 
          LCD.String = STR$(thermo8bit) + "%C" 'Write the temp to the LCD 
        Loop                            'End marker for do loop 
      End Sub                           'End of main program
    
      Sub SetLoc() 
      'Routine to locate the cursor for the Temp 
        RS = 0                   'Sets Register Select to Control Register
        D = 12:Call StrobeE      'Sets the address of the degree number Hi nibble 
        D = 06:Call StrobeE      'Sets the address of the degree number Lo nibble 
        RS = 1                   'Sets Register Select to Data Register 
      End Sub
    
      Sub IOSetup() 
      'This routine sets the IO lines that are connected to the LCD display
      'and configures the Virtual Circuit to do the Data Strobe.
        D.Iogroup = 3    'I/O group used for nibble out to LCD 
        D.Nibble = 1     'Which nibble to use Upper or Lower 
        D.Direction = 0  'Direction of data flow in or out 
        E.IOLine = 27    'Which I/O line to use for Display enable and strobe 
        E.Direction = 0  'Direction of data flow in or out 
        E = 0            'Output value = high -- display is enabled 
        RS.IOLine = 26   'Which I/O line to use for Register Select 
        RS.Direction = 0 'Direction of data flow in or out 
        RS = 0           'Output value = low -- Instruction Register 
        LCD.Output.Link(D) 'Connect the datastrobe's data to the LCD's data I/O line
        LCD.Strobe.Link(E) 'Connect the datastrobe's datastrobe to the LCD's E I/O line
        LCD.Mode = cv4Bit  'Select 4-bit mode
        LCD.Operate = cvTrue ' Turn the Datastrobe object on.
      End Sub
    
      Sub ThermoSetup() 
      'Routine to setup I2C communications and Temp Co-Processor 
      'Temperature Co-Processor is started in 12 bit mode, the defalt state 
        thermo.Node = 73           'Identifies node address for Temperature Processor 
        thermo.Width = cv8Bit      'I2C object is set to 8 bit data mode 
        thermo.Mode = cv7Bit       'I2C object is set to 7 bit address mode 
        thermo.Value = &h51        'command to start temperature measurement 
        thermo.Width = cv16Bit     'I2C object is set to 16 bit data mode 
        thermo.Mode = cv10Bit      'I2C object is set to 10 bit address mode 
        thermo.Location = &hAA     'Location of temperature registor in Temperature Processor 
        thermo.NoInc = cvTrue      'I2C object does not auto increment the location 
      End Sub
    
      Sub LCDSetup() 
      'This routine performs LCD reset and initialization and 
      'configures LCD display to operate in 4 bit nibble mode 
        D = 3:Call StrobeE 
        D = 3:Call StrobeE:      ' data is 8 bits here 
        D = 3:Call StrobeE:      ' data is 8 bits here 
        D = 2:Call StrobeE:      ' data is 8 bits here 
        D = 2:Call StrobeE:      ' sets data length to 4 bits 
        D = 8:Call StrobeE:      ' sets # of display lines & font 
        D = 0:Call StrobeE:      ' sets display off 
        D = 14:Call StrobeE:     ' sets display off 
        D = 0:Call StrobeE:      ' sets display on 
        D = 6:Call StrobeE:      ' sets display on 
        D = 0:Call StrobeE:      ' entry mode set 
        D = 1:Call StrobeE:      ' entry mode set 
        D = 0:Call StrobeE:      ' entry mode set 
        D = 12:Call StrobeE:     ' entry mode set 
      End Sub
    
      Sub StrobeE() 
      ' This routine causes the I/O line labeled E to toggle 
      ' one time to strobe data into LCD's internal memory 
        E = 1 
        E = 0 
      End Sub
    Objects such as oDio1 are objects built onto the chip.

    http://www.oopic.com/
    Designer/Programmer of the Comtech Operating System(CTOS)

  2. #2
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 00
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    cool,

    where can i get one of these and how much do they cost ?

    Merlin ¿

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  3. #3
    Guest
    Cool,

    How did you get into robotics? I'm interested in getting involved too.

    my email is wossnamex@talk21.com

    Adam Ward

  4. #4
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 00
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    email me to please

    dean@alkitab.net

    Merlin ¿

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  5. #5
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 00
    Location
    Canada
    Posts
    306
    I looked at http://www.oopic.com and they said the chip is + - $40US

    You can get a starter package with the serial cable, and OOPic PC board with 9V batt clip, 40-pin OOPic chip, an EEPROM chip, and a manual for about + - $70US.

    A good robotics site is http://www.arrick.com. Click on "The Robot Menu" link. You will see a list of 100's of different robots, from autonomous(self-guiding) walkers to phototrophic(Light-seeking) photovores.

    I haven't made a robot before, so I am a beginner in robotics. BUT, I know lots about how they work, how to make 'em, how they are programmed and other stuff. My main robotics goal is to build a 6 legged robot(A hexapod), using 12 Servo motors(2 per leg), using an Intel 80386DX-33 as the core of the computer system. The motors are about $20US each. This project will cost me about $400US. But I live in Canada; It'll cost me $580CAN.

    I recommend you go to http://www.beam-online.com and look for Photovores. They only cost $20US to make and don't need programming.

    Good luck in Robotics
    Email me for some Schematics for motor control and Microcontroller info as well as more Robot Info.

    warmaster199@hotmail.com

    [Edited by Warmaster199 on 11-11-2000 at 12:41 PM]
    Designer/Programmer of the Comtech Operating System(CTOS)

  6. #6
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 00
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    hi,

    what is the full address for oopic.com i can't seem to get there, it saya page not found, have you got other lbnks to get there ?

    Merlin ¿

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  7. #7
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 00
    Location
    Lockport, NY
    Posts
    362
    Originally posted by zmerlinz
    hi,

    what is the full address for oopic.com i can't seem to get there, it saya page not found, have you got other lbnks to get there ?

    Merlin ¿
    Link seems to work fine for me????
    Donald Sy - VB (ab)user

  8. #8
    Guest

    Cool

    Warmaster,

    I cannot thank you enough for your posting !!! I searched over one year for some controller of this kind and now with the help of your posting, I got it! Finally I can start my project that I always dreamt of

    Thanks again & I guess I have a new hobby now

    Felix
    TiberiumSun.com
    felix@tiberiumsun.com

  9. #9
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 00
    Location
    Canada
    Posts
    306
    Did you actually buy the chip? Cool... For my project, I can't use this OOPic chip... I am going to use an Intel 80386 chip. It has 32 I/O pins(1 more than OOPic), plus you can buy some I/O Expander chips to increase the number of I/O pins by 8 or so. I imagine you can add this chip to the OOPic, but if not, you can link a maximum of 127 other OOPics to your first one. I haven't counted how many I/O pins that would be, but, who would need that much I/O? It's something like 3800 I/O. That's insane!

    For my Hexapod design, I need 12 servo motors. Each motor is controlled by an H-Bridge, which is controlled by the on-board 386 CPU.

    "What is an H-Brigde?", you might ask... An H-Bridge is a 4-6 transistor DC motor driver. It can be controlled by 5Volt TTL lines and drives a motor from a separate power supply. If you have hacked servos(servos without the internal control ciruit), an H-Bridge is necessary. The H-Bridge is the main way to connect your motors to your control(CPU) without damaging your CPU from overload.

    Why use hacked servos? Normal servos have a control circuit inside which controls them with TTL pulses. The servo can only turn 180 degrees. Hacked servos don't have a control circuit inside, just the power lines. They can turn as much as you want them too. A hacked servo is basically a "Gearbox" motor. Go to http://www.Beam-Online.com, then click on tutorials. Click on "How to hack a Servo" to learn how to hack a servo.

    [Edited by Warmaster199 on 11-11-2000 at 06:28 PM]
    Designer/Programmer of the Comtech Operating System(CTOS)

  10. #10
    Frenzied Member
    Join Date
    Aug 00
    Location
    Birmingham, AL
    Posts
    1,276

    COOL!
    What is the best way to get started?


  11. #11
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 00
    Location
    Canada
    Posts
    306
    The best way to start is by going to http://www.beam-online.com and get the schematics for the BEAM Photopopper. Next, get the parts, a soldering iron, some solder, some pliers, and start building! This simple BEAM photopopper will go towards the lightest spot in the room in short little bursts. The bursts are controlled by a large capacitor and two 1381 Voltage Trigger transistors. No programming is needed for these.

    You could also go to the next step by making a Bicore driven Tetrapod(2 motor, 4 leg robot). If you want to be extreme, build a hexapod(12 motor, 6 leg). Beware, Hexapods are expensive; $250US - $800US(Kit).

    I'm going straight to the Hexapod. It'll be expandable, have 12 motors, can turn, have DOS preloaded into the BIOS, etc, etc, etc...

    About the 2 motor, 4 leg BEAM robots: I have seen pictures and movies of these things(about 3 inch high, 8 inch long, 6 inch wide) climbing a pile of books(about 3 inches thick). These are awesome little things that cost only $40US for all the motors and electronics.

    The other day, I made a simple robot using 1 motor in the center(a Symet), a battery, and some supports so it doesn't fall over. It "runs" around in large random arcs. My cats love to chase this thing!
    Designer/Programmer of the Comtech Operating System(CTOS)

  12. #12
    Guest
    Warmaster: I'd like to control 3 servos, one "normal" stepping motor and two sensors (photo sensors) . Is OOPIC all i need? What do i need in order to control these 5 elements ?

    Thanks!
    Felix

  13. #13
    Lively Member
    Join Date
    Apr 00
    Posts
    70

    Lightbulb

    Why not just make your own robot? Go do an electronics course and design it yourself, then build it from old lil 'puter bits that i'm sure everyone has lying around, then code a simple prog in VB to control it I was going to get into this robotics thing, but i find a robot with a cable going from your PC is useless Better use radio or something eh? :P
    Daniel Rose
    VB 5.0 Enterprise.
    irc:irc2.dynam.ac

    If TheCodeInTheSig() Is Not Lame() Then IDontKnowWhatIs()

  14. #14
    Hyperactive Member Warmaster199's Avatar
    Join Date
    Aug 00
    Location
    Canada
    Posts
    306
    Supervisor:
    You could use OOPic to control the servos(non-hacked servos). But if you want the servo to spin all the way around, hack the servo and make an H-Bridge circuit for each servo. Each H-Bridge will take up 2 I/O pins of 31. This means you have 25 OOPic I/O pins left. I can't help you with stepper motors(5-6pins) because you need a special driver circuit for it. Once you find a driver circuit, connect it to the OOPic. About your light sensors or Photo-Diodes, you can connect them to the OOPic too. Because of the Photodiodes, I'm guessing that your robot will be phototrophic(light seeking).

    CAPHS:
    They have a special R/F linking system you can buy on http://www.mrrobot.com This'll connect your PC to your robot without cables. Just put the transmitter on the PC serial line, and the reciever on your robot. This work for about 1 Kilometer or so. It'll cost around $200-$300US. Quite expensive.

    Everyone else:
    You can get more robot ideas and designs from:
    http://www.robotics.com/robomenu/index.html
    Designer/Programmer of the Comtech Operating System(CTOS)

  15. #15
    Guest

    Thumbs up Good Topic

    MrRobot.com seems to be selling x-10.com 's color cam that costs $79 (and has a $20 gift certificate) for ONLY $200.00. So be carefull.

    OOPIC.com looks cool (my kind of price range), but you might also be interested in http://www.zworld.com/

  16. #16
    Addicted Member KrishnaSantosh's Avatar
    Join Date
    Feb 01
    Location
    Coimbatore
    Posts
    210
    I'm Quite Interested. Can You EMail The Details.

  17. #17
    Addicted Member KrishnaSantosh's Avatar
    Join Date
    Feb 01
    Location
    Coimbatore
    Posts
    210
    I'm Very Interested. Please EMail Further Details

  18. #18
    PowerPoster Chris's Avatar
    Join Date
    Jan 99
    Location
    K-PAX
    Posts
    3,238
    AS for the Microcontroller topics over here. Is there anyone know where can I get the VB compiler for PICmicro controller

    I know there is a C compiler for this range of controller, but I'm looking for the VB compiler.

    Thx

  19. #19
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 00
    Location
    Lockport, NY
    Posts
    362
    Chris,

    Go to the OOPic site. There you can download their compiler for free and it
    says that it 100% MS Visual Basic compatible.
    Donald Sy - VB (ab)user

  20. #20
    PowerPoster Chris's Avatar
    Join Date
    Jan 99
    Location
    K-PAX
    Posts
    3,238
    dys5, will this compatible with the PICmicro Controller that I mention in my previous posted?

  21. #21
    Hyperactive Member dsy5's Avatar
    Join Date
    Jul 00
    Location
    Lockport, NY
    Posts
    362
    Erm, my eyes must be filled with crud (late night, last night). I overlooked that you were needing it
    for the PICmicro controller. Sorry, Chris.
    Donald Sy - VB (ab)user

  22. #22
    PowerPoster Chris's Avatar
    Join Date
    Jan 99
    Location
    K-PAX
    Posts
    3,238
    it okay dsy5, I juz try my luck here

  23. #23
    Fanatic Member r0ach's Avatar
    Join Date
    Dec 99
    Location
    South Africa
    Posts
    722
    Hi,

    I haven't read all the posts so I might be repeating things. A good way to get started is to get the Lego Mindstorms Robotic Invention System. You can download an ocx to perform some stuff that you can't specify in the 'easy-to-use' interface.

    r0ach™
    Don't forget to rate the post

  24. #24
    Fanatic Member
    Join Date
    Oct 99
    Location
    Chorley, Lancashire, England
    Posts
    935
    You can consider me another grateful recipient of this post on robotics. I have thought about a robotic project for some time but have very little knowledge of electronics let alone robotics.

    Now I have somewhere to start

  25. #25
    Hyperactive Member mikef's Avatar
    Join Date
    Jun 00
    Location
    Beach bound...
    Posts
    510

    Smile Website

    I found a company called MicroKinetics Corp. @ www.microkinetics.com and it has a pretty good selection of stepper motors, servos, speed control boxes....and even has a software libarary for controlling motors that will work with Qbasic, C, C++ for $99 - they also will be releasing a callable VxD for Windows soon that will allow the programmer full control of motors etc. That version will work with all the Visual languages.
    "If I had known it was going to be that kinda party, I would have stuck my disk in the mash potatos!"

  26. #26
    New Member
    Join Date
    May 04
    Location
    3rd Demension
    Posts
    3
    This thread was made long time ago

    But I got something to say


    The original thread starter said
    "Also, the typical microcontroller is programmed by your computer via a serial port in C, C++, or Assembly... "

    I dont' think there is a microcontroller that can be programmed by C or C++ *directly.*
    Every microcontroller is programmed in Assembly language.

    Now, some compliers allows you to program in C or C++ and they translate this C or C++ into Assembly which can be programmed into Microcontroller.
    -------------------------------------------------------------------------------

    Another thing.
    As Chris was asking for, there is a Basic compiler for PICmicro Microcontroller. it is called picBasic Compiler. I think the proversion is sold for 299USD

  27. #27
    New Member
    Join Date
    May 04
    Location
    3rd Demension
    Posts
    3
    Also, I really don't see why this OOpic is gaining so much enthusiasm from these people.

    The module is really expensive, compared to the most popular microcontroller, 16F84, made by Microchip (60$ to 5$)

    Well, good thing is that OOpic is providing free Basic compiler that you can download from there website. As I mentioned before, the compiler usually costs around 299$.



    What I am interested is programming microcontroller with VB. Seriously, I don't wanna buy 299$ conpiler.

  28. #28
    Hyperactive Member
    Join Date
    Apr 04
    Location
    Philippines
    Posts
    285
    hello evryone i've been using 16f84 microcontroller for a while now. i'm just wondering if anyone of you knows where i can get high-end sensors, like IR sensor that has a long range (more than a meter ). i've tried using vb together with a microcontroller but i usually write the programs separately, assembly for the microcontroller and vb for the user interface. the vb program tells the microcontroller what to do by sending data to the microcontroller through the parallel port. it's very easy )

  29. #29
    New Member
    Join Date
    May 04
    Location
    3rd Demension
    Posts
    3
    hi, Guyjasper

    isn't it pretty tough to directly write assembly language?

    I never tried myself, but I KNOW it is really really really x 100 time consuming.

    Well, I guess you don't need a expensive complier since you can write assembly code with free assembler provided by Microchip.


    for IR sensors, I came across many ones but I don't know any right now. I will tell you when I know one.

  30. #30
    Hyperactive Member
    Join Date
    Apr 04
    Location
    Philippines
    Posts
    285
    hehe, yeah, it's quite time consuming but during my college days, we were taught to program PICs in assembly language. but i tell you, it's not that difficult since there are only 35 instructions that you need to know (for PIC16F84) about those sensors, just post a reply when you find one

  31. #31
    Frenzied Member wengang's Avatar
    Join Date
    Mar 00
    Location
    Beijing, China
    Posts
    1,481

    Re: Interested in Robotics AND VB? Look here!

    Hi all.
    Since this thread has been revisited over the years, I thought I'd ask here:

    I'm looking to get into a robotics project (as a hobby)

    What is the current starter kit like?
    Is VB really a language that the chip can understand (doesn't vb only write for windows?).

    Maybe there are classes to take first. My VB up to par, but other languages aren't so great, and no assembly language at all.

    Thanks all.
    Wengang
    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

Posting Permissions

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