Andymator
Posts: 25
Joined: Sat Jun 30, 2018 9:38 am

Power on or off while playing with GPIO

Sun Nov 25, 2018 12:02 pm

Hi
I feel a bit confused.
I have read that it is a bad idea to connect the pins to stuff while the pi is turned on. Is that true?
I have not turned my pi off while connecting the pins and I havent noticed anything bad yet, but maybe I have been lucky.

Next week I will start a project in the school where I teach that will initially let the students connect things to their pies (3B+).
What should I tell them? To always have it turned off when connecting or not?

Thanks!

User avatar
rpdom
Posts: 15397
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 12:34 pm

Play safe. Advise to connect/disconnect devices when the Pi is powered off.

There is less chance of causing damage by accidentally bridging two pins if there is no power.

Also get them to connect the wires, then double check them before powering on. You may save the life of a Pi or two.

Heater
Posts: 13629
Joined: Tue Jul 17, 2012 3:02 pm

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 12:50 pm

That is right. It's all a matter of risk assessment.

Sure it is fine to connect and disconnect things whilst they are powered up. We do it with USB sticks and such all the time. But one day you will eventually plug a wire to the wrong place, plug something backwards or some wire flapping around will touch something it should not and poof, your Pi is dead. Or something goes on fire.

Ideally one would power down, make the connections, check and double check them, then power up again.

This of course is very tedious, having to wait for the thing to boot up all the time, so eventually we get brazen and take the risk of leaving the power on.

Which of course means that every now and then poof, our device is dead.

If you are teaching a class of beginners you are multiplying the risk by the size of the class and the inexperience of the students.

Are you feeling lucky?
Memory in C++ is a leaky abstraction .

hippy
Posts: 6080
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 4:01 pm

If one connects to something powered up it is possible that wires will get connected in an order which creates an adverse situation for the thing being connected or the Pi.

It also limits the opportunity to double-check how something is wired before turning power on.

Some would also recommend, not just powering off, but removing the mains PSU before connecting anything because there is a risk that a PSU might fail and dump mains into the PSU. That is very unlikely but it is possible.

As you are in a school it would be worth talking to whoever is in charge of risk assessments and student safety. Perhaps ask in the Education section how other teachers and institutions handle this issue.

Heater
Posts: 13629
Joined: Tue Jul 17, 2012 3:02 pm

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 4:17 pm

hippy,
As you are in a school it would be worth talking to whoever is in charge of risk assessments and student safety.
Good grief what?

We are talking about Raspberry Pi here. No doubt powered from typical USB adapters.

When I was in school we had a metal shop kitted out with industrial sized lathes, mills, and shapers. By age 14 we considered responsible enough to use those, unsupervised, during our lunch break whist the metal work teacher went off for his lunch. We also had a forge for bashing out wrought iron and a gas furnace for melting aluminium for sand casting.

About the most dangerous thing that happened was when my friend build a pressurized methylated spirit burner for his hot air engine project, which exploded satisfyingly.

Then there was the wood shop.... far more dangerous.

The science lab was fun too.

Kids had more injurious accidents on the sports field.

Please don't tell me kids will be hindered from an education in computing and electronics because someone thinks a Pi is dangerous.
Memory in C++ is a leaky abstraction .

Andyroo

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 4:42 pm

Have to say I agree with Heater on this.

When I was a lad, I was left loose in the chemistry lab with another student to work on a project making soap using concentrated acids. Our punishment when we filled the lab up with 'interesting' green smoke was to work out the chemical reaction that created it and explain to the class what we had done :oops: :o :lol:

I just had a chat with my wife and her thoughts where:

1) Do not tell your trust or academy - they will only create a 97 page document explaining why you must have two people with brooms beside you and stand in rubber soled shoes when you plug the adapter in.
2) You will need a food safety course and a hygiene certificate as you as using the Pi in the wrong room i.e. only in the designated kitchen / cooking areas
3) Never leave kids alone now a days - they will wreck the place

As for the OP question. I was taught:

a) Design the circuit on paper
b) Run through it to make sure the interface voltage dividers / opt-isolators are OK
c) Power off the Pi
d) Check the circuit is correct again
e) Check the Pi is off and connect up
f) Check all looks correct again
g) Power on the Pi

Though saying that, this advice comes from a guy who once broke a motherboard by pushing down too hard on an expansion card! Yes - it was off.

hippy
Posts: 6080
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 4:55 pm

Heater wrote:
Sun Nov 25, 2018 4:17 pm
hippy,
As you are in a school it would be worth talking to whoever is in charge of risk assessments and student safety.
Good grief what?
Welcome to the modern world where 'duty of care' and 'assurance of safety' is covered by a whole raft of legislation and regulation, where it pays to ensure one is in compliance with what there is rather than not.

