Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Sensor usage with CM-5

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
57 postsPage 1 of 41, 2, 3, 4
57 postsPage 1 of 41, 2, 3, 4

Sensor usage with CM-5

Post by sdeba » Sat Nov 12, 2011 9:03 pm

Post by sdeba
Sat Nov 12, 2011 9:03 pm

Hi,
I've started my adventure with Bioloid and I found that RoboSavy forum is very usable. Anyway I am wondering if there is somewhere simple solution how to use sensors (ex. gyro sensor) with CM-5.

Thanks in advance ;)
Hi,
I've started my adventure with Bioloid and I found that RoboSavy forum is very usable. Anyway I am wondering if there is somewhere simple solution how to use sensors (ex. gyro sensor) with CM-5.

Thanks in advance ;)
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by siempre.aprendiendo » Sat Nov 12, 2011 10:31 pm

Post by siempre.aprendiendo
Sat Nov 12, 2011 10:31 pm

I'm afraid that the simple solution is to upgrade to CM-510.

Otherwise you should add o change to other microcontroller to connect the sensors. Probably the previous option is simpler, better and cheaper.

[Edited] Cheaper for the same features.
I'm afraid that the simple solution is to upgrade to CM-510.

Otherwise you should add o change to other microcontroller to connect the sensors. Probably the previous option is simpler, better and cheaper.

[Edited] Cheaper for the same features.
Last edited by siempre.aprendiendo on Mon Nov 14, 2011 7:25 pm, edited 1 time in total.
siempre.aprendiendo
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 559
Joined: Wed Aug 08, 2007 9:13 pm
Location: Barcelona

Post by sdeba » Sat Nov 12, 2011 10:40 pm

Post by sdeba
Sat Nov 12, 2011 10:40 pm

What about Peppers board, is it hard to do or maybe I can buy it somewhere?
I saw also this: http://www.huvrobotics.com/shop/index.p ... roductId=6
Is it worth seeing?

Upgrading from Comprehensive to Premium is quite a lot of money, so I want to be sure if there isn't any options left ;)
What about Peppers board, is it hard to do or maybe I can buy it somewhere?
I saw also this: http://www.huvrobotics.com/shop/index.p ... roductId=6
Is it worth seeing?

Upgrading from Comprehensive to Premium is quite a lot of money, so I want to be sure if there isn't any options left ;)
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Sun Nov 13, 2011 11:51 am

Post by i-Bot
Sun Nov 13, 2011 11:51 am

Putting sensors on the Dynamixel bus is a good way with the CM-5. Because Roboplus task can read and write custom devices you can interact with the devices easily.

I don't think either the Pepper board or the Hylands board are still available. If you want to build them yourself the source code is available. I have built dynamixel bus devices based around the 5V Arduino pro mini board. I use the arduino bootloader to load code, but develop code outside the arduino environment since I run the Dynamixel bus at 1Mbps. You should be able to load the hylands code.
Putting sensors on the Dynamixel bus is a good way with the CM-5. Because Roboplus task can read and write custom devices you can interact with the devices easily.

I don't think either the Pepper board or the Hylands board are still available. If you want to build them yourself the source code is available. I have built dynamixel bus devices based around the 5V Arduino pro mini board. I use the arduino bootloader to load code, but develop code outside the arduino environment since I run the Dynamixel bus at 1Mbps. You should be able to load the hylands code.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by sdeba » Sun Nov 13, 2011 12:30 pm

Post by sdeba
Sun Nov 13, 2011 12:30 pm

What about difficulty of making such thing. I'm rather fluent widows and linux embodimenT programmer who never had programming micro controllers. Should I have done experience with micro controllers?
What about difficulty of making such thing. I'm rather fluent widows and linux embodimenT programmer who never had programming micro controllers. Should I have done experience with micro controllers?
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Mon Nov 14, 2011 2:14 pm

Post by i-Bot
Mon Nov 14, 2011 2:14 pm

It is surprisingly easy to use the Arduin Pro Mini 5V as a direct replacement for the IO Board from John Hylands.

You will need this board:
http://robosavvy.com/store/product_info.php/products_id/564
and the associated programming board or cable.

