Recommended Posts

I'm working on a range of bricks for Arduino - mechanically compatible with LEGO technic, electronically compatible with Arduino - which I plan to make available in our bricklink store early next year.  Below you have a short video with a demo: a servo motor controlled by a rotation sensor, both are connected to an Arduino nano board.  What do you think ? What else would be useful?

Both the motor and sensor are fully LEGO compatible:

4dbrix-servo.jpg

4dbrix-servo-rotation-sensor.jpg

Some technical details on the motor and sensor:

Motor:

  • 0-180 digital servo
  • housing dimensions: 3 x 4 x 5 studs
  • technic axle connection to motor
  • 4 technic peg connectors on the front
  • 4 technic axle connectors on the sides (2 on each side)

Sensor:

  • measures rotation with a resolution up to 1 degree
  • variable resistor
  • 360 rotation capabilities
  • housing dimensions: 3 x 4 x 2 studs
  • technic axle connection to sensor
  • 4 technic peg connectors on the top

Share this post


Link to post
Share on other sites

Interesting project, it looks like you've well on your way.  Is there a reason why the servo is limited to 180 degrees and doesn't have continuous rotation?  It would make it more versatile, especially since the sensor can be turned 360 degrees. 

Share this post


Link to post
Share on other sites
1 hour ago, BusterHaus said:

Interesting project, it looks like you've well on your way.  Is there a reason why the servo is limited to 180 degrees and doesn't have continuous rotation?  It would make it more versatile, especially since the sensor can be turned 360 degrees. 

Most servo's have a limit like that. There are hardly any 360 and/or continuous servo's compared to the cheap analog and limited ones (I know, LEGO NXT / EV3 had them and they are of course available). The reason is that they often use a potentiometer and a typical potentiometer has a limit like that. So it is possible but the servo would be larger and typically much more expensive.

Share this post


Link to post
Share on other sites
1 hour ago, JopieK said:

Most servo's have a limit like that. There are hardly any 360 and/or continuous servo's compared to the cheap analog and limited ones (I know, LEGO NXT / EV3 had them and they are of course available). The reason is that they often use a potentiometer and a typical potentiometer has a limit like that. So it is possible but the servo would be larger and typically much more expensive.

I'm not sure about the rarity of continuous servo motors, as they are found everywhere in industrial applications.  Maybe this argument holds true for the hobby world (Lego, RC), where the demand for more expensive components is too low for such products to be on the market.  Then again, an EV3 motor exists and is very affordable.

I realize that Lowa would not be producing motors on the same scale as Lego, but he could justify the price difference by making a superior product, with features like less backlash or more power.  A 180 degree servo seems very limited considering the amount of control available with an Adruino board. 

Share this post


Link to post
Share on other sites
42 minutes ago, BusterHaus said:

I'm not sure about the rarity of continuous servo motors, as they are found everywhere in industrial applications.  Maybe this argument holds true for the hobby world (Lego, RC), where the demand for more expensive components is too low for such products to be on the market.  Then again, an EV3 motor exists and is very affordable.

I realize that Lowa would not be producing motors on the same scale as Lego, but he could justify the price difference by making a superior product, with features like less backlash or more power.  A 180 degree servo seems very limited considering the amount of control available with an Adruino board. 

As JopieK said the 360 degree / continuous rotation servos tend to be bigger.  The goal here was to have a small versatile servo.  There are plenty of applications where 0-180 degree  range is sufficient and the smaller size is an advantage.  

But indeed, the 0-180 range is going to be an issue for same applications.  I'm also looking at continuous rotation servos and 360 degrees servos.  An interesting alternative might also be a small stepper motor.  I have a working prototype, see picture below and it seems to have potential: there are 2048 steps per rotation.  The stepper is 4x5x5 studs.

The goal is indeed to have a wider range of motors including some 'high performance' ones.  What type of applications did you have in mind ?  What kind of motor would you like to see ?

4dbrix-stepper.jpg

Share this post


Link to post
Share on other sites

This is really interesting. 

I've been looking for an arduino to PF motor adapter (shield) that would not require rewiring as well as an encoder feedback. This way you could use the PF motor you want, control it from the arduino and getting the necessary feedback from the encoder to handle acceleration and relative positions.

