Sorting machine (1 - Figure 1) comprising at least a train of interconnected carriages provided with a plurality of supporting wheels (10 - Figures 2 and 3) including electrical alternators (10 - Figure 4; 12 -Figure 5; 103 - Figure 9; W- Figure 10) to supply electrical power onboard, said carriages comprising a sorting belt or/and a tilting tray (60 - Figure 2) and an onboard electrical sorting motor (80 - Figure 2; 102 - Figure 9; M - Figure 10) configured to activate said sorting belt or/and tilting tray, characterized in that the alternators (10 - Figure 4; 12 -Figure 5; 103 - Figure 9; W- Figure 10) are housed within the wheels (10 - Figures 2 and 3), each wheel comprises a fixed inner ring (124 - Figure 5) bearing stator windings (123a-123c - Figure 5) made integral with a fork (15 - Figure 4) supporting the wheel (10 - Figures 2 and 3) and a rotative outer ring (121 - Figure 5) hosting permanent magnets (122 - Figure 5) and spinning around a shaft (16 - Figure 4; 126 - Figure 5) in front of said windings (123a-123c - Figure 5), the alternators (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) being electrically connected in parallel on a common distribution bus (105 - Figure 9; 114 - Figure 10), each alternator (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) in a wheel (10 - Figures 2 and 3) being configured to generate a high frequency three-phase voltage, wherein each carriage comprises an onboard servo driver (30 - Figure 2; 101 - Figure 9; 112, 113 - Figure 10) configured to activate the sorting motor (80 - Figure 2, 102 - Figure 9; M - Figure 10), wherein the three-phase voltage generated by each alternator (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) in a wheel (10 - Figures 2 and 3) being rectified by a full-wave rectifier diode bridge (109 - Figure 9) comprised in the servo-driver (30 - Figure 2; 101 - Figure 9; 112, 113 - Figure 10) and the DC voltage output is applied to the distribution bus (105 - Figure 9; 114 - Figure 10) by means of a diode (104 - Figure 9), wherein each sorting motor (80 - Figure 2; 102 - Figure 9; M - Figure 10) has a servo-amplifier (101 - Figure 9) configured to accept varying supply voltage, and wherein said servo-driver further comprises an overvoltage protection unit (110 - Figure 9) to temporarily disconnect the alternators (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) when the voltage generated by the wheel is over a maximum limit. wherein each carriage comprises an onboard servo driver (30 - Figure 2; 101 - Figure 9; 112, 113 - Figure 10) configured to activate the sorting motor (80 - Figure 2, 102 - Figure 9; M - Figure 10), wherein the three-phase voltage generated by each alternator (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) in a wheel (10 - Figures 2 and 3) being rectified by a full-wave rectifier diode bridge (109 - Figure 9) comprised in the servo-driver (30 - Figure 2; 101 - Figure 9; 112, 113 - Figure 10) and the DC voltage output is applied to the distribution bus (105 - Figure 9; 114 - Figure 10) by means of a diode (104 - Figure 9), wherein each sorting motor (80 - Figure 2; 102 - Figure 9; M - Figure 10) has a servo-amplifier (101 - Figure 9) configured to accept varying supply voltage, and wherein said servo-driver further comprises an overvoltage protection unit (110 - Figure 9) to temporarily disconnect the alternators (10 - Figure 4; 12 - Figure 5; 103 - Figure 9; W - Figure 10) when the voltage generated by the wheel is over a maximum limit.