Loading...
  Show Posts
Pages: [1] 2 3 ... 6
1  International / Deutsch / Re: Nochmal kurz Hilfe bei meinem Punktschweißgerät on: May 04, 2013, 09:40:37 am
Hallo Günther,

danke Dir für die Antwort.
Ich wollte es gerade mit Pin13 als "Fetpin" ausprobieren, aber jetzt habe ich beim Hochladen "avrdude: stk500_getsync(): not in sync: resp=0x00"
als Antwort bekommen, von 2 unterschieldichen Rechnern. Der Nano wird aber nicht heiss, wie mein letzter. Ich habe auf keine Blödsinn mit Überspannung etc gemacht.
Ich muss jetzt leider erst nach einer Lösung dafür suchen und dann das mit dem Gerät selbst ausprobieren.

Der Fet-Pin (D4) selbst war auf alle Fälle defekt. im Low Zustand habe ich da 0,25V gemessen und High 0,75. Alles sehr merkwürdig.
2  International / Deutsch / Re: Nochmal kurz Hilfe bei meinem Punktschweißgerät on: May 04, 2013, 08:05:17 am
Hallo,

ich habe jetzt festgestellt, dass an meinem Arduino der Pin 3 nicht richtig funktioniert. Low waren ca 0,25V und HIGH 0,75V.
Deswegen hat wohl der Fettreiber nicht richtig durchgeschaltet. Ich habe es auf Pin 5 geändert.

Mein Mini-Programm habe ich leider trotzdem noch nicht im Griff.
Ich bin schon echt am Verzweifeln und weiß einfach nicht, wo der Fehler liegt.
Ein Kumpel hat mit das Programm umgeschrieben.
Aber es geht irgendwie immer noch nicht.
Mit einem reinen Delay zum Blinken funktioniert die Schaltung.

Code:
// Pin naming
int fetPin =  5;     
int TriggerPin = 4;

// durations in ms - 1: first pulse, 2: pause, 3: second pulse
unsigned long duration1 = 10;
unsigned long duration2 = 10;
unsigned long duration3 = 30;

void setup()
{
// declaring pins as input and output (& set mosfet out to LOW)
pinMode(TriggerPin, INPUT_PULLUP);
pinMode(fetPin, OUTPUT);
digitalWrite(fetPin, LOW);

Serial.begin(9600);
}

void loop()
{
// Serial.print(fetPin);
// Serial.print(TriggerPin);

// check trigger state for LOW (& debounce)
if (!digitalRead(TriggerPin))
{
// debounce delay
delay(10);

// check trigger state again
if (!digitalRead(TriggerPin))
{
// first pulse
digitalWrite(fetPin, HIGH);
delay(duration1);

// pause
digitalWrite(fetPin, LOW);
delay(duration2);

// second pulse
digitalWrite(fetPin, HIGH);
delay(duration2);

// switch mosfets off - avoid shortcut
digitalWrite(fetPin, LOW);

// wait for trigger release
while(!digitalRead(TriggerPin));
}
}
}
3  International / Deutsch / Re: Nochmal kurz Hilfe bei meinem Punktschweißgerät on: April 26, 2013, 12:40:39 pm
Hallo,

ich habe die Strichpunkte direkt nach den if-Abfragen entfernt.
Es geht aber leider immer noch nicht :-(


Code:
// Pin naming

int fetPin =  3;     
int TriggerPin = 4;

int lastButtonState = HIGH;

long duration1 = 20; 
long duration2 = 50;
long duration3 = 100;

int readingtrigger;

int TriggerState = HIGH;
int lastTriggerState = HIGH;
unsigned long lastDebounceTime = 0; 
unsigned long triggertime = 0;

void setup()
{
  // declaring pins as input and output
  pinMode(fetPin, OUTPUT);
  pinMode(TriggerPin, INPUT_PULLUP); 
 
 Serial.begin(9600);
}

void loop()
{
Serial.print(fetPin);
Serial.print(TriggerPin);


  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == HIGH)
  {
    lastDebounceTime = millis();
    lastButtonState = readingtrigger;
    delay(50);
  }

  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == LOW && triggertime == duration1 + duration2 + duration3 + 300)
  {
    TriggerState = LOW;
    triggertime = millis();
  }

  // switching on

  if (TriggerState == LOW && millis() < duration1 || TriggerState == LOW && duration1 + duration2 < triggertime < duration1 + duration2 + duration3)
  {
    digitalWrite(fetPin, HIGH);
  }
 
    // switching off
    if (duration1 < millis() - triggertime < duration1 +duration2 || duration1 + duration2 + duration3 < millis() - triggertime)
  {
    digitalWrite (fetPin, LOW);
  }
  }