It doesn't matter how it was 'when we were lads'; the idea of 'scrape them off the floor into a bin liner', say 'oh well, it happens', and 'never mind, carry on as we were', has long gone.

Some schools only allow electronics work to be done with battery powered equipment because that removes the risk with mains-powered equipment, and only allow use of non-rechargeable batteries to minimise risk from the use and maintenance of rechargeables.

That's why I also suggested talking to those working at the coal face because they'll have a far better idea of what's acceptable and not and how to get around any obstacles there may be than those who don't.

Heater
Posts: 13629
Joined: Tue Jul 17, 2012 3:02 pm

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 5:30 pm

hippy,

I gather you are in favor of this lunacy. Keeping kids wrapped in fluffy blankets with blinders on until they are thirty or something.

I'm all in favor of safety measures.

For example, looking back it is shocking that I was once instructed by our science teacher to carry a half pint jug of mercury across the school. Damn that stuff is heavy. Oh, and as it turns out very toxic, who knew?

On the other hand, our experiments involving mercury were some of the most educational and stick in my mind still. I'm very grateful for that and I'm sure they were safe enough.

My claim is:

Everything worth while has risk. The occasional dead or maimed student is well worth the price of educating everybody. An educated society is a safer society in the long run.

Keeping kids in fluffy blankets and limiting their experience at a you age is not in their best interest or the best interest of future society.

Feel free to disagree.

Oh, the last time I talked to those "at the coal face", i.e. actual teachers, they were in despair at their situation.
Memory in C++ is a leaky abstraction .

hippy
Posts: 6080
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 8:12 pm

Heater wrote:
Sun Nov 25, 2018 5:30 pm
I gather you are in favor of this lunacy. Keeping kids wrapped in fluffy blankets with blinders on until they are thirty or something.
I wouldn't call it "lunacy". I cannot see anything wrong in eliminating and reducing exposure to unnecessary hazards or undue risk, whether that''s in the workplace, in schools, or elsewhere. Nor would I see it as wrapping people in fluffy blankets.

If there is a problem it's that it's often easier to prevent the doing of something to remove the potential hazard rather than to manage and minimise the risk. 'Just don't allow it' is an easy option for compliance.

But that's not a problem with the goals, legislation, rules nor regulation.

jondallimore
Posts: 215
Joined: Thu Aug 04, 2016 11:02 pm

Re: Power on or off while playing with GPIO

Sun Nov 25, 2018 9:52 pm

as a design technology teacher, I can safely say that any school who insists on battery powered equipment for electronics hasnt bothered to read the regulations.
many schools also insist on lead free solder - again, not neccessary since soldering irons never reach the temperatures required to vaporise lead.
Risk assessments should be intended to assess and mitigate the risk of activities, not to prevent them - the only time things get prevented is when incompetent H&S types who have no idea what they are talking about try to force teachers to be compliant with made up regulations - such as when I was told I couldnt allow students to use card toilet roll centres because of germs. I actually had to waste my time going through the HSE website to prove it was a myth - the HSE actually has pages dedicated to dispelling ridiculous myths.

As for the Pi and connecting stuff up, I would always do it powered down, and I would use a breakout board to prevent students bending GPIO pins. This allows students work to be checked for errors before powering up the pi. Pi's may be cheap enough, but actually £30 is still a fair amount of cash, especially when dealing with a class set - assuming 1 between 2, thats 10 pi's so £300.

Andymator
Posts: 25
Joined: Sat Jun 30, 2018 9:38 am

Re: Power on or off while playing with GPIO

Sat Dec 01, 2018 7:54 am

Thank you all for your thoughts.

I will make sure my students power down their pies before connecting the pins.
I will not involve anyone else at the school for risk assessment.

Heater
Posts: 13629
Joined: Tue Jul 17, 2012 3:02 pm

Re: Power on or off while playing with GPIO

Sat Dec 01, 2018 8:43 am

hippy,
I cannot see anything wrong in eliminating and reducing exposure to unnecessary hazards or undue risk,...If there is a problem it's that it's often easier to prevent the doing of something to remove the potential hazard rather than to manage and minimise the risk. 'Just don't allow it' is an easy option for compliance.
What that says to me is that you support not letting kids do woodwork or metal work in school because there is risk of injury.

No soldering of electronics, they might burn their fingers. No mains power Pi because, well, high voltage.

No gas pipes and bunsen burners in science classes, they might burn themselves. Never mind interesting chemicals to experiment with, might be toxic.

No experimenting with the likes of Van der Graaf generators.

No sport. They might brake something playing football or whatever.

No swimming, they might drown.

We might as well go further:

Don't feed them at lunch time. They might have an allergy or some other food problem.

In fact, lets make school really safe, they don't have to attend at all. After all there is nothing interesting left to do or learn there so they might as well stay safely at home.

I'm sorry, I think this is lunacy. The idea that anything and everything that is a bit dangerous should simply be banned to prevent injury, no matter how educational and worthwhile it is. That idea is a grave risk to kids education!