The interface to the Dynamixel bus, just requires connectors, a resistor and a couple of diodes. The Arduino is powered direct from the Dynamixel bus and has an internal voltage regulator.

Hex files generated using ATmel AVRSudio can be uploaded using the ARP Uploader software.
http://www.ngcoders.com/downloads/arduino-hex-uploader-and-programmer

Source code for the IO Board and the IMU are available from:
http://websvn.hylands.org/listing.php?repname=Projects&path=%2Favr%2F&rev=0&sc=0

The code is in C, and the examples make a good start if you want to develop your own.

I just tried loading the IO Board software, and it works fine after a couple of minor fixes. If you want to go this route, I will document the process.
It is surprisingly easy to use the Arduin Pro Mini 5V as a direct replacement for the IO Board from John Hylands.

You will need this board:
http://robosavvy.com/store/product_info.php/products_id/564
and the associated programming board or cable.

The interface to the Dynamixel bus, just requires connectors, a resistor and a couple of diodes. The Arduino is powered direct from the Dynamixel bus and has an internal voltage regulator.

Hex files generated using ATmel AVRSudio can be uploaded using the ARP Uploader software.
http://www.ngcoders.com/downloads/arduino-hex-uploader-and-programmer

Source code for the IO Board and the IMU are available from:
http://websvn.hylands.org/listing.php?repname=Projects&path=%2Favr%2F&rev=0&sc=0

The code is in C, and the examples make a good start if you want to develop your own.

I just tried loading the IO Board software, and it works fine after a couple of minor fixes. If you want to go this route, I will document the process.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by sdeba » Mon Nov 14, 2011 8:40 pm

Post by sdeba
Mon Nov 14, 2011 8:40 pm

Hi,
Thank you for engaging into my problem ;)

I like this way of solving sensoring problem. Arduino Mini Pro 5V board is available in my country, so this isn't a problem. They're offering also Arduino Mini USB to connect the board to the PC - is it good? If it is, I'll order those items.

Dynamixel Bus looks simple, but I'll need a more deep explanation. The rest seems pretty clear.

I looked at source code files in bioloid-io/, bioloid-imu/ and bootloader-arduino/ and with a lil' bit of help I think I could handle it. Just as I posted before - I've had never before any contact with microcontroller programming, so it is quite new world to me ;)

So if you're so kind and you can document whole process for me, I would be very grateful ;)
Hi,
Thank you for engaging into my problem ;)

I like this way of solving sensoring problem. Arduino Mini Pro 5V board is available in my country, so this isn't a problem. They're offering also Arduino Mini USB to connect the board to the PC - is it good? If it is, I'll order those items.

Dynamixel Bus looks simple, but I'll need a more deep explanation. The rest seems pretty clear.

I looked at source code files in bioloid-io/, bioloid-imu/ and bootloader-arduino/ and with a lil' bit of help I think I could handle it. Just as I posted before - I've had never before any contact with microcontroller programming, so it is quite new world to me ;)

So if you're so kind and you can document whole process for me, I would be very grateful ;)
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Tue Nov 15, 2011 12:27 am

Post by i-Bot
Tue Nov 15, 2011 12:27 am

There seem to be a few options for programming the Pro Mini. They all seem to work, but some are easier than others to use. The Pro Mini has a 6 pin connector for programming. These pins are Gnd, Vcc, TxO, RxI, CTS and DTR. CTS is not really used and connected to GND.

The minimum programming connection is to connect to to Gnd, TxO, and RxI. The AVR Dude programming software used by both Arduino and ARP uploader need these three pins. The Vcc pin can optionally be powered from the 5V USB power.

The DTR pin provides a reset function to the board. If DTR is not connected, then you need to press the Reset button on the Pro Mini aat the right time in the programming cycle. DTR can be driven by DTR or by RTS if DTR is not available.

I use an FTDI cable which provides RTS and is pinned to plug in directly if you mount a 6 way header on the board.

http://www.sparkfun.com/products/9718

You did not say if your were happy with a small amount of soldering ? I see two versions of the Mini USB, one with DTR and one without. It looks like the Mini USB will plug in but not with DTR. If the Mini USB has DTR, then you can either make a special cable to include DTR, or work without it.

