Jump to content

Pvt. KASA

Members
  • Posts

    54
  • Joined

  • Last visited

Reputation

16 Good

Contact Methods

Profile Information

  • About me
    Simpit builder
  • Location
    Somewhere in Germany
  • Interests
    KSP, Tinkering

Recent Profile Visitors

2,967 profile views
  1. I would love to have a fully working IVA, maybe even with VR support
  2. I think he uploaded a .png picture as that’s the extension in his error message
  3. A long time ago, all links to one filehoster were edited so the domain was removed but the rest is still there. (I think it was because the ads had adult content). II want to access one of these links but don’t know which domain to put there. Can you tell me what it was?
  4. I wanted to do it really simple, green when the engine is doing what it is supposed to do, yellow when there’s a deviation in thrust and red for failure. I wanted to make the complete ascent with the launcher automatic so I think it’s unnecessary to show the throttle level, but maybe I will do it different, I’m not sure yet.
  5. I also made a little bit of progress and made some panels out of clear acrylic. Some parts (everything except the windows) will be painted later. I also made some paper cutouts and a big piece of paper in the shape of the panel to play around with the arrangement. The last thing I did was working on the guidance computer.
  6. Hi there! I dont know if this has been answered yet but how many digits after the comma are there for the Rol, Pitch and Heading variables?
  7. No, I wrote my own 1 Wire Protocoll. I just connected 2 Arduino powered by USB and connected them with a single wire. I now know (thanks to the Logic Analyzer) that the only problem is the inaccurate timing of the Arduino. I think I will change the protocol on the receiver side to not just read every 1ms but to check how long a pulse is and the time in ms is the number of bits that are high or low. If i do it like this the small inaccuracies will have no impact. I hope you understood what i mean...
  8. How would you want to repair a logic analyzer without an logic analyzer? I think 1 Meter is ok, a bit longer may be better but if 1 meter is the max. length its ok. How do you do the layout? I found DraftCad, do you have an alternative?
  9. Logic Analyzers are awesome! I tried to troubleshoot my code for several hours, now my LA arrived and I fixed it in 2 minutes, I typed in the wrong value in the check for the first Bit (at the beginning of the message a 15ms long HIGH is sent and on the receiver side the controller checks for every high it gets if it is longer than 12ms and if it is, it thinks thats the start of the message. I typed in 1,2ms by accident and saw it immediately with the LA! @richfiles I would love to get a tape but shipping to Germany would be more expensive than hiring an artist to draw it by hand I assume. If it is ok with being folded you could put it in a letter... What does 1 tape cost without any shipping?
  10. I just found PulseIn on the Arduino Website. that looks like the thing I want. Just do a PulseIn, check if it is long so it is the Init Bit which is longer than the other, if it is do PulseIn and get the Individual Bits and if it isnt just continue listening if a long High comes along I also managed to program my Attinys with the Arduino. I tried it a few years ago with an Arduino Micro and didnt get it to work but with the Uno, it worked first try . Maybe I will fuse them so I can use the Reset pin as an IO Pin, then I would have enough Io pins for the Axis driver. I could only reset the fuse with an High Voltage programmer but I dont need an Reset pin, do I? Why do you need a reset pin at all if you could just cut the power and restart the chip? WOW! it looks like i did it! Transmitter: #define oneWirePin 9 // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 as an output. pinMode(oneWirePin, OUTPUT); } // the loop function runs over and over again forever void loop() { sendData(1,0,93); // < just a test message delay(16); } void sendData(boolean addr1, boolean addr2, int pos){ //transmit the init Bit digitalWrite(oneWirePin,HIGH); delayMicroseconds(15000); digitalWrite(oneWirePin,LOW); //wait 1 ms until transmitting the message: delayMicroseconds(1000); //transmit address bits: digitalWrite(oneWirePin,addr1); delayMicroseconds(1000); digitalWrite(oneWirePin,addr2); delayMicroseconds(1000); //transmit the 10 position bits for(int i=0; i<10; i++) { digitalWrite(oneWirePin,bitRead(pos,i)); delayMicroseconds(1000); Serial.print(bitRead(pos,i)); } Serial.print("\n"); digitalWrite(oneWirePin,LOW); } Receiver: #define inputPin 2 // the setup function runs once when you press reset or power the board void setup() { pinMode(inputPin,INPUT); Serial.begin(9600); } int pos; int duration; boolean noSignal; boolean addr1; boolean addr2; // the loop function runs over and over again forever void loop() { pos = getData(); Serial.print("Position: "); Serial.print(pos); Serial.print("\n"); delay(15); } int getData(){ noSignal = 1; while(noSignal == 1){ //Serial.print("no signal\n"); duration = pulseIn(inputPin, HIGH); noInterrupts(); if(duration > 14500){ Serial.print("startbit received\n"); //Signal received delayMicroseconds(1400); addr1 = digitalRead(inputPin); Serial.print("Address: "); Serial.print(addr1); delayMicroseconds(1000); addr2 = digitalRead(inputPin); Serial.print(addr2); Serial.print("\n"); pos = 0; delayMicroseconds(1000); for(int i=0; i<10; i++) { //Dummy Function Serial.print(digitalRead(inputPin)); delayMicroseconds(1000); pos = 55; } Serial.print("\n"); //Serial.print(pos); interrupts(); //signal received noSignal = 0; delayMicroseconds(500); } else{ // No init Bit received, go back and try again } } return pos; } I just transmitted the 2 address bits (4 possibilities > 3 axis plus 1 calibrate) but implementing the other 10 bits should be really easy. EDIT: It kinda works. Every 2nd transmission i get the right message but in the other messages I only get zeros for all bits.
  11. Oh this is not the "real" OneWire Interface, I tried to write one on my own. I ordered a logic analyzer now and maybe I will look into the real OneWire interface now. I think I also spotted the mistake in my code, the code that tries to get the start of the message is flawed. if it begins to listen while a "low" bit is transmitted, it thinks the next high bit is the beginning of the message.
  12. Hi there again... Im having some trouble with the 1-Wire connection. I bought a real Arduino Uno and I wanted to transmit Data over 1 wire between it and my Arduino Micro. I need to transmit 12 bits. 2 for address (3 devices plus calibration command) and 10 for the position (ca. 1/3 degree resolution). I worked on a protocol and sending works but I can't get it working that the receiving Arduino know when the signal starts. I tried to have the line on High for 15 times one Bit takes (3ms) so I can just wait for a High, wait 2ms, check if it is still high.If it is, this is the beginning of a message. then I wait for the Line to go low. If it is, i wait 0.3ms so when i now check the value im in the middle of the first bit. then i save the value, wait 0.2ms for the next bit and so on until I got the last bit. Then I wait for the next High. Somehow, this doesn't work. Here is the code: Transmitter: #define oneWirePin 1 // the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 as an output. pinMode(13, OUTPUT); Serial.begin(9600); } // the loop function runs over and over again forever void loop() { sendData(1,1,93); } void sendData(boolean addr1, boolean addr2, int pos){ digitalWrite(oneWirePin,HIGH); delayMicroseconds(3000); digitalWrite(oneWirePin,LOW); delayMicroseconds(200); //Begin transmission Serial.print("beginning transmission:\nAddress:\n"); digitalWrite(oneWirePin,addr1); Serial.print(addr1); delayMicroseconds(200); digitalWrite(oneWirePin,addr2); Serial.print(addr2); delayMicroseconds(200); Serial.print("\nMessage:\n"); for(int i=0; i<10; i++) { digitalWrite(oneWirePin,bitRead(pos,i)); Serial.print(bitRead(pos,i)); delayMicroseconds(200); } Serial.print("\ntransmission stopped\n\n"); Serial.print("\n"); delayMicroseconds(5000); } Receiver: int output; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(oneWirePin, INPUT); //LED on Model A or Pro pinMode(1, OUTPUT); //LED on Model A or Pro } // the loop routine runs over and over again forever: void loop() { //DigiKeyboard.sendKeyStroke(0); output=receiveData(); //Serial.println(output); delay(100); } boolean addr1; boolean addr2; boolean bit1; boolean bit2; boolean bit3; boolean bit4; boolean bit5; boolean bit6; boolean bit7; boolean bit8; boolean bit9; boolean bit10; long receiveData(){ long dataReceived = 0; while(digitalRead(oneWirePin) == LOW){ delayMicroseconds(1); } //Wait for Data delayMicroseconds(3300); addr1 = digitalRead(oneWirePin); delayMicroseconds(200); addr2 = digitalRead(oneWirePin); delayMicroseconds(200); bit1 = digitalRead(oneWirePin); delayMicroseconds(200); bit2 = digitalRead(oneWirePin); delayMicroseconds(200); bit3 = digitalRead(oneWirePin); delayMicroseconds(200); bit4 = digitalRead(oneWirePin); delayMicroseconds(200); bit5 = digitalRead(oneWirePin); delayMicroseconds(200); bit6 = digitalRead(oneWirePin); delayMicroseconds(200); bit7 = digitalRead(oneWirePin); delayMicroseconds(200); bit8 = digitalRead(oneWirePin); delayMicroseconds(200); bit9 = digitalRead(oneWirePin); delayMicroseconds(200); bit10 = digitalRead(oneWirePin); delayMicroseconds(200); dataReceived = bit1*1 + bit2*2 + bit3*4 + bit4*8 + bit5*16 + bit6*32 + bit7*64 + bit8*128 + bit9*256 + bit10*512; Serial.print(bit1); Serial.print(bit2); Serial.print(bit3); Serial.print(bit4); Serial.print(bit5); Serial.print(bit6); Serial.print(bit7); Serial.print(bit8); Serial.print(bit9); Serial.print(bit10); Serial.print("\n"); Serial.println(dataReceived); delayMicroseconds(2000); return dataReceived; } Any tips?
  13. A really big 3D printer has some problems... I don't exactly know how these machine works but I could imagine that it could move around which is really bad. If it doesn't, that would be really awesome. Another thing is the print time. Don't underestimate the time it takes to print large stuff with a 3D printer! I am now waiting for my ISP Programmers and trying to align the central plate with the axis but I am not sure I will be able to get it accurate enough...
×
×
  • Create New...