rwaldron / johnny-five

JavaScript Robotics and IoT programming framework, developed at Bocoup.
http://johnny-five.io
Other
13.3k stars 1.77k forks source link

Basic Motor Example as Shown is Slightly Dangerous #1232

Closed lyzadanger closed 6 years ago

lyzadanger commented 8 years ago

http://johnny-five.io/examples/motor/

This could lead to melting an Arduino; circuit should have protective diode at least and external power optimally.

I can take this as part of the motor-example work I'm doing but wanted to make sure there weren't any dissenters.

dtex commented 8 years ago

But isn't "Danger" your middle name? 😃

We have a similar situation with the servo.png diagram where we are not showing external power. Brownouts are a pretty common experience when wired that way.

Resseguie commented 8 years ago

There was some discussion on the servo one when it was first created. I seem to remember that Rick was leaning towards simplicity and shortest path to get something moving for new users. But it's a common problem that we should probably address somehow to relieve frustration when users move from micro servos to ones that are more powerful (and power hungry).

tinoromero commented 6 years ago

Hi @dtex, may I help out with this?

dtex commented 6 years ago

@juventinoromero Absolutely! That would be very much appreciated.

We also have #1308 which is very closely related to this.

We keep all the fritzing diagrams in /docs/breadboard so there is plenty in there to crib from.

tinoromero commented 6 years ago

@dtex is the request to change the circuit image to one with a protective diode? If so, does it need to be drawn with fritzing?

dtex commented 6 years ago

@juventinoromero Yes, that's exactly right we just need the diode added and we do need a fritzing drawing along with generated png. Are you familiar with fritzing? It's pretty easy to use (and free).

I also think we should add a text block in the fritzing diagram warning users that most motors will require external power.

@reseguie The argument to keep things simple is very compelling but as @lyzadanger points out the risk of not having a diode on a directly connected motor is a cooked Arduino. The risk of a servo drawing too much current is just a brownout.

tinoromero commented 6 years ago

@dtex here is the new PR: https://github.com/rwaldron/johnny-five/pull/1433