4  International / Deutsch / Re: Nochmal kurz Hilfe bei meinem Punktschweißgerät on: April 26, 2013, 05:46:03 am
Hallo Uwe und Günther,

ich habe das mit dem Delay ausprobiert.
Da schalten die Fets wunderbar und ich bekomme auch meine Schweißpunkte.

Angeschlossen ist also alles richtig.

Der Taster liegt auf Masse und auf Pin4, die er verbindet, wenn gedrückt.

Ich bin mir sicher, dass es ein Fehler im Programm ist.
Wenn ich es nicht mit Delay mache, sondern das Programm hier hochlade, schalten die Fets anscheinend ständig sehr schnell hin und her.

Ich muss da irgendwie einen Denkfehler drin haben.

Was ich möchte ist Folgendes:
Wenn ich den Taster drücke, sollen die Fets 20ms auf, 50ms zu und dann wieder 100ms aufmachen und schließlich ganz zu.
Es soll also zwei kurze Schweißimpulse mit einer kleinen Pause dazwischen geben.

Code:
// Pin naming

int fetPin =  3;      
int TriggerPin = 4;

int lastButtonState = HIGH;

long duration1 = 20;  
long duration2 = 50;
long duration3 = 100;

int readingtrigger;

int TriggerState = HIGH;
int lastTriggerState = HIGH;
unsigned long lastDebounceTime = 0;  
unsigned long triggertime = 0;

void setup()
{
  // declaring pins as input and output
  pinMode(fetPin, OUTPUT);
  pinMode(TriggerPin, INPUT_PULLUP);  
  
 Serial.begin(9600);
}

void loop()
{
Serial.print(fetPin);
Serial.print(TriggerPin);


  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == HIGH)
  {
    lastDebounceTime = millis();
    lastButtonState = readingtrigger;
    delay(50);
  }

  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == LOW && triggertime == duration1 + duration2 + duration3 + 300);
  {
    TriggerState = LOW;
    triggertime = millis();
  }

  // switching on

  if (TriggerState == LOW && millis() < duration1 || TriggerState == LOW && duration1 + duration2 < triggertime < duration1 + duration2 + duration3);
  {
    digitalWrite(fetPin, HIGH);
  }
  
    // switching off
    if (duration1 < millis() - triggertime < duration1 +duration2 || duration1 + duration2 + duration3 < millis() - triggertime);
  {
    digitalWrite (fetPin, LOW);
  }
  }
5  International / Deutsch / Re: Nochmal kurz Hilfe bei meinem Punktschweißgerät on: April 24, 2013, 03:54:58 pm
Ja, hatte ich.

Gibt es denn eine praktische Software, mit der ich so ein Schaltbild am besten male?
6  International / Deutsch / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 24, 2013, 03:54:12 pm
Es steht Arduino Nano V3.0 drauf.
Ich dachte aber, ich hätte damals vielleicht einen von Sainsmart gekauft.
Anscheinend aber doch einen richtigen Arduino.

Das mit Arduino und den Fälschungen verstehe ich nicht ganz. Ich dachte, das wäre alles Open Source. Wenn das nicht so ist, passe ich da in Zukunft besser auf.
7  International / Deutsch / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 24, 2013, 12:28:45 pm
Ich habe das Problem jetzt etwas eingekreist.

Es scheint daran zu liegen, dass ich +12V und den USB Anschluss gleichzeitig an dem Sainsmart Nano angeschlossen hatte.
Seitdem wird der Chip heiss und es lässt sich nichts hochladen.

