NOVELTY - A biodiesel device comprises magnetic stirring mechanism, ultrasonic esterification reaction mechanism and liquid phase separator. The magnetic stirring mechanism includes mixing drum with baffle layer divided into upper and lower mixing chamber; and vertical circular permanent magnet rotatably disposed in the inner recess. The esterification reaction mechanism comprises thermostat unit, esterification reactor and ultrasonic generating unit, and is connected to liquid phase separator.    USE - Biodiesel device.    ADVANTAGE - The device integrates magnetic stirring effect and ultrasonic high-frequency oscillation effect. The method enhances esterification reaction and increases speed in preparing biodiesel.    DETAILED DESCRIPTION - A biodiesel device comprises magnetic stirring mechanism, ultrasonic esterification reaction mechanism and liquid phase separator. The magnetic stirring mechanism comprises mixing drum, vertical circular permanent magnet, magnetic ionic liquid storage tanks, and raw material storage tank. The middle of mixing drum has baffle layer divided into upper and lower mixing chamber connected through a hole. The vertical circular permanent magnet is rotatably disposed in the inner recess. The raw material storage tank and magnetic ionic liquid tank are connected to upper and lower mixing chamber through pipes. The esterification reaction mechanism comprises thermostat unit, esterification reactor and ultrasonic generating unit. The esterification reactor and the upper and lower mixing chamber are connected to liquid phase separator. An INDEPENDENT CLAIM is included for preparation of biodiesel by:    (A) mixing raw oil, methanol and strong alkali catalyst at certain percentage in raw material storage tank, and adding 1-butyl-3-methylimidazolium tetrachloroferrate (bmim)FeCl4 ionic liquid in the magnetic ionic liquid tank;    (B) filling lower mixing chamber with ionic liquid;    (C) rotating vertical circular permanent magnet at certain speed to rotate ionic liquid at high speed;    (D) pumping raw materials with density less than the ionic liquid into mixing chamber, and stirring at constant speed while high-speed rotating ionic liquid to make the mixture rise into upper mixing chamber;    (E) uniformly mixing mixture until it reaches a certain amount in the upper mixing chamber, feeding into esterification reactor, starting thermostat unit and ultrasonic generating unit, and reacting at constant temperature and certain frequency to obtain light and heavy phases of glycerol ester; and    (F) putting into phase separator, collecting light phase methyl ester, distilling, washing, separating, and purifying.