Author Topic: does anyone get this?  (Read 3208 times)

0 Members and 1 Guest are viewing this topic.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
does anyone get this?
« on: October 14, 2009, 05:24:04 AM »
can someone help me on this?
the schematic is out of focus and I really dont ger the data sheet.
also do I use it just like a servo or do I have to control it in some special way
http://www.sparkfun.com/commerce/product_info.php?products_id=8905
« Last Edit: October 14, 2009, 05:27:16 AM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: does anyone get this?
« Reply #1 on: October 14, 2009, 08:38:58 AM »

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #2 on: October 14, 2009, 03:29:00 PM »
can you please explian how to use it?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: does anyone get this?
« Reply #3 on: October 14, 2009, 04:49:27 PM »
Well it has A inputs and B inputs, along with corresponding outputs, this basically says to me that you can have a motor connected to the outputs of a channel and control it with the inputs that correspond to it (one HIGH and one LOW to get a movement from the motor). The PWM for the both channels, I'd assume, would give you a method of controlling the motors speed. Read the datasheet on the range of frequencies that works with it.

This is based on my what I'm just seeing as I look at the picture.

Hope that could provide some help. :)

P.S. This chip requires power from a 5V regulator into VCC, along with your motor power (VMOTOR). Make sure you check its maximum current ratings per channel and its voltage ratings.
Kurt

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: does anyone get this?
« Reply #4 on: October 14, 2009, 06:01:13 PM »
They are bit bit lacking on how to use this board. I did a google search on the chip part number and found a readable data sheet here:
http://www.semicon.toshiba.co.jp/docs/datasheet/en/LinearIC/TB6612FNG_en_datasheet_080509.pdf

At least Pololu labeled their board to match Toshiba's data sheet.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #5 on: October 17, 2009, 01:32:16 PM »
can someone explain what each input/ output port is/does?
still kindof confusing, but I can no read the data sheet
I know this is a lot, but how would I program it?
No specific C code, This will be used on a BS2 bot
« Last Edit: October 17, 2009, 01:34:48 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: does anyone get this?
« Reply #6 on: October 17, 2009, 07:46:36 PM »
Inputs take standard digital logic from the BS2

Go to page 4 of the datasheet waltr linked, there is a table of when certain things are high/low what is the output.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #7 on: October 18, 2009, 03:06:45 PM »
I know I'm being very noobish, but lilke I put the signal cable of the servo output from the mcu where? and the + and ground of the output?
+ & - of motors?
I know I'm asking a lot, but please help.
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: does anyone get this?
« Reply #8 on: October 19, 2009, 12:29:07 PM »
You can control it in 2 different ways (my WebbotLib implements both of these methods for C developers).

Method 1:
For motor 1 - send a PWM signal to PWMA and use AIN1 and AIN2 to control the direction of the motor. You need to make sure that if AIN1 is high then AIN2 is low, and if AIN1 is low then AIN2 is high - one combination gives clockwise rotation and the other is anti-clockwise. To brake then set AIN1=high and AIN2=high.
For motor 2 - do the same as above but using PWMB, BIN1, BIN2
So this method requires 1 PWM pin and 2 I/O pins from your mcu for each motor


Method 2:
Connect PWMA and PWMB to 'high' (ie +5v)
For motor 1 - send a PWM signal to AIN1 and keep AIN2 high to rotate in one direction. To rotate in the other direction keep AIN1 high and send a PWM signal to AIN2. To brake then set AIN1 and AIN2 high.
For motor2 - do the same as above but using BIN1 and BIN2
So this method requires 2 PWM signal per motor and no additional I/O pins - but is a lot harder to write the program !

The choice is up to you but Method 1 is the easiest to program.

If any C developer is interested in Method 2 then either use WebbotLib  ;D or there is a code example tucked away somewhere in the Baby Orangutan 328P documentation as that board has this motor controller built onto the board.

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline TeslaHV9

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: does anyone get this?
« Reply #9 on: October 21, 2009, 01:49:26 PM »
Webbot,

Can you apply the same concept to Nitonol (muscle) wire? If not than how do you make controller for nitonol? It would need to control the voltage and keep a steady voltage (DC).

Thanks
-Tesla
"If we knew what we were doing it would not be called research." A. Einstein

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: does anyone get this?
« Reply #10 on: October 21, 2009, 05:20:50 PM »
Tesla, the PWM outputs a square wave, it is not an analog voltage that you can control. However, since the nitinol wire works by heat and not voltage, it should still work.

