2015-05-31 07:24 AM
Hello guys,
I am new to this forum and I have a question for you experts. I would like to start this fun project where I would like to make ''floppy drive music'' Because the motor in the floppy drive moves it can produce the sound I want. The first problem is that I don't have many experience with stm32f4. Most people use the rasberry pi or arduino but since I don't have (or don't want to) buy those I wanted to use STM32F4 discovery board. The problem is that I don't know which pins I should connect first. I know that for floppy music you need motor enable, drive select, step & direction pins on your floppy drive but I have no idea where should I connect the other side of the wire. The video I watched (used arduino) connected to GND pin, pin 2 and pin 3 Can you give me some help how to wire this thing? #floppy-music2015-05-31 08:22 AM
One might start by reviewing the manual(s) for STM32F4-DISCO board and selecting a number of free/unused GPIO pins for this operation. I think most pins are 5V tolerant at this point, but you could cross check with the part's data sheet.
You'd configure the pins used for output in OD (Open Drain) mode, and probably use an external pull-up rather than the internal ones. For inputs configure those pins (TRK0, or whatever) in input mode. Review the peripheral library source code examples for GPIO .2015-05-31 08:28 AM
What kind of GPIO device am I working here? So far I only used GPIOD (leds) and GPIOA and with those I didn't need no wires to connect anything to them.
2015-05-31 08:37 AM
A GPIO pin will allow you to output a HIGH or LOW state, and you're going to modulate these in some fashion, to enable the drive, and move the head back and forth.
2015-05-31 08:43 AM
Ok so I need to find two pins that will be able to do that. Also I need to connect the GND pin to the floppy drive. I am looking at my board and I see 8 pins with GND next to them. Is it important which one I choose?
2015-05-31 09:30 AM
The ground is common, ie they are all connected/wired to the same plane.
2015-05-31 09:53 AM
So I'll be working with two GPIO pins. One for direction and one for step. If I understand the GPIO library after init I only need to use the GPIO_SetBits() and GPIO_ResetBits() functions to manage the output of the pin which is then sent to the floppy drive.