For the software if you install AVR Studio 5 (free from Atmel), then I can post a complete project for the IO board for you to look at. AVR Studio is based on Visual Studio and probably easiest, though Eclipse is also possible for AVR development if you are more comfortable in that environment.
There seem to be a few options for programming the Pro Mini. They all seem to work, but some are easier than others to use. The Pro Mini has a 6 pin connector for programming. These pins are Gnd, Vcc, TxO, RxI, CTS and DTR. CTS is not really used and connected to GND.

The minimum programming connection is to connect to to Gnd, TxO, and RxI. The AVR Dude programming software used by both Arduino and ARP uploader need these three pins. The Vcc pin can optionally be powered from the 5V USB power.

The DTR pin provides a reset function to the board. If DTR is not connected, then you need to press the Reset button on the Pro Mini aat the right time in the programming cycle. DTR can be driven by DTR or by RTS if DTR is not available.

I use an FTDI cable which provides RTS and is pinned to plug in directly if you mount a 6 way header on the board.

http://www.sparkfun.com/products/9718

You did not say if your were happy with a small amount of soldering ? I see two versions of the Mini USB, one with DTR and one without. It looks like the Mini USB will plug in but not with DTR. If the Mini USB has DTR, then you can either make a special cable to include DTR, or work without it.

For the software if you install AVR Studio 5 (free from Atmel), then I can post a complete project for the IO board for you to look at. AVR Studio is based on Visual Studio and probably easiest, though Eclipse is also possible for AVR development if you are more comfortable in that environment.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by sdeba » Tue Nov 15, 2011 1:33 am

Post by sdeba
Tue Nov 15, 2011 1:33 am

I was searching my local store and they have FDTI cable, which will be better solution (more flexible).I'm fine with soldering. Arduino Mini Pro doesn't have pins, so I need to solder them, am I right?

I already have AVR studio installed on my computer, so the project would be welcomed ;)

My order list looks so far like this:
-Arduino Mini Pro
-FDTI cable
- some pins (the type matters?)

What about dynamixel bus? What will I need?

Thanks in advance ;)
I was searching my local store and they have FDTI cable, which will be better solution (more flexible).I'm fine with soldering. Arduino Mini Pro doesn't have pins, so I need to solder them, am I right?

I already have AVR studio installed on my computer, so the project would be welcomed ;)

My order list looks so far like this:
-Arduino Mini Pro
-FDTI cable
- some pins (the type matters?)

What about dynamixel bus? What will I need?

Thanks in advance ;)
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Tue Nov 15, 2011 1:53 pm

Post by i-Bot
Tue Nov 15, 2011 1:53 pm

For the pins you can use straight or right angle .1" headers.
Image

Here used straight and angle mixed. The programmer plugs in at the end. The jumper links the TX and RX pins together when the Dynamixel bus is connected. I also removed the Vcc pin from the programmer header. The two bent pins in the middle are to connect to the I2C pins (A4, A5) which I use, they are not on the .1" grid.

I expect your setup will be more simple, but here is a prototype baseboard which has all the functions of the CM730, but works on the dynamixel bus. It enables Darwin-OP software to run on AX robots without a CM730.
Image

This shows the Dynamixel interface:

Image

The connectors can be straight or 90 degree:
http://uk.rs-online.com/web/p/products/6878124/?searchTerm=687-8124&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D3638372D383132342677633D4E4F4E4526
http://uk.rs-online.com/web/p/products/6878124/?searchTerm=687-8124&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D3638372D383132342677633D4E4F4E4526

Resistor and diodes are added for protection (47R and 2 off 1N4148).

Depending on how you mount you will need some perf board and some sockets for the .1" headers. Plus whatever you want to connect of course. On my board I have a Sparkfun 6DOF digital IMU connected over I2C, this is the reason for the rather bulky 3.3V regulator and the 4 FET for level conversion. The 4 pin plug connects to 3 off BlinkM MinM RGB LEDs for the Eye and Head LED on Darwin.

I hope this helps to complete your ordering. Let me know if not.
For the pins you can use straight or right angle .1" headers.
Image

Here used straight and angle mixed. The programmer plugs in at the end. The jumper links the TX and RX pins together when the Dynamixel bus is connected. I also removed the Vcc pin from the programmer header. The two bent pins in the middle are to connect to the I2C pins (A4, A5) which I use, they are not on the .1" grid.