Kann ich das irgendwie reparieren? Hat jemand einen Tipp für mich?
8  International / Deutsch / Re: avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 24, 2013, 10:33:55 am
Verpolt habe ich ganz sicher nichts. Ich habe 5 mal kontrolliert. Ich habe alles in ausgeschaltetem Zustand angeschlossen.

Ja, er wird im Gerätemanager erkannt und das USB- Ding Dong Geräusch kommt auch.

Ja, der MEGA Chip wird sehr warm, das geht nach dem Anstecken sehr schnell.
9  International / Deutsch / avrdude: stk500_getsync(): not in sync: resp=0x00 on: April 24, 2013, 10:05:20 am
Hallo,

ich bekomme beim Hochladen auf meinen Arduino Nano diese Fehlermeldung:

avrdude: stk500_getsync(): not in sync: resp=0x00

Wenn ich den Nano an USB anschließe wird der Chip sehr warm und die LEDs leuchten nur kurz auf.
Ich hatte Vin an 12V und  GND an Masse eines Akkus angeschlossen.
Kann ich damit was kaputt gemacht haben, oder spinnt da was?
Ist mein Arduino kaputt?
10  International / Deutsch / Nochmal kurz Hilfe bei meinem Punktschweißgerät on: April 24, 2013, 09:30:33 am
Ich finde meinen anderen Thread leider nicht mehr, deswegen mache ich hier kurz einen neuen.

Ich habe den ganzen für die Grundfunktion überflüssigen Code gelöscht.
Ich habe einen Taster zwischen Mass und Pin D4.
Der Mosfet-Treiber (MCP 1407) hängt mit seinem Eingang an D3.
Masse und Vin des Mosfets-Treibers liegen auf +5V und Masse des Arduino.
Der Arduino wird von einem Akku (12,2V) mit angeschlossenem Netzteil versorgt.
Die Fets hängen an dem Akku und die Gates parallel am Treiber.
Ein Wippschalter ist noch zwischen die Stromversorgung des Arduino geschaltet, damit man ihn ausschalten kann
Ich messe an Pin3 immer nur 0,3V.
Der Taster zur Verbindung mit Masse funktioniert aber.
Habe ich im Code einen Fehler?

Code:
// Pin naming

int fetPin =  3;     
int TriggerPin = 4;

int lastButtonState = HIGH;

long duration1 = 50; 
long duration2 = 50;
long duration3 = 200;

int readingtrigger;

int TriggerState = HIGH;
int lastTriggerState = HIGH;
unsigned long lastDebounceTime = 0; 
unsigned long triggertime = 0;

void setup()
{
  // declaring pins as input and output
  pinMode(fetPin, OUTPUT);
  pinMode(TriggerPin, INPUT_PULLUP); 
}

void loop()
{
  // debouncing the Trigger
  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == HIGH)
  {
    lastDebounceTime = millis();
    lastButtonState = readingtrigger;
    delay(50);
  }

  readingtrigger = digitalRead(TriggerPin);
  if (readingtrigger == LOW && lastButtonState == LOW && triggertime == duration1 + duration2 + duration3 + 300);
  {
    TriggerState = LOW;
    triggertime = millis();
  }

  // switching on

  if (TriggerState == LOW && millis() < duration1 || TriggerState == LOW && duration1 + duration2 < triggertime < duration1 + duration2 + duration3);
  {
    digitalWrite(fetPin, HIGH);
  }
 
    // switching off
    if (duration1 < millis() - triggertime < duration1 +duration2 || duration1 + duration2 + duration3 < millis() - triggertime);
  {
    digitalWrite (fetPin, LOW);
  }
  }
11  Using Arduino / Project Guidance / Re: Bike shifter: direct servo, trigger shifter of grip shift? on: April 10, 2013, 07:28:02 am
I think you still misunderstand a few things.

The shifter would not be mounted to the handlebar, but about 40cm away from the derailleur inside the frame of the bike.
I have a large aluminium compartment there, where the battery etc. goes.
That compartment is already there.
The adruino to do handle the controls also already exists.

The trigger shifter will be inside the frame close to the saddle (very short distance from the derailleur and no unnecessary bends in the bowden cable make the forces minimal)

