Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: TIMER2 ISR not working on: September 18, 2014, 11:17:57 am
hat to use TIMER2_COMPA_vect, not OVF
2  Using Arduino / Programming Questions / Re: TIMER2 ISR not working on: September 18, 2014, 10:32:39 am
I want a compare interrupt that triggers the ISR

either i have an ISR with a simple overflow
or I have a compare but the ISR is no triggered

I dont get it, I should be able to do both

3  Using Arduino / Project Guidance / Re: Stepper Motor barely moving on: September 18, 2014, 10:30:35 am
The datasheet says 2,5mNm pullout torque. That's not very much. If you think of that a hard tightening with a "normal" screwdriver is about 2,5Nm you get 1/1000 of that. So there is nothing strange about you being able to stop the screw with your fingers

I found this one but it is in kg/cm so I dont know if this is stronger or what

http://www.myrcmart.com/rcx-s1502-micro-linear-servo-15g-012sec-02kg-left-right-combo-p-4037.html

edit : after calculation (1nm=10kg/cm), it should be like 8 times stronger...
4  Using Arduino / Project Guidance / Re: Stepper Motor barely moving on: September 18, 2014, 09:58:33 am

I use a lab power supply for the 5V to the motor and the l298 is commanded via a 595 serialy interfaced to the arduino (I already

As far as I know there is a considerable voltage drop in the L298. Maybe you need a higher voltage to get 5v to the motor coils?

Post a diagram of how you have things connected (a photo of a pencil sketch will be fine)
Post your code and please use the # button
Code:
so it looks like this

...R

lol, I already been told l298 were weak, wonder why they have been engineered and sold

but he motor sometimes get hot,so I guess it is not a voltage issue

the l298 schematic I used is really basic, commands come from the arduino (via 595) and a lab power suppliy is giving the VSS to the motor coils

Guess I'll have to find another actuator..sh!t...
5  Using Arduino / Programming Questions / TIMER2 ISR not working on: September 18, 2014, 09:54:35 am
I cant have an ISR working on timer 2

Code:
int val=0;
ISR(TIMER2_OVF_vect)
{
    digitalWrite(13, val);
    val=1-val;
}

void setup()
{
    pinMode(13,OUTPUT);
    // initialize Timer1
    cli();             // disable global interrupts
    TCCR2A = 0;     // set entire TCCR1A register to 0
    TCCR2B = 0;     // same for TCCR1B
   
    // Set CS10 and CS12 bits for 1024 prescaler:
    //so we divide our clock source by 1024. This gives us a timer resolution of 1/(16*10^6 / 1024), or 6.4e-5 seconds.
    TCCR2B |= (1 << CS20);
    TCCR2B |= (1 << CS22);

    // (target time) = (timer resolution) * (# timer counts + 1)
    // set compare match register to desired timer count:
    OCR2A = 31; // -> 500 times per sec

    // turn on CTC mode: Clear Timer on Compare Match. Instead of counting until an overflow occurs, the timer compares its count to a value that was previously stored in a register.
    TCCR2A |= (1 << WGM21);

    // enable Timer2 overflow interrupt: Setting the TOIE1 bit tells the timer to trigger an interrupt when the timer overflows
    //TIMSK2 = (1 << TOIE1);
    // enable timer compare interrupt:
    TIMSK2 |= (1 << OCIE2A);
   
    //  actual 8 bits counter
    TCNT2 =0;
    // enable global interrupts:
    sei();
   

any help would be appreciated

thanks
6  Using Arduino / Project Guidance / Stepper Motor barely moving on: September 18, 2014, 08:26:20 am
Hello,

I have issues driving a pl15s-020   http://robocup.idi.ntnu.no/wiki/images/c/c6/PL15S020.pdf

the problem is that the motor barely moves
the torques is almost null, I can stop the rotating screw by barely touching it

I found the optimal delay between phase changes is between 1000 and 1500 microseconds

I use a lab power supply for the 5V to the motor and the l298 is commanded via a 595 serialy interfaced to the arduino (I already tested successfuly my setup with dc motors before)

any recomendation would be appreciated

thanks
7  Using Arduino / Motors, Mechanics, and Power / Re: newbie to servo's on: May 27, 2014, 10:02:23 am
Quote
do servo with feedback exist ?
Yes they are not common and they are very expensive. They tend to communicate through serial commands and can report back there position. I saw one the other week and it cost $220. It was the RX28 from Dynamixel.


or this : http://forums.trossenrobotics.com/tutorials/how-to-diy-128/get-position-feedback-from-a-standard-hobby-servo-3279/

:-)
8  Using Arduino / Motors, Mechanics, and Power / Re: newbie to servo's on: May 27, 2014, 09:57:26 am
do servo with feedback exist ?

Adafruit have this one

indeed, nice, one can even do this on any servo, it's just a wire soldered to the servo's potentiometer :-)
9  Using Arduino / Motors, Mechanics, and Power / Re: newbie to servo's on: May 27, 2014, 09:33:47 am
Basically it can't. You normally leave a delay so that you assume it is in the right position.

