Answers.Body: <p>Welcome to Bricks.SE. Yes, you can use the Power Functions equipment to teach robotics. I would recommend you stick with the original PF instead of PoweredUp, as the latter has more complicated electronics and control schemes, however, others have already built custom control software for PUp so tinkering with software is definitely possible.</p>
  <p>Regarding Power Functions, the components have a 4 wire cable with 2 providing a constant 9V and ground, and 2 that are used for sending control signals (fluctuating values between 9V and 0V). Device identification is done through resistors, which is easy to mimick should you want to build your own motors, but this might not even be necessary as you want to build and configure your own controller. And the cable is easy to split and modify.</p>
  <p>@Philo who is a regular here maintains a site (<a href="http://www.philohome.com" rel="nofollow noreferrer">www.philohome.com</a>) on which you can find a wealth of information regarding PF. This would be the best place to start.</p>
  <p>If you are planning to use an RPi, make sure you get a suitable motor driver. You can power the motors via the driver at 9V, and use a buck converter to give your RPi 5V directly via the GPIO, just be careful because there is no overvoltage protection if used this way. Powering an Arduino or compatible microprocessor is also an option.</p>
  <p>One word of warning: Power Functions components are retiring this year, so make sure you get your component order in from LEGO ASAP.</p>
  <p>Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-16T15:28:16.723Z
Answers.Text: Thanks for your very thorough and informative answer ! It seems like power functions would perfect for my project but I didn't realize they are getting discontinued and I don't fee like it would be a good idea to start a project with discontinued items ... What about Lego Powered Up ?
Answers.UserDisplayName: TheMackou
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-17T11:57:22.347Z
Answers.Text: I mention PUp briefly in my answer. PUp is great for teaching the software part of Robotics, as it allows for much more automation out of the box than PF ever did. It even supports microPython on the controllers themselves. That said, the hardware side of robotics is much harder with PF due to the increased complexity of components and the proprietary plug which is hard to replicate (though you can still cut and splice cables). Hence my recommendation to look at PF.
Answers.UserDisplayName: Phil B.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-17T22:22:30.560Z
Answers.Text: PoweredUp motors are very similar to PF motors and can be powered directly if desired. There are schematics online for how to drive the pins and for how to interface PF components to PU hubs.
Answers.UserDisplayName: Mr. Shiny and New 安宇
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-14T14:12:21.860Z
Answers.LastActivityDate: 2020-11-14T14:12:21.860Z
Answers.UserDisplayName: Phil B.
Body: <p>I am a robotics engineer and I would like to introduce and teach my girlfriend to robotics. I would like to first get her the material for the first project. I would love to build a small Lego car controllable via radio commands. I want everything plugged to a Raspberry Pi and start from SCRATCH. I want to develop the motor controllers with her, then the drivers, then the control loop, etc.</p>
  <ul>
  <li>Is the Lego Power Functions system a good idea to start such a project?</li>
  <li>How easy is it to plug everything to a Raspberry?</li>
  <li>What kit should I start with?</li>
  </ul>
  <p>Thanks a lot guys !</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-13T14:54:33.477Z