I expect your setup will be more simple, but here is a prototype baseboard which has all the functions of the CM730, but works on the dynamixel bus. It enables Darwin-OP software to run on AX robots without a CM730.
Image

This shows the Dynamixel interface:

Image

The connectors can be straight or 90 degree:
http://uk.rs-online.com/web/p/products/6878124/?searchTerm=687-8124&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D3638372D383132342677633D4E4F4E4526
http://uk.rs-online.com/web/p/products/6878124/?searchTerm=687-8124&relevancy-data=636F3D3126696E3D4931384E525353746F636B4E756D6265724D504E266C753D656E266D6D3D6D61746368616C6C26706D3D5E5C647B337D5B5C732D2F255C2E5D5C647B332C347D2426706F3D313426736E3D592673743D52535F53544F434B5F4E554D424552267573743D3638372D383132342677633D4E4F4E4526

Resistor and diodes are added for protection (47R and 2 off 1N4148).

Depending on how you mount you will need some perf board and some sockets for the .1" headers. Plus whatever you want to connect of course. On my board I have a Sparkfun 6DOF digital IMU connected over I2C, this is the reason for the rather bulky 3.3V regulator and the 4 FET for level conversion. The 4 pin plug connects to 3 off BlinkM MinM RGB LEDs for the Eye and Head LED on Darwin.

I hope this helps to complete your ordering. Let me know if not.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by sdeba » Tue Nov 15, 2011 9:20 pm

Post by sdeba
Tue Nov 15, 2011 9:20 pm

Thank you for detailed information. I've ordered all needed things, so I just must to wait for them. Can you post the picture of the bottom of your perf board (connections)?

Edit: And if you could post me your I/O AVR Project, then I'll be grateful ;)
Thank you for detailed information. I've ordered all needed things, so I just must to wait for them. Can you post the picture of the bottom of your perf board (connections)?

Edit: And if you could post me your I/O AVR Project, then I'll be grateful ;)
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Wed Nov 16, 2011 3:13 pm

Post by i-Bot
Wed Nov 16, 2011 3:13 pm

The connections for the Dynamixel bus to the Arduino Pro Mini I used were:
Image
and wired:
Image

The Bioloid IO code is here as an AVR Studio 5 project. No need to use a makefile.
http://robosavvy.com/Builders/i-Bot/HUV%20IO.zip

Files needed are collected from the bioloid-io, common and common/avr directories.

You don't need to do anything with the bootloader, it is preloaded in the Pro Mini.

I made minor changes to the Bioloid IO code:
* added #define CFG_CPU_CLOCK 16000000 in config.h
* changed LED to the green one on Pro Mini
* fixed error in checksum in latest bioloid-pkt.c. I don't know what happened here, the later SVN version changes broke it.
* increased size of #define NUM_CONTROL_ENTRIES 50
#define MAX_CONTROL_ENTRY 49 to make compatible with Roboplus Dynamixel Wizard.
You might also want to load the latest Arduino environment. This will work on the Pro Mini too, but probably not with a 1M Dynamixel bus. It is great for debugging any IO code you may want to graft onto the bioloid-io code.
The connections for the Dynamixel bus to the Arduino Pro Mini I used were:
Image
and wired:
Image

The Bioloid IO code is here as an AVR Studio 5 project. No need to use a makefile.
http://robosavvy.com/Builders/i-Bot/HUV%20IO.zip

Files needed are collected from the bioloid-io, common and common/avr directories.

You don't need to do anything with the bootloader, it is preloaded in the Pro Mini.

I made minor changes to the Bioloid IO code:
* added #define CFG_CPU_CLOCK 16000000 in config.h
* changed LED to the green one on Pro Mini
* fixed error in checksum in latest bioloid-pkt.c. I don't know what happened here, the later SVN version changes broke it.
* increased size of #define NUM_CONTROL_ENTRIES 50
#define MAX_CONTROL_ENTRY 49 to make compatible with Roboplus Dynamixel Wizard.
You might also want to load the latest Arduino environment. This will work on the Pro Mini too, but probably not with a 1M Dynamixel bus. It is great for debugging any IO code you may want to graft onto the bioloid-io code.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by i-Bot » Wed Nov 16, 2011 3:57 pm

