I have it all setup, and at low speeds it was working fine, setting it 2 about 150 via the L298N speed control, taking it up to 255 blew the driver, smoke ect.
I wired it up as follows :
in1 and in2 on L298N to pin9 and 10 on the UNO
ena on the L298N to pin 8 on the UNO.
and a common ground to the UNO from the L298N
There is a jumper on the board that the instructions say should be removed if a supply of more than 12 volts is used.
I tried some basic code with the jumper on and jumper off, when off nothing hapend at all, when on the motor ran, but started smoking with high speed.
Looking at the stats for the motor, as far as I can see, the L298N should run it fine, but I will be honest I don't have a lot of experience with electronics so I might be missing something very basic.
So I want to run the motor at 24v so I can attain approx 7000 rpm.
What's the stall current of the motor? (Or equivalently the winding resistance) The motor
driver has to cope with the starting current of the motor, not just the running current.
What 24V supply? Is it regulated? How much bulk decoupling capacitance is there?
Is that a genuine L298? Could it be a knock-off or factory reject? (its on eBay isn't it!)
If you don't know or measure the stall current for the motor how can you tell that
you haven't overloaded the 298? Measure the terminal resistance R with the motor disconnected
and stationary. stall current = 24V / R
If the stall current is well within the capabilities of the 298 I'd suspect over-voltage or duff 298.
over-voltage could be caused by poor decoupling (I note that board has some electrolytics on it
so it shouldn't be too bad).
Have you checked the 24V supply is actually putting out 24V?