floppy read

Hi. I'm trying to read a floppy disc, using th e Arduino, but got stucked with a question: how to stream data to serial as it's read by the head? Is it possible to do it with the short memory on the uno? Tks

how to stream data to serial as it's read by the head?

You don't.
Data is encoded on a floppy with a system called Manchester encoding, you can't just send that to the serial port it is not of the right format and it is not the right speed.
Normally floppy discs had a whole lot of electronics in them. Are you trying to emulate that electronics like the old Apple 2 disc drives?

Thanks for your reply.
No, I don´t want to emulate. What I'm trying is to get binary data from a floppy and send it to Processing so I can feed a generative system that uses this data to draw and make sound.
I'm not really interested in getting the data readable by the operating system, just need the bytes.
If only I could get some data, store it, get more data, store it... I would be very glad because I could store it in an array and use it for drawing. I don´t need the FAT tables or files, just a continuous string of bits.
I´ve tried this code Arduino Floppy Reader (8us-12us widths) - Pastebin.com from Dweller, as a start. But it gives me different results on a macbookpro17"(2007) and on a Debian with a Sempron processor(old machine). I think this may be related with speed you referred. The script uses Serial.begin(115200).
Used wiring in attachment.

Have you looked with a scope at the sort of signal you are getting?

Don't have more than a computer and the Arduino. But if I get my hands on one how should I wire it? To the pin 30(RDATA) on floppy cable?

To the pin 30(RDATA) on floppy cable?

Yes
You can make one with an Arduino.
just Google arduino oscilloscpe

Didn´t know we could build one of this. Got some code from http://www.instructables.com/id/Arduino-Oscilloscope-poor-mans-Oscilloscope/ and incorporated into the Dweller´s code. Serial is running on 115200 baud. The result with the Serial.write((val >> 8) & 0xff) commented is as in the attachment. If I remove comment from that it returns 0 and 1.
For what I need this is a good start, but I want to go further: not having random track readings(related to arduino and something I got into along several restarts of the Processing program from instructables).
What is this data?

Grumpy_Mike:

how to stream data to serial as it's read by the head?

You don't.
Data is encoded on a floppy with a system called Manchester encoding, you can't just send that to the serial port it is not of the right format and it is not the right speed.
Normally floppy discs had a whole lot of electronics in them. Are you trying to emulate that electronics like the old Apple 2 disc drives?

apple II would be somewhat easy as the drives are mostly dumb, 5 volt pulses for stepper movement and a serial stream :slight_smile:

shmc:
Didn´t know we could build one of this. Got some code from http://www.instructables.com/id/Arduino-Oscilloscope-poor-mans-Oscilloscope/ and incorporated into the Dweller´s code. Serial is running on 115200 baud. The result with the Serial.write((val >> 8) & 0xff) commented is as in the attachment. If I remove comment from that it returns 0 and 1.
For what I need this is a good start, but I want to go further: not having random track readings(related to arduino and something I got into along several restarts of the Processing program from instructables).
What is this data?

Sorry I have no idea what you are saying. Want to try again, maybe get google translate involved.

You will only see a zero or one from this pin what do you want?
I don't understand about the restarts, is this your PC or just Processing?

I was refering to Processing restart (run). Now I get the data I want. It remains for me to know how long it takes to read a clue to create switches and advance the read head. Any idea?

Sorry, "takes to read a track to create switches "

If you look at the signal from the index hole that pulses every revolution. You can read a track every revolution.

I'm using a 3,5" floppy so there's no hole. How to calculate revolutions? And sync with the head read.

shmc:
I'm using a 3,5" floppy so there's no hole. How to calculate revolutions? And sync with the head read.

There is no hole, but a small magnet switch to indicate first sector. Usualy it is 300 RPM (600 RPM with Amiga 4000 HD disc drives), if I remember correctly. And there are rules how many zeros and ones can be streamed without lossing the sync. It depends on your format: GRC or MFM

So streaming is not straightforward and require Tables