coin hopper motor affecting arduino pins

hi im using an arduino to make a coin changer, and one of my component is a 9 slot circular blue coin hopper operating in 240V. i also have 2 optical sensors for the coins for input and feedback, and every time the hopper start and stop, arduino senses pulses from the both sensors, i tried to disconnect the sensors leaving the solid wire still connected to the pins of arduino, it still senses the pulses which obviously did not come from the sensors because i already disconnected it, but when i removed the wires connected to the pins, the arduino did not detect any pulse as well as from the optical sensors because i already disconnected it from the arduino.

is this caused by magnetic surges from the motor?
i havent tried to use stranded wires o a bread board but i will update this thread if it changes.
what shall i do for this not to happen?

Yes you have a lot of interference from the solenoids/motor in the device.

You need shielded cables, probably need to shield the Arduino in a metal enclosure too.
Moving the Arduino well away from the coin changer would help, and make sure you never
ever run sensor cabling alongside high current or mains wiring - keep it well away.

are there other ways to to solve this?

yoyoy_kun:
are there other ways to to solve this?

No. That is fundamental to solving your noise problem.

Paul

what can use to shield the solenoid motoras well as for the arduino board and wires?

yoyoy_kun:
what can use to shield the solenoid motoras well as for the arduino board and wires?

Well, since the solenoids are electro magnets, you need a magnetic material such as thin steel, perhaps cut up a steel can and form that metal to enclose the solenoids and fasten it firmly to the rest of the metal structure.

Paul

can i use aluminum foils? maybe 3 layers?

does someone know why this happens only from the start and the end?

is it created through power surge? can a soft start relay solve this?

yoyoy_kun:
can i use aluminum foils? maybe 3 layers?

does someone know why this happens only from the start and the end?

is it created through power surge? can a soft start relay solve this?

Are you afraid to try? Good Grief!!!

The radiated noise pulse is generated when the solenoid is turned off!

Paul

i've ran out of aluminum foil, and i only manage to shield it with 1 layer, and it still receiving erratic pulses..
also i also tried to cover it with anti static wrapper, and still not working..

still looking for a soft start relay(circuit) maybe some other time..