zemepan2
Posts: 4
Joined: Tue Jun 11, 2019 3:14 pm

input activated by chainsaw))

Tue Jun 11, 2019 3:21 pm

Hi. I have RPI installed in my factory where I work with electric chainsaw and other wood processing tools. very often, when I start chainsaw, input at RPI read HIGH. do you have any idea, what i can do with it?

Andyroo
Posts: 3311
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: input activated by chainsaw))

Tue Jun 11, 2019 4:14 pm

If the chainsaw is on the same mains you need to put in a new clean feed or try to suppress noise on the circuit the Pi and sensors are on.

If it’s RF try a Faraday Cage

You could try a UPS or battery power on the Pi to help you test things. I’ve been know to get sites provide a small diesel generator to run kit on while trying to get things running.

Unfortunately this can be a pain to fix - best thing is to find a local electrical contractor who knows about signal noise and mains interference and get then to visit site.
Need Pi spray - these things are breeding in my house...

zemepan2
Posts: 4
Joined: Tue Jun 11, 2019 3:14 pm

Re: input activated by chainsaw))

Tue Jun 11, 2019 4:22 pm

tomorow I test it with battery

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11847
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: input activated by chainsaw))

Tue Jun 11, 2019 10:36 pm

If the pullup resistors you are using are weak, i.e. only software enabled +-50K pullups, strengthen them by lowering their resistance to say 2K2.
also, place RF noise filter capacitors (100nF) between the GPIO's affected and GND, as close to the GPIO pins and GNDas possible

an electric chainsaw has a powerful electromotor, probably of the kind that has commutators, that throw sparks around like fireworks.
as such its a powerful radio (spark) transmitter, and all wires connected to GPIO pins are antennae which pick up these transmissions.

zemepan2
Posts: 4
Joined: Tue Jun 11, 2019 3:14 pm

Re: input activated by chainsaw))

Wed Jun 12, 2019 4:02 pm

there are pull down. i think. this is my schematic of button (i have PI. no arduino). so in this case capacitors has to be between gpio and +3,3? resistance is 10k.
Attachments
button_schem.png
button_schem.png (18.69 KiB) Viewed 1551 times

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11847
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: input activated by chainsaw))

Fri Jun 14, 2019 4:46 pm

capacitors always short the disturbance to GND, not to 3V3, in fact to 3V3 could damage the 3V3 signals.
in 99% of cases, a hardware designer will choose to have the signal as "active low", with a pullup. Simply invert the input in software, if you insist in using active high logic.
if a 100nF capacitor to GND is not effective enough the four other things you can do are:
  • Using twisted pair wires to the external switches.
  • Shield the twisted pair, connect the shield to ground close to the RPI
  • use a low resistance (100 Ohm to 1K) resistor between de GPIO/Cap and the switch wire, this will also prevent potential problems when the GPIO is accidentally programmed as output.
  • Loop the twisted pair through a ferrite ring, close to the PI.

and/or perhaps you can look at the chainsaw, and make sure it contains an EMC filter.

zemepan2
Posts: 4
Joined: Tue Jun 11, 2019 3:14 pm

Re: input activated by chainsaw))

Mon Jun 17, 2019 4:54 pm

I changed resistors from 10k to 100ohm. now works. thx

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11847
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: input activated by chainsaw))

Mon Jun 17, 2019 5:27 pm

That would work, but if you program the GPIO as an output, and the switch is closed a large current would flow, which destroys your PI, so I would also add a 330 Ohm resistor in series with the GPIO, like this.
button_schem.png
button_schem.png (25.47 KiB) Viewed 1245 times
also again, the voltage the switch is connected to MUST BE 3V3, as show in the revised drawing.
Probably you already did, but just to make sure I repeat this again, as its very important, PI's are NOT 5V TOLERANT!

Return to “Off topic discussion”