TGB1718 Posted October 25, 2019 Share Posted October 25, 2019 (edited) They only need GND (0V) connected, I usually power the Arduino from it's USB connection. See this for example:- it's for use with SDrive-Max to allow other devices on the SIO bus, it needs pullup as it uses 7407's The SIO +5V powers the buffer, but not the Arduino. Edited October 25, 2019 by TGB1718 Add circuit Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted October 25, 2019 Author Share Posted October 25, 2019 thanks again, im feeling the need to protect the 1050s ICs after seeing its behaviour..! Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted October 26, 2019 Share Posted October 26, 2019 They only need a shared ground, either side can provide the +5V DC supply but not both ? Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted October 29, 2019 Author Share Posted October 29, 2019 On 10/26/2019 at 2:17 PM, TGB1718 said: They only need a shared ground cheers, this is a big help. the 7504 turned up today, should get the breadboard in the next couple of days and then i can proceed Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted October 30, 2019 Author Share Posted October 30, 2019 I got it rigged up on the breadboard with the hex inverter buffer (with pulldown resistors on the inputs). in the vid i am sending +5v to the inputs on the hex inverter as per the 1050 signals. i needed 2 pairs of hands to film it but it is visible: DIRC input has +5v already just out shot at the top i am giving +5v to the STEP input - then the counter increases i then remove the DIRC +5v and give +5v to the STEP input - then the counter decreases i then apply +5v to ZERO input and the counter resets to 0 in the code i have used HIGH and LOW as logic on the arduino pin behaviour. i will also try using 0 and 1 to see if it makes any difference. also, i have not used the INPUT_PULLUP in pinmode but i will consider it depending how the 1050 behaves! watch this space... ? MVI_1614.MOV 2 Quote Link to comment Share on other sites More sharing options...
ochen Posted October 30, 2019 Share Posted October 30, 2019 xrbrevin, So I decided to follow along on your adventure, being also of limited abilities, and get my hands dirty. Some folks already mentioned that control is done by the RIOT chip and they are indeed correct. I dusted off an arduino and soldering iron and can confirm no useful activity on the STEP and DIR pins. Wanna save you some time and maybe you can try another approach. Not sure how difficult that will be though. ochen Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted October 31, 2019 Author Share Posted October 31, 2019 thanks, its no so much about the destination, but the journey. i'll sure to make wrong decisions but i will also find out why they were wrong. i have had no opportunity for formally learn electronics so this is a bold attempt using my own way of learning. we'll see where it ends up. i do like the idea of a 1050 track display unit so this is motivation. however, i think my drive is unstable and not up to the testing. i will dig out another and proceed... Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted November 1, 2019 Author Share Posted November 1, 2019 ok so ive changed drive, interestingly this one uses a WD2797 FDC chip i connected up just the track 0 function to pin 34 of the FDC just via a pulldown resistor - no diode, and then into the hex inverter arrangement. so far so good! no unusual drive behaviour ? MVI_1615.MOV Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted November 5, 2019 Author Share Posted November 5, 2019 i went on to try various things, culminating in using PINS 19 and 22 of the RIOT chip. this got the numbers to count up on the display during drive activity - great success! i swiftly shut it down and soldered the wires directly. when i powered it up again, i now just get the fast 'boot error' message - like when there is no disk inserted...! i think i shouldve used diodes ?. the drive will not spin up when the atari is powered on but if it is already spinning it will continue to do so. im thinking SIO communication issues or U2/U3. i used the swap-diag method to find out the problem - change drive, change SIO cable, change atari etc. strangely, the disks i was using to test have become unreadble which gave confusing results. however i discovered my Rana drive needs a new head spring and my Indus needed new chip sockets (!) so i am currently trying to get it back to normal. i thought it was the RIOT chip but this is ok. i replaced the 6507 and U1 (CA3086) and they are also ok. next thing to do is re-read the manuals & wiring diagrams again and consider U2 and U3. Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted November 8, 2019 Author Share Posted November 8, 2019 to effect a change and help diagnose the issue, i fitted a happy unit to the fried drive but it didnt fix it. i then reverted it back to stock - originally it had a USDoubler mod in it - and now the mech does respond to the SIO command from the computer. however, it now produces the 'slow boot error' message instead. the 1050 diagnostic disk passes the first few tests but fails the drive motor, stepper motor, RPM and zero tests. the drive motor did start but it still reported a fail, the zero test behaviour and noise was not the same as a healthy drive. i then tried to format a disk and the head steps up to track 39 as normal, then stops. i wonder if this could be the verify or read process failing? i swapped in another mech from a working drive and it does the same. i have previously had success at repairing 'common/normal' faults but the fault on this drive is due to my intervention so i cannot follow the usual procedures. can anyone offer any advice where i should start looking? Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 20, 2022 Share Posted March 20, 2022 On 11/5/2019 at 8:37 PM, xrbrevin said: i went on to try various things, culminating in using PINS 19 and 22 of the RIOT chip. this got the numbers to count up on the display during drive activity - great success! i swiftly shut it down and soldered the wires directly. when i powered it up again, i now just get the fast 'boot error' message - like when there is no disk inserted...! i think i shouldve used diodes ?. the drive will not spin up when the atari is powered on but if it is already spinning it will continue to do so. im thinking SIO communication issues or U2/U3. i used the swap-diag method to find out the problem - change drive, change SIO cable, change atari etc. strangely, the disks i was using to test have become unreadble which gave confusing results. however i discovered my Rana drive needs a new head spring and my Indus needed new chip sockets (!) so i am currently trying to get it back to normal. i thought it was the RIOT chip but this is ok. i replaced the 6507 and U1 (CA3086) and they are also ok. next thing to do is re-read the manuals & wiring diagrams again and consider U2 and U3. What was the final circuit diagram you developed and are you proposing to replace the resistors with diodes for protection? Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 20, 2022 Author Share Posted March 20, 2022 8 hours ago, macsonny said: What was the final circuit diagram you developed and are you proposing to replace the resistors with diodes for protection? hmm.. ive slept since then and done other things etc but i still have the abomination assembled somewhere and it would be nice to get it going. i'll dig it out and ponder it again. the diode suggestion was a guess as i am concerned that the device might upset the RIOT chip. i only want to read the signals from the RIOT's behaviour and use them for the display - i dont want to feed it any false voltage logic upstream. any advice here would be appreciated. maybe i'll learn about 'current limiting resistors' next. i think it's do-able but i admit im out of my depth on the subtleties of using passive components to refine logic signals (and make them safe!) but my practical results are encouraging. feel free to dabble yourself. the diagram from post #11 is still valid at this stage. here is the arduino code TwoDigit7SegWorking.rar Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 20, 2022 Author Share Posted March 20, 2022 ive dug it out and the hex inverter has been included on the 3x inputs and there are 2x diodes at the point of entry to the circuit. i'll redraw the diagram and upload it in a bit Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 20, 2022 Author Share Posted March 20, 2022 here it is in its last incarnation before i timed-out it has refreshed my memory of the project so im getting feelings of motivation again.. ? i think track number should be possible 2(/3?) ways: 1 way using the FDC only and coding the arduino to count up or down with each STEP pulse - depending on the state of DIRC 1 way using the stepper motor output signals from the RIOT - 1 wire for up count, 1 wire for down count. the diagram is for this attempt. arduino code should be easier this way tho. there is also the output signals from U2 and U3 but these are amplified to actually power the stepper motor. cheers! Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 20, 2022 Share Posted March 20, 2022 6 hours ago, xrbrevin said: here it is in its last incarnation before i timed-out it has refreshed my memory of the project so im getting feelings of motivation again.. ? i think track number should be possible 2(/3?) ways: 1 way using the FDC only and coding the arduino to count up or down with each STEP pulse - depending on the state of DIRC 1 way using the stepper motor output signals from the RIOT - 1 wire for up count, 1 wire for down count. the diagram is for this attempt. arduino code should be easier this way tho. there is also the output signals from U2 and U3 but these are amplified to actually power the stepper motor. cheers! I'm going to recreate this and see how I go. I'm somewhere perplexed about how the count though as the drive doesn't move through tracks always sequentially right. Sometimes it will just from say 100 to 200 depending on the files. How does a sequential counter accomodate for that? 1 Quote Link to comment Share on other sites More sharing options...
+kheller2 Posted March 20, 2022 Share Posted March 20, 2022 Dropcheck made a track display for the XF551 about 8 years ago that just counted the pulses off the FDC. Given the 1050 doesn’t use that for stepping, I would still think counting the half pulses out of the riot would be easier than adding an Arduino. Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 20, 2022 Share Posted March 20, 2022 5 minutes ago, kheller2 said: Dropcheck made a track display for the XF551 about 8 years ago that just counted the pulses off the FDC. Given the 1050 doesn’t use that for stepping, I would still think counting the half pulses out of the riot would be easier than adding an Arduino. I did a quick search and it doesn't look like these are made any more. The beauty of the Arduino is that I can display and add other functions such as drive ID, write protect status and density. I read somewhere that J1 provides the density setting but when I put a multimeter on it I don't see anything that would indicate density. For example, J1-1 is supposed for be single density, J1-2 is medium density and J1-3 is double density. Is J1 the right post to get this information or can I get it elsewhere? Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 20, 2022 Author Share Posted March 20, 2022 (edited) 1 hour ago, macsonny said: How does a sequential counter accomodate for that? the FDC sends a single pulse out of pin 15 (STEP) for every track so if it needs to move 10 tracks, there are 10 pulses. the arduino code just needs to add or subtract 1 per pulse. the DIRC signal / status denotes whether it is plus or minus a track (i.e. move head in or out) hmmm i never thought but using an arduino opens up other ideas - an I2C LED screen with font options? hehe Edited March 20, 2022 by xrbrevin Quote Link to comment Share on other sites More sharing options...
dzzy1982 Posted March 20, 2022 Share Posted March 20, 2022 This is a cool little project, have you by any chance checked into how the counter is implemented in the Indus GT? Perhaps it could be duplicated for the 1050. Quote Link to comment Share on other sites More sharing options...
ijor Posted March 20, 2022 Share Posted March 20, 2022 1 hour ago, xrbrevin said: the FDC sends a single pulse out of pin 15 (STEP) for every track so if it needs to move 10 tracks, there are 10 pulses. the arduino code just needs to add or subtract 1 per pulse. the DIRC signal / status denotes whether it is plus or minus a track (i.e. move head in or out) The 1050 doesn't use the FDC step motor interface. You won't get anything from those pins. Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 21, 2022 Share Posted March 21, 2022 Can someone please explain the below code. I'm getting the input from the device as explained by xrbrevin above. Circuit works great. But I can't work out how to intemperate the + and - steps coming from D2 (PIN_2) and D3 (PIN_3) and convert that to a track number. I'm using MakeCode for micro:bit to take a simple code that zeros the track counter when D4 (PIN_4) is active and then increase or decrease the counter based on the input from D2 and D3. Clearly that's wrong. What's the correct code? #include <ShiftRegister74HC595.h> // create shift register object (number of shift registers, data pin, clock pin, latch pin) ShiftRegister74HC595 sr (2, 11, 12, 8); void setup() { pinMode(2,0);//track + pinMode(3,0);//track - pinMode(4,0);//track zero } int show=00; int a=0; int b=0; int c=0; void loop() { count(); if(digitalRead(2)==1 && digitalRead(3)==0){ if(a==0){ show--; a=1; } }else{ a=0; } if(digitalRead(3)==1 && digitalRead(2)==1){ if(b==0){ show++; b=1; } }else{ b=0; } if(digitalRead(4)==1){ if(c==0){ show=0; c=1; } }else{ c=0; } if(show<0){ show=0; } if(show>40){ show=40; } } int value,digit1,digit2,digit3,digit4; uint8_t numberB[] = {B11000000, //0 B11111001, //1 B10100100, //2 B10110000, //3 B10011001, //4 B10010010, //5 B10000011, //6 B11111000, //7 B10000000, //8 B10011000 //9 }; void count(){ //Split number to digits: digit2=show % 10 ; digit1=(show / 10) % 10 ; //Send them to 7 segment displays uint8_t numberToPrint[]= {numberB[digit2],numberB[digit1]}; sr.setAll(numberToPrint); } Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 21, 2022 Share Posted March 21, 2022 On 10/24/2019 at 7:16 AM, TGB1718 said: To get this working with the 1050, you probably need to attach an interrupt to the Step signal, have a read of this https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/ that way, you don't miss any steps, your interrupt routine should check (high or low) on the direction and then increment/decrement your display accordingly. As its stepping a motor, the Arduino will have plenty of time to action your routine and return ready waiting for the next step. below is some code that uses interrupt. I used it for a heart monitor, but may still help, the basics work. #include <LiquidCrystal_I2C.h> #define True 1 #define False 0 #define APin A0 // AnalogRead pin (Monitor Input) #define IPin 2 // Interrupt Pin for Frequency Measurement int val; // Value from APin unsigned long Clock = 0; unsigned long Clock1 = 0; float Diff = 0.0; float ResArray[10]={0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; int Index=0; boolean Changed = False; boolean Plotter = True; ; // to turn Serial Plotter on/off boolean LON = False; // Flag for LED int LedDelay; String Scaled = ""; LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display void setup() { Serial.begin(115200); pinMode(APin, INPUT ); pinMode(IPin, INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(IPin), GetTime, FALLING); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); LedDelay=0; lcd.init(); // initialize the lcd lcd.backlight(); lcd.clear(); } void loop() { String res = ""; int len, i,j; float Average=0.0; if(Changed )// && !Plotter) { digitalWrite(LED_BUILTIN, HIGH); LedDelay = 0; LON = True; ResArray[Index++]=1/(Diff*0.000001)*60; if(Index ==10) Index=0; // Serial.println(1/(Diff*0.000001)*60); // convert to BPM Average = 0.0; for(j=0;j<10;j++) Average=Average+ResArray[j]; Average=Average/10; lcd.setCursor(0,0); res = "BPM "; //res += String(1/(Diff*0.000001)*60); res += Average; len = res.length(); len = 16 - len; for(i = len;i < 16; i++) res+=" "; lcd.print(res); Changed = False; if(!Plotter) { up(); delay(100); down(); } digitalWrite(LED_BUILTIN, LOW); } if(Plotter) { val = analogRead(APin); Scaled = "200 "; Scaled += val; Scaled += " 850"; Serial.println(Scaled); delay(10); } } void GetTime() { Clock = micros(); Diff = float(Clock - Clock1); Clock1 = Clock; Changed = True; } void up() { int i; for(i=0;i<16;i++) { lcd.setCursor(i,1); lcd.print("*"); delay(10); } } void down() { int i; for(i=15;i>0;i--) { lcd.setCursor(i,1); lcd.print(" "); delay(10); } } Do you have this in JAVA? Quote Link to comment Share on other sites More sharing options...
macsonny Posted March 21, 2022 Share Posted March 21, 2022 (edited) 17 hours ago, xrbrevin said: here it is in its last incarnation before i timed-out it has refreshed my memory of the project so im getting feelings of motivation again.. ? i think track number should be possible 2(/3?) ways: 1 way using the FDC only and coding the arduino to count up or down with each STEP pulse - depending on the state of DIRC 1 way using the stepper motor output signals from the RIOT - 1 wire for up count, 1 wire for down count. the diagram is for this attempt. arduino code should be easier this way tho. there is also the output signals from U2 and U3 but these are amplified to actually power the stepper motor. cheers! I built this circuit and I'm totally confused by the logic. I assigned D2 to Pin 22 on RIOT I assigned D3 to Pin 19 on RIOT I assigned D4 to Pin 34 on WD This is all per your diagram. And it works great! My issue is I can't work the logic out for D2 and D3 when going to the Arduino. I booted up a disk and the head moved from the outside of the floppy to the inside per normal boot. During the first track, D2 would be high and D3 would be low. Then as the drive moved to the next track, D2 would go low and D3 would go high. The next track would see their state flip again. As I assume the track count is going up I'm now confused by the logic. I'm hoping someone can help with with a IF THEN ELSE approach to calculating the tracks/sectors. By the way - I assume the 1050 has 40 tracks with 16 sectors per track right? FYI - I tried connecting directly to PIN 16 and 15 on the WD but found one of the pins to be in a high state no matter what the drive was doing? Edited March 21, 2022 by macsonny Update Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 21, 2022 Author Share Posted March 21, 2022 1 hour ago, macsonny said: By the way - I assume the 1050 has 40 tracks with 16 sectors per track right? yes the 1050 uses 40 tracks, sectors shouldnt be a factor for this purpose tho 1 hour ago, macsonny said: FYI - I tried connecting directly to PIN 16 and 15 on the WD but found one of the pins to be in a high state no matter what the drive was doing? i need to re-read the WDC279x datasheet to fathom the DIRC characteristics but if we use the RIOT method then its only out of curiosity at this stage. 1 hour ago, macsonny said: My issue is I can't work the logic out for D2 and D3 when going to the Arduino. I booted up a disk and the head moved from the outside of the floppy to the inside per normal boot. During the first track, D2 would be high and D3 would be low. Then as the drive moved to the next track, D2 would go low and D3 would go high. The next track would see their state flip again. As I assume the track count is going up I'm now confused by the logic. this might be the pulldown resistors doing their job. the STEP assertions from the RIOT are high and override the pulldown. when the assertion stops, the pulldown takes over again. i think the high state should only swap over when there is a direction change? did the track display work for you then? i havent had chance to dig a drive out yet here is a pic of my breadboard. i can supply the 2x diodes with a 5v and the display will go up 1 or down 1. if i give 5v to the green wire the display goes to zero. i'll try and video it but im not an octopus! Quote Link to comment Share on other sites More sharing options...
xrbrevin Posted March 21, 2022 Author Share Posted March 21, 2022 this vid demonstrates the design responds to 5v inputs on the 3 wires: 1-up, 1-down, 1-zero operations.avi Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.