Despite my description of the potentially dangerous things we did back in school my experience was that the most dangerous place was the gym and sports field. There were many injuries and one guy died playing football (Turned out he has a hole in the heart problem). I'm not sure that many would want to ban sports in school because of the risks.
Memory in C++ is a leaky abstraction .

User avatar
Burngate
Posts: 6051
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Power on or off while playing with GPIO

Sat Dec 01, 2018 11:23 am

Don't know whether it's relevant or not ... when I was a kid, I was a regular visitor to A&E -and none of it happened in school.

One of the last times was a summer job at a flour mill - I shouldn't have been doing it, it was the foreman's job, but a full pallet needed moving, so I got the forklift truck, mixed up forward and backward, and ran it over my toe.

Then there was the time a pedestrian stepped out in front of me. Came flying up my windscreen - don't know who was more surprised, him or me, but after taking him to A&E, there was endless trouble with the police - fortunately a bus driver saw it all and came forward to tell them what he saw.

User avatar
Imperf3kt
Posts: 2876
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Power on or off while playing with GPIO

Sun Dec 02, 2018 9:46 pm

Heater wrote:
Sat Dec 01, 2018 8:43 am
hippy,
I cannot see anything wrong in eliminating and reducing exposure to unnecessary hazards or undue risk,...If there is a problem it's that it's often easier to prevent the doing of something to remove the potential hazard rather than to manage and minimise the risk. 'Just don't allow it' is an easy option for compliance.
What that says to me is that you support not letting kids do woodwork or metal work in school because there is risk of injury.

No soldering of electronics, they might burn their fingers. No mains power Pi because, well, high voltage.

No gas pipes and bunsen burners in science classes, they might burn themselves. Never mind interesting chemicals to experiment with, might be toxic.

No experimenting with the likes of Van der Graaf generators.

No sport. They might brake something playing football or whatever.

No swimming, they might drown.

We might as well go further:

Don't feed them at lunch time. They might have an allergy or some other food problem.

In fact, lets make school really safe, they don't have to attend at all. After all there is nothing interesting left to do or learn there so they might as well stay safely at home.

I'm sorry, I think this is lunacy. The idea that anything and everything that is a bit dangerous should simply be banned to prevent injury, no matter how educational and worthwhile it is. That idea is a grave risk to kids education!

Despite my description of the potentially dangerous things we did back in school my experience was that the most dangerous place was the gym and sports field. There were many injuries and one guy died playing football (Turned out he has a hole in the heart problem). I'm not sure that many would want to ban sports in school because of the risks.
This post is silly and unnecessary. People are suggesting taking safety precautions, not banning the activity outright!

Wear gloves while soldering to avoid burning your fingers.
Wear safety glasses to avoid metal shavings getting in your eyes while operating a lathe.

Turn the Pi off before plugging things into it!
Have some common sense!
55:55:44:44:4C
52:4C:52:42:41

User avatar
RaspbianDK
Posts: 16
Joined: Fri Oct 26, 2018 12:21 pm
Location: Denmark

Re: Power on or off while playing with GPIO

Mon Dec 03, 2018 7:39 am

Definitely always play it safe!

hippy
Posts: 6080
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Power on or off while playing with GPIO

Mon Dec 03, 2018 8:17 pm

Heater wrote:
Sat Dec 01, 2018 8:43 am
hippy,
I cannot see anything wrong in eliminating and reducing exposure to unnecessary hazards or undue risk,...If there is a problem it's that it's often easier to prevent the doing of something to remove the potential hazard rather than to manage and minimise the risk. 'Just don't allow it' is an easy option for compliance.
What that says to me is that you support not letting kids do woodwork or metal work in school because there is risk of injury.

No soldering of electronics, they might burn their fingers. No mains power Pi because, well, high voltage.

No gas pipes and bunsen burners in science classes, they might burn themselves. Never mind interesting chemicals to experiment with, might be toxic.

No experimenting with the likes of Van der Graaf generators.

No sport. They might brake something playing football or whatever.

No swimming, they might drown.
No; I was not saying or supporting any of that at all.
Heater wrote:
Sat Dec 01, 2018 8:43 am
We might as well go further:

Don't feed them at lunch time. They might have an allergy or some other food problem.

In fact, lets make school really safe, they don't have to attend at all. After all there is nothing interesting left to do or learn there so they might as well stay safely at home.

I'm sorry, I think this is lunacy. The idea that anything and everything that is a bit dangerous should simply be banned to prevent injury, no matter how educational and worthwhile it is. That idea is a grave risk to kids education!
Well done. That's a mighty big straw man you built then kicked over.

I don't, and never have, subscribed to a view that "anything and everything that is a bit dangerous should simply be banned".

You need to direct your criticism at those who do, not me, who doesn't.

Return to “General discussion”