Well before your time period people had developed a fire-starting tool called a "fire piston". It was a tube with an air-tight piston. You put kindling or some other flammable material in it, put in the piston, and rapidly pushed the piston, compressing the air. The air gets hot enough to burn your kindling, and you use that to light your fire. It was small, portable, and very useful.
Rudolf Diesel realized that the same principle could be used for an engine: If you inject something flammable into the tube while it was highly compressed, it would burn, heat up the air, and force the piston out with a strong force that could be used to do work. While we associate Diesel engines today with kerosene (a petroleum product) Diesel's original intent was to use vegetable oil as the fuel.
In the 1500's, Europe had gunpowder and cannon. It is not inconceivable that a cannoneer or arquebusier may have witnessed an accident involving a clogged touchhole and a tight ramrod. Gunpower was put in the cannon/arquebus, and the ramrod was rammed home as normal, but because the cannon barrel was air-tight because of the clogged touchhole and tight ramrod, the air heated up and ignited the gunpower. The ramrod shot out, killing the cannoneer using it.
More likely, it took the hand off the arquebusier, since the force needed to ram home an air-tight piston 3 inches in diameter to a compression ratio of 15:1 would be about 1500 pounds. For an arquebus with a 1/2" bore, it would only be about 50 pounds.
If you take that cannon, connect the ramrod to a crank on a fly-wheel so it can move but is confined to being in the barrel, and provide a way to let out exhaust gasses (holes drilled into the barrel near the open end, exposed when the piston is near "bottom dead center") and in fresh air (a valved bellows near the closed end, powered by the fly-wheel), and a way to squirt in the fuel (a small piston-pump pushing olive oil through the touchhole), you have a Diesel engine, similar to Rudolf Diesel's early versions.
It could be done in 1500. If you gave Leonardo da Vinci a fire piston and said "build me a vehicle powered by something like this", you may very well have had meticulously-drawn plans within a decade.