Comments.Text: Just a quick question, have you checked if your girlfriend shares your idea? I mean, would she like to learn robotics, and if so, then in this way? That's arguably a more important question than which system to start with.
Comments.UserDisplayName: zovits
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T09:45:50.963Z
Comments.Text: @Michael Verschaeve I dont allow you to judge my personal life. I'm sorry you feel so sad to give your opinion about the fact I have a gf or not.
Comments.UserDisplayName: TheMackou
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T09:46:06.807Z
Comments.Text: @zovits if you dont want to answer the question just don't.
Comments.UserDisplayName: TheMackou
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T13:00:53.313Z
Comments.Text: I'd love to answer, but I know nothing about motor controllers, so I didn't write an answer. I wrote a comment to help clarify the question. And yes, Michael's comment above is really unhelpful and borders on insulting, so I flagged it as such.
Comments.UserDisplayName: zovits
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T13:16:18.030Z
Comments.Text: See [this question](https://bricks.stackexchange.com/q/10863/10369)...
Comments.UserDisplayName: Uli
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T13:24:09.087Z
Comments.Text: Is [this](https://www.raspberrypi.org/forums/viewtopic.php?t=31421) of any use?
Comments.UserDisplayName: mindstormsboi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-14T14:01:45.393Z
Comments.Text: Welcome TheMackou. Other regulars, can we keep it civil please? Let’s just focus on answering the question at hand. Thanks.
Comments.UserDisplayName: Phil B.
Tags: <programming><power-functions>
Title: Using Power functions to teach robotics
UserDisplayName: TheMackou
ThreadText: # Using Power functions to teach robotics
  
  (Asked by: username_0 on 2020-11-13)
  
  I am a robotics engineer and I would like to introduce and teach my girlfriend to robotics. I would like to first get her the material for the first project. I would love to build a small Lego car controllable via radio commands. I want everything plugged to a Raspberry Pi and start from SCRATCH. I want to develop the motor controllers with her, then the drivers, then the control loop, etc.
  
  * Is the Lego Power Functions system a good idea to start such a project?
  * How easy is it to plug everything to a Raspberry?
  * What kit should I start with?
  
  Thanks a lot guys !
  
  **Tags:** programming, power-functions
  
  > **Comments:**
  > **username_1**: Just a quick question, have you checked if your girlfriend shares your idea? I mean, would she like to learn robotics, and if so, then in this way? That's arguably a more important question than which system to start with.  
  > **username_0**: @Michael Verschaeve I dont allow you to judge my personal life. I'm sorry you feel so sad to give your opinion about the fact I have a gf or not.  
  > **username_0**: @username_1 if you dont want to answer the question just don't.  
  > **username_1**: I'd love to answer, but I know nothing about motor controllers, so I didn't write an answer. I wrote a comment to help clarify the question. And yes, Michael's comment above is really unhelpful and borders on insulting, so I flagged it as such.  
  > **username_2**: See [this question](https://bricks.stackexchange.com/q/10863/10369)...  
  > **username_3**: Is [this](https://www.raspberrypi.org/forums/viewtopic.php?t=31421) of any use?  
  > **username_4**: Welcome username_0. Other regulars, can we keep it civil please? Let’s just focus on answering the question at hand. Thanks.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2020-11-14. Score: 2
  
  Welcome to Bricks.SE. Yes, you can use the Power Functions equipment to teach robotics. I would recommend you stick with the original PF instead of PoweredUp, as the latter has more complicated electronics and control schemes, however, others have already built custom control software for PUp so tinkering with software is definitely possible.
  
  Regarding Power Functions, the components have a 4 wire cable with 2 providing a constant 9V and ground, and 2 that are used for sending control signals (fluctuating values between 9V and 0V). Device identification is done through resistors, which is easy to mimick should you want to build your own motors, but this might not even be necessary as you want to build and configure your own controller. And the cable is easy to split and modify.
  
  @Philo who is a regular here maintains a site ([www.philohome.com](http://www.philohome.com)) on which you can find a wealth of information regarding PF. This would be the best place to start.
  
  If you are planning to use an RPi, make sure you get a suitable motor driver. You can power the motors via the driver at 9V, and use a buck converter to give your RPi 5V directly via the GPIO, just be careful because there is no overvoltage protection if used this way. Powering an Arduino or compatible microprocessor is also an option.
  
  One word of warning: Power Functions components are retiring this year, so make sure you get your component order in from LEGO ASAP.
  
  Good luck!
  
  > **Comments:**
  > **username_0**: Thanks for your very thorough and informative answer ! It seems like power functions would perfect for my project but I didn't realize they are getting discontinued and I don't fee like it would be a good idea to start a project with discontinued items ... What about Lego Powered Up ?  
  > **username_4**: I mention PUp briefly in my answer. PUp is great for teaching the software part of Robotics, as it allows for much more automation out of the box than PF ever did. It even supports microPython on the controllers themselves. That said, the hardware side of robotics is much harder with PF due to the increased complexity of components and the proprietary plug which is hard to replicate (though you can still cut and splice cables). Hence my recommendation to look at PF.  
  > **username_5**: PoweredUp motors are very similar to PF motors and can be powered directly if desired. There are schematics online for how to drive the pins and for how to interface PF components to PU hubs.  
  
  ---
  
  