An electronic device, comprising: a first circuit board and a second circuit board each having a front surface and a back surface as a first main surface (20a, 60a) and a second main surface (20b, 60b), the first circuit board and the second circuit board being arranged at a distance from each other with the first main surfaces (20a, 60a) of the first and second circuit boards (20, 60) facing each other; and a casing containing the first circuit board and the second circuit board, wherein the first circuit board has a first electronic component mounted on the first main surface with the first electronic component having a mounting height from the first main surface of the first circuit board toward the second circuit board being greater than the distance between the first circuit board and the second circuit board, the second circuit board has an opening or a cutout as a first hollow portion at a position facing the first electronic component, and the first hollow portion receives a part of the first electronic component, wherein the casing includes a first casing containing and retaining the first circuit board, and a second casing containing and retaining the second circuit board, the first casing and the second casing are arranged side by side in a direction in which the first circuit board and the second circuit board face each other and are fitted together, the second circuit board has a second electronic component mounted on the first main surface with the second electronic component having a mounting height from the first main surface of the second circuit board toward the first circuit board being greater than the distance between the first circuit board and the second circuit board, the first circuit board has an opening or a cutout as a second hollow portion at a position facing the second electronic component, and the second hollow portion receives a part of the second electronic component. a first circuit board and a second circuit board each having a front surface and a back surface as a first main surface (20a, 60a) and a second main surface (20b, 60b), the first circuit board and the second circuit board being arranged at a distance from each other with the first main surfaces (20a, 60a) of the first and second circuit boards (20, 60) facing each other; and a casing containing the first circuit board and the second circuit board, wherein the first circuit board has a first electronic component mounted on the first main surface with the first electronic component having a mounting height from the first main surface of the first circuit board toward the second circuit board being greater than the distance between the first circuit board and the second circuit board, the second circuit board has an opening or a cutout as a first hollow portion at a position facing the first electronic component, and the first hollow portion receives a part of the first electronic component, wherein the casing includes a first casing containing and retaining the first circuit board, and a second casing containing and retaining the second circuit board, the first casing and the second casing are arranged side by side in a direction in which the first circuit board and the second circuit board face each other and are fitted together, the second circuit board has a second electronic component mounted on the first main surface with the second electronic component having a mounting height from the first main surface of the second circuit board toward the first circuit board being greater than the distance between the first circuit board and the second circuit board, the first circuit board has an opening or a cutout as a second hollow portion at a position facing the second electronic component, and the second hollow portion receives a part of the second electronic component.