A simple switch (for end position detection) would be great too for zeroing your axis.

 

 

Share this post


Link to post
Share on other sites
20 hours ago, oracid said:

I am very interested.

I open a thread on the subject on the French robotic forum, http://www.robot-maker.com/forum/topic/11007-lego-arduino-raspberry-pi/ 

We look forward to availability.

Great, and thank you for spreading the word and sharing the link!

19 hours ago, Minique85 said:

This is really interesting. 

I've been looking for an arduino to PF motor adapter (shield) that would not require rewiring as well as an encoder feedback. This way you could use the PF motor you want, control it from the arduino and getting the necessary feedback from the encoder to handle acceleration and relative positions.

We've been experimenting with DC motor drivers in combination with PF motors so that's certainly a possibility.

A simple switch (for end position detection) would be great too for zeroing your axis.

Do you mean something like this ?

41DiwJdoXeL._AC_US160_.jpg

Share this post


Link to post
Share on other sites
6 hours ago, Lowa said:

Do you mean something like this ?

Yes, this is an option, or even a capacitive sensor would be another option. I find the EV3 switch very bulky. something compact and cost effective would be great. 

Share this post


Link to post
Share on other sites
7 hours ago, Minique85 said:

Yes, this is an option, or even a capacitive sensor would be another option. I find the EV3 switch very bulky. something compact and cost effective would be great. 

Capacitive? Why would one want that? I don't think that will help detecting other bricks, only e.g. human touches.

Share this post


Link to post
Share on other sites

Very interesting indeed and for sure would love to see more 'integration' of Arduino/RaspberryPi/Lego. I, myself, have made the switch/jump to the two platforms and those 'teach' real life programming skills. In all honesty, I find programming for Arduino/RPI way more 'intuitive/rewarding' than doing a block-diagram with Mindstorms. 

Now, not sure how the Arduino/RPI platforms will compete/co-exist with the Mindstorms, though an Arduino/RPI is way more affordable.

If anything at all, maybe TLG will see the benefits of developing this option seriously (Arduino/RPI), rather than their own language/platform/hardware ... etc.

Good Luck with the project :)

Edited by DrJB

Share this post


Link to post
Share on other sites
3 hours ago, JopieK said:

Capacitive? Why would one want that? I don't think that will help detecting other bricks, only e.g. human touches.

I meant like those for example on this page http://www.fargocontrols.com/sensors.html

Although mechanical switch will be more cost effective and sufficient, other sensor types can open different possibilities. 

 

 

 

Share this post


Link to post
Share on other sites
10 hours ago, DrJB said:

Very interesting indeed and for sure would love to see more 'integration' of Arduino/RaspberryPi/Lego. I, myself, have made the switch/jump to the two platforms and those 'teach' real life programming skills. In all honesty, I find programming for Arduino/RPI way more 'intuitive/rewarding' than doing a block-diagram with Mindstorms. 

Now, not sure how the Arduino/RPI platforms will compete/co-exist with the Mindstorms, though an Arduino/RPI is way more affordable.

If anything at all, maybe TLG will see the benefits of developing this option seriously (Arduino/RPI), rather than their own language/platform/hardware ... etc.

Good Luck with the project :)

Thank you!

And I agree, I don't find the block-diagram programming very intuitive either, not with Mindstorms, not with LabView (the National Instruments software on which the Mindstorms software is based).  I'm also not sure why it's considered to be 'easier' than coding...  I find it much harder to read that standard code.

Share this post


Link to post
Share on other sites
48 minutes ago, Lowa said:

Thank you!

And I agree, I don't find the block-diagram programming very intuitive either, not with Mindstorms, not with LabView (the National Instruments software on which the Mindstorms software is based).  I'm also not sure why it's considered to be 'easier' than coding...  I find it much harder to read that standard code.

Fully agree as well, I like the ease of use and flexibility of the Arduino platform. A good bridge between the board and LEGO such as this project is a day one purchase for me. So many automation possibilities become available.

Smart sensors would be required afterwards though (color, RFID) to really enable cool creations.