do servo with feedback exist ?

the servo/arduino main page says the library can deal with many different servo motros types,
how do i set these up regarding wich motors i'll buy ???
10  Using Arduino / Motors, Mechanics, and Power / newbie to servo's on: May 27, 2014, 09:25:24 am
hello,

i wanted to use servo motors but i have a few noob questions

- how to chose a servo : i need to make something turn around a pivot as -90°<>0°<>+90° for instance
- how can a simple pwm wire control a servo, does it encode the required degree ? i dont get it
- how does the MCU to assert that the servo is in the requested position ?
- the servo/arduino main page says the library can deal with many different servo motros types,
how do i set these up regarding wich motors i'll buy ???

thx
11  Using Arduino / Programming Questions / Re: Serial differenciation... on: April 10, 2014, 05:42:53 am
...The Arduino has the DTE signal hardwired into the reset circuit....

so what would be usefull is that when i run my C++ code, i engage the reset on the arduino
(and then wait a while that the bootloader finishes)

so what is the chain of states do i need to put the DTE(DTR?) line ?

high, low, high/low, low/high ??

[edit : ok i got his in C++  (i use termios.h for communication)

    /* sets the baud rate to 0 => (hangup) => DTR=LOW => DTE(computer) not present => arduino reset */
    cfsetospeed(&oldtio, B0);
    cfsetispeed(&oldtio, B0);
    tcsetattr(fd,TCSANOW,&oldtio);
    sleep(1);

it is actualy engaging the arduino reset :-) yeay
]
12  Using Arduino / Programming Questions / Re: Serial differenciation... on: April 10, 2014, 05:37:25 am
Quote
well that's an issue..that i was expecting, hence my question
one is supposed to be able to send any kind of data through serial interface
i guess i'll have to use Serial1 instead
You're not paying attention. The "!!!" sequence is ONLY an issue if you have a Mega bootloader AND it's an issue ONLY when the bootloader is receiving the data. The bootloader will NOT be running when your code is running AND you can't upload code on Serial1

ok, that's right sorry about the mistake, indeed it concerns the bootloader...

i was talking about Serial1 for communication, not for code upload :-)
13  Using Arduino / Programming Questions / Re: Serial differenciation... on: April 10, 2014, 03:35:29 am

Two caveats:
1)  The sequence "!!!"  (three exclamation marks without the double quotes and without anything intervening) in the uploaded code means something special to the bootloader, so do NOT have this sequence in your program.


well that's an issue..that i was expecting, hence my question
one is supposed to be able to send any kind of data through serial interface
i guess i'll have to use Serial1 instead

thanks for the infos
14  Using Arduino / Programming Questions / Serial differenciation... on: April 09, 2014, 01:35:19 pm
Hello,

i try to understand how the serial interface(usb) is actualy making a difference between the things i send and receive during my program runtime, and the data that are sent/received during code upload

what if the data i send correspond to some binary sequence that will trigger the code upload functions in the arduino firmware ?

i just dont get it

thx
15  Using Arduino / Programming Questions / Re: adressing data from assembler on: April 08, 2013, 08:06:42 am
Quote
i am optimizing my code with inline assembler

Why?

i need fast refresh, and with c code, the led panel flickers
arduino is not that fast
Pages: [1] 2