Post by i-Bot
Wed Nov 16, 2011 3:57 pm

A couple if things I forgot.

If you use the FTDI cable you must set the RTS on close bit as described here:http://www.arduino.cc/en/Guide/ArduinoProMini

When you use ARP uploader you need to edit the baudrate from 19200 to 57600 in the AVR Dude params textbox as described here:
http://www.babuinoproject.com/blog/?paged=3
You will be uploading the HUV IO.hex from the debug directory in AVR studio.
A couple if things I forgot.

If you use the FTDI cable you must set the RTS on close bit as described here:http://www.arduino.cc/en/Guide/ArduinoProMini

When you use ARP uploader you need to edit the baudrate from 19200 to 57600 in the AVR Dude params textbox as described here:
http://www.babuinoproject.com/blog/?paged=3
You will be uploading the HUV IO.hex from the debug directory in AVR studio.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by sdeba » Wed Nov 16, 2011 10:38 pm

Post by sdeba
Wed Nov 16, 2011 10:38 pm

Thanks for connection schemes ;) All parts will be delivered probably on friday, so I'll be trying to do something during the weekend.

There is one question which came to my mind today. I am not using battery pack, because it was broken, so my CM-5 is powered by power supply which outputs 12V. The Arduino board is 5V and will be connected to CM-5 power. Isn't it a problem?

Other questions will probably appear when I'll start connecting and programming this whole thing. Anyway thank you for your help, I'm very excited ;)

Edit: I've just looked into the code. There is a lot of it, thought it'll be shorter. Anyway all this c files will be compiled into one hex file. Then I'll need to upload it onto Arduino board. And what exacly it'll provide to me?
Thanks for connection schemes ;) All parts will be delivered probably on friday, so I'll be trying to do something during the weekend.

There is one question which came to my mind today. I am not using battery pack, because it was broken, so my CM-5 is powered by power supply which outputs 12V. The Arduino board is 5V and will be connected to CM-5 power. Isn't it a problem?

Other questions will probably appear when I'll start connecting and programming this whole thing. Anyway thank you for your help, I'm very excited ;)

Edit: I've just looked into the code. There is a lot of it, thought it'll be shorter. Anyway all this c files will be compiled into one hex file. Then I'll need to upload it onto Arduino board. And what exacly it'll provide to me?
sdeba
Savvy Roboteer
Savvy Roboteer
Posts: 31
Joined: Sat Nov 12, 2011 9:00 pm

Post by i-Bot » Wed Nov 16, 2011 11:15 pm

Post by i-Bot
Wed Nov 16, 2011 11:15 pm

The Dynamixel bus power is 12 volts and this goes to the raw input of the Arduino. The voltage regulator on the Arduino drops this to 5 volts. The data signal levels on the Dynamixel bus are 5 volt, so no problem there. The regulator on the Arduino is fairly small, enough to drive small add ons, but not motors directly.

The IO board has 6 analog inputs, 4 digital input/outputs, and 2 motor drives. The registers are described here:
http://www.bioloid.info/tiki/tiki-index.php?page=Bioloid+IO+Board+Documentation

I will check the port pin mapping tomorrow.

You can put sensors on the analog or digital ports. For IMU, it may be better to use the IMU code instead.

What sensors do you want to connect ?
The Dynamixel bus power is 12 volts and this goes to the raw input of the Arduino. The voltage regulator on the Arduino drops this to 5 volts. The data signal levels on the Dynamixel bus are 5 volt, so no problem there. The regulator on the Arduino is fairly small, enough to drive small add ons, but not motors directly.

The IO board has 6 analog inputs, 4 digital input/outputs, and 2 motor drives. The registers are described here:
http://www.bioloid.info/tiki/tiki-index.php?page=Bioloid+IO+Board+Documentation

I will check the port pin mapping tomorrow.

You can put sensors on the analog or digital ports. For IMU, it may be better to use the IMU code instead.

What sensors do you want to connect ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Next
57 postsPage 1 of 41, 2, 3, 4
57 postsPage 1 of 41, 2, 3, 4