On the other hand, I understand LEGO 's approach with Mindstorms being targeted mainly at kids/education, function blocks are I believe easier to understand when you begin programming. You can also open your Mindstorms to Python or other languages. The main issue for me is the limited number of interfaces per brick and associated cost, compare to Arduino platforms.

Share this post


Link to post
Share on other sites
1 hour ago, Lowa said:

I'm also not sure why it's considered to be 'easier' than coding...  I find it much harder to read that standard code.

I can clearly understand your views. I think it has to do with habits. LabView code can be particularly hard to read, when it's not encapsuled good enough. What was most nerv wrecking for me was the lack of references in LabView :) And Node-Based Programming Languages can be a very good starter for kids, who never saw code in there life.

Share this post


Link to post
Share on other sites
On 20-12-2016 at 11:13 PM, Minique85 said:

I meant like those for example on this page http://www.fargocontrols.com/sensors.html

Although mechanical switch will be more cost effective and sufficient, other sensor types can open different possibilities. 

 

 

 

Reedsensors would often do the job I guess! That is how I most of the time detect trains etc.

Share this post


Link to post
Share on other sites
6 hours ago, JopieK said:

Reedsensors would often do the job I guess! That is how I most of the time detect trains etc.

Interesting solution...  Is there any reason why you chose reed sensors and not hall effect sensors ?

Share this post


Link to post
Share on other sites
6 hours ago, JopieK said:

Reedsensors would often do the job I guess! That is how I most of the time detect trains etc.

Me too.  They are cheap, simple and easy to implement on the Arduino. Need to use only 2 wires.  Although, the glass type can break if you're not careful bending the leads. 

reedswitch_zpssgzqljqj.jpg

Share this post


Link to post
Share on other sites
1 hour ago, dr_spock said:

Me too.  They are cheap, simple and easy to implement on the Arduino. Need to use only 2 wires.  Although, the glass type can break if you're not careful bending the leads.

Indeed, I haven't used reed switches yet, but that was my main major concern.  That's why I was wondering if they have a major advantage that makes is worth taking the risk of breaking your sensor...

Edited by Milan
Image removed. No need to quote previous post together with image.

Share this post


Link to post
Share on other sites
On 2016-12-18 at 7:35 PM, Lowa said:

An interesting alternative might also be a small stepper motor.  I have a working prototype, see picture below and it seems to have potential: there are 2048 steps per rotation.  The stepper is 4x5x5 studs.

The goal is indeed to have a wider range of motors including some 'high performance' ones.  What type of applications did you have in mind ?  What kind of motor would you like to see ?

A stepper motor could be a very interesting addition, indeed. It would fill the void between servo and regular motors.

As far as applications, I don't have any specific ones in mind.  The only thing I could suggest is making your product different from Lego's offerings, so it stands apart and offers something that people want.  Your motors could have a different form factor, making them easier to integrate into projects. The large EV3 motors have a pretty cumbersome shape and the output is on the sides of the length.  Yours could have an output on one end of the length, like the medium EV3 motor or any PF motor.  Dual outputs would be a plus, but would raise complexity.

Share this post


Link to post
Share on other sites
20 hours ago, dr_spock said:

Me too.  They are cheap, simple and easy to implement on the Arduino. Need to use only 2 wires.  Although, the glass type can break if you're not careful bending the leads. 

Better not use the glass ones! There are also plastic varieties. They are much more expensive but really great: http://www.mouser.com/ds/2/240/Littelfuse_Reed_Switches_59170_Datasheet.pdf-938258.pdf both the leaded and 'gull wing' variety are usable: if you have ok soldering skills, adding a wire to them is not that difficult. The ones I have just fit between studs.

Very easy to connect to Arduino: GND --- REED SENSOR ---- [ lead to digital input ] --- 10k resistor --- 5V (or 3.3V)

sensor.png

About Hall effect sensors: I do use them for non-LEGO projects that I (professionally) work on. They are way too complicated for simple operation in the LEGO realm in my opinion (especially for trains). Binary detection is good enough. What I prefer b.t.w. is putting them behind a latch chip, in case your Arduino was just busy sending Serial output you have a chance to miss e.g. a fast moving train, the latch will 'remember' that the sensor was high for a moment until you ask your Arduino to reset the latch. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.