You will need some kind of mosfet or something though, you will burn out the pins on the microcontroller if you connect it directly to the nitinol.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #11 on: October 23, 2009, 03:30:41 PM »
on that topic, How much milliamps can an average mcu ( say a $50 buck board) supply?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: does anyone get this?
« Reply #12 on: October 23, 2009, 05:30:10 PM »
about 40mA max
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline TeslaHV9

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: does anyone get this?
« Reply #13 on: October 23, 2009, 07:32:19 PM »
Thanks for your  help Razor Concepts!


40ma is not even close to what dellagd and I need. The nitonal draws between 300ma-4 amps, depending on how thick it is. The rule of thumb is a miliamp per gram you want to lift.
"If we knew what we were doing it would not be called research." A. Einstein

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: does anyone get this?
« Reply #14 on: October 24, 2009, 08:16:48 PM »
Most things other than an led wont be able to run off the power from a pin...
Normally people just use a transistor and or a relay setup.
Howdy

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #15 on: October 27, 2009, 08:08:58 AM »
ok ok ok
so this is what I have so far
(picture attached)
but the pins on the schematic are different that the ones here?

now I'm more confused in a different way

(download the attached pic to see it)
« Last Edit: October 27, 2009, 08:15:55 AM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: does anyone get this?
« Reply #16 on: October 27, 2009, 11:44:46 AM »
The pins are not different, you're just looking at the wrong ones ;)
VM is actually connected to VMOT through a MOSFET and a diode.

VMOT  (V MOTor) is the motor voltage, connect it to your battery
A01 and A02 are output A, connect it to your first motor
B01 and B02 are output B, connect it to your second motor

Chelmi.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #17 on: October 27, 2009, 01:18:10 PM »
ok now I got everything except the whole mosfet diode thing
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: does anyone get this?
« Reply #18 on: October 27, 2009, 01:45:02 PM »
I think it's to protect from back EMF, but I don't really know what I'm taking about here :) Anyway you don't need to understand this to use the driver.
Soeren could probably explain it precisely.

Chelmi.

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #19 on: October 27, 2009, 04:21:30 PM »
well if I do infact need a external mosfet wait, is it external? or is it internal to the motor controller in which case it makes no difference to me. But everything I wrote on the schematic is correct? even the 9v battery connections?
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: does anyone get this?
« Reply #20 on: October 27, 2009, 09:29:35 PM »
No no no, you're are looking at the schematic of the board! everything you need is actually on the board, that the whole point of this board!
Just plug the motors, the battery and your MCU and you're done :)

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: does anyone get this?
« Reply #21 on: October 28, 2009, 11:19:52 AM »
Just for reference - the "mosfet diode thing" is there to protect against connecting the battery the wrong way around.

You also need to connect the STBY pin to something. If unconnected it will float low and put the chip into standby mode (power save). So you can either connect it to an output pin on your controller to switch between standby(low) or active(high); or if you dont want to have to do that then just connect it to Vcc
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: does anyone get this?
« Reply #22 on: October 28, 2009, 11:36:27 AM »
Just for reference - the "mosfet diode thing" is there to protect against connecting the battery the wrong way around.

Thanks for the clarification! A diode is not enough?

Chelmi.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: does anyone get this?
« Reply #23 on: October 28, 2009, 11:52:29 AM »
Just for reference - the "mosfet diode thing" is there to protect against connecting the battery the wrong way around.

Thanks for the clarification! A diode is not enough?

Chelmi.

My understanding is that its done with a mosfet because several amps may flow through it when the motors are running or changing direction. Also I think the voltage drop is less with a mosfet than a normal diode - but I'm happy to be corrected.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
Re: does anyone get this?
« Reply #24 on: October 28, 2009, 04:21:08 PM »
ok! now I get it! I do have thae battery hooked up the right way?
and here webbot says send a pwm signal
Quote
Method 1:
For motor 1 - send a PWM signal to PWMA and use AIN1 and AIN2 to control the direction of the motor. You need to make sure that if AIN1 is high then AIN2 is low, and if AIN1 is low then AIN2 is high - one combination gives clockwise rotation and the other is anti-clockwise. To brake then set AIN1=high and AIN2=high.

what pwm signal? Just any? or does it make a difference
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: does anyone get this?
« Reply #25 on: October 28, 2009, 05:11:41 PM »
You need to set up a PWM with about a 10kHz frequency - if its too low then you may get a hum from the motors.
The you just change the duty cycle to change the speed
If you're new to PWM then there are at least two tutorials in the members tutoirials section (one by me, and one by Airman)
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list