The trigger shifter requires much less force than the bowden cable itself. The servo will have to pull 2cm and it's not that hard to push. I ordered a strong RC servo already.  Once it's here, we'll see if it works.

Shimano makes an electric shifter already, but it is prohibitively expensive. I don't find the idea too stupid. It will clean up the handlebar and give me the ability to shift from the regular handlebar and the trial bar without having to reach down.
12  Using Arduino / Project Guidance / Re: Bike shifter: direct servo, trigger shifter of grip shift? on: April 06, 2013, 06:31:03 pm
Oh, you misunderstand the intention of the gripshift.

The gripshift was supposed to be turned by the servo instead of the servo pulling the bowden wire directly.

No matter how the mechanics work, there will always be 2 buttons on the handlebar for controls. That's a given.

At this point I believe the best approach in terms of mechanics is using a trigger shifter.

Here are my reasons:

- simple controls (pull motor1 once: shift up, pull motor2 once: shift down)
- The positions of the gear will always be in fixed positions (no fine tuning required)
- The end positions in case of failures will not be exceeded. If the motor pulls too often, it wil pull another 2mm, but won't snap in, so nothing will break
- Once a gear is selected, no energy is required to keep it in place
- Tuning the length of the bowden wire is very simple and already built in.

So from a mechanical standpoint, all I need to find is two light actuators, that are strong enough to pull the triggers (down trigger is just a release and needs virtually no power) and have enough travel (2cm if pulled on the outside, less if further inside)

Maybe one small servo that pulls one trigger if turned right and the other if turned left would be ideal. Then it would only take one motor for both jobs.

13  International / Deutsch / Re: Mein erstes Projekt: Ein Punktschweißgerät zum Akkus bauen on: April 06, 2013, 05:54:37 am
Hi,

bedeutet das ich könnte den Schalter einfach zwischen den Pin und GND legen, ohne den Widerstand und den Anschluss an +5V?
Oder brauche ich echt für jeden Taster einen Widerstand? Kann doch nicht sein, oder?

Danke für den Tipp mit dem Delay.
Es war trotzdem keine schlechte Übung, das mal so zu Programmieren. :-)
Ist ja mein erstes mal.
Ich sehe da einige Dinge, die eigentlich viel kürzer gehen müssten.

Siehst Du, warum sich die Zeit nicht steuern lässt?
14  Using Arduino / Project Guidance / Re: Bike shifter: direct servo, trigger shifter of grip shift? on: April 05, 2013, 09:58:09 pm
I have that figured out.

I want to use the gripshift shifter and turn the the grip using a high torque RC motor like this one
http://www.tfl-hobby.de/product_info.php?info=p458_spring-servo-30-kg--sm-s8166m.html

The torque they produce will be more than enough.
I still don't understand the controls exactly. Do you give the servo 6V and whatever current you can for a set amount of time, which is supposed to determine the position, or is there another way to set the travel?
What happens afterwards? Does it stay in position or go back to its original one?
If it goes back, I'll definitely have to use a shifter.
However it might be easier to control 2 actuators with 2 triggers, one to go up and one down.
They' each need to pull some 2 cm.
With the gripshift, I would have to be able to set a certain positon in degrees, that it's going to move to.
15  Using Arduino / Project Guidance / Re: Bike shifter: direct servo, trigger shifter of grip shift? on: April 05, 2013, 05:14:46 pm
Hi,

I'm building an ebike with more than enough power to get me anywhere at any gear.
Worst case scenario (1000Wh battery and gear shifter fails) I'll have to push up the hill to my home.
I don't need to shift too much.

I might program a long push to go into the highest gear directly as this is, where I'm gonna be most of the time.

So the electric system will completely replace the manual one, it's not that big a deal.

Do I need a special type of servo for the arduino to know it's current position?
What materials would I need? Servo motor, arduino, power supply, control buttons... anything else?
If the servo gets a direct drive transmission, it'll be around 180° for all 9 positions.

I'm only just beginning to learn how to program. I'd appreciate any pointers and help you could offer.
Pages: [1] 2 3 ... 6