Shop OBEX P1 Docs P2 Docs Learn Events
Parallax Scribbler (S2) Robot - Ultra Violet Laser & XBee & LOGO (Part 2 of 5) — Parallax Forums

Parallax Scribbler (S2) Robot - Ultra Violet Laser & XBee & LOGO (Part 2 of 5)

GarethGareth Posts: 278
edited 2014-01-30 12:06 in Robotics
Parallax Scribbler (S2) Robot - Ultra Violet Laser & XBee & LOGO (Part 2 of 5)

This is the second in a series of 5 Videos going from basic to advanced hacking of the S2 robot.

This second modification uses an UltraViolet Laser (the one I use can be focused for really thin line details)
IMG_0663.jpg
IMG_0662.jpg


The 1mW Blue (400nm) Laser simply fits into the pen slot of the S2 , it is driven off the Hacker Port via a transistor which means it can be switched ON/OFF under software control.

S2_Laser_Xbee_Breadboard_bb.png


I am using a version of LOGO found off the www.parallax.com OBEX data base. Documentation

The code was modified to accommodate the new laser commands, basically the Laser switches on whenever there is any type of forward motion.

The LOGO commands are being transmitted via an XBee radio link as the original long serial communications cable often tied itself up.


The components are directly soldered to a 3 pin female header socket which slots straight into the Hacker Port.
The Laser module just plugs into a 2 pin female header.
IMG_0770.jpg


The end result 5 point star plotted onto a sheet of Phosphourescent vinyl :-
IMG_0773.jpg


To get the 5 pointed star I am using the stock XBee "XCTU" Serial terminal ....
You can program packets of LOGO commands and send them over the 2.4Ghz tube.
LOGO_S2_5PointStarCode.jpg


Maths Challenge :- How can you accurately calculate the radius of the final big circle; given only the length of one side (20.0cm) and the angle that the scribbler turns to draw the next side (144°) .
(The answer is 10.51cm however what is the formula......???)

If you want to peep at the maths behind it then check the attachment below ;-)
1024 x 1365 - 85K
1024 x 768 - 58K
1024 x 768 - 41K
1024 x 768 - 33K
1024 x 765 - 75K
1024 x 1365 - 166K

Comments

  • ercoerco Posts: 20,256
    edited 2014-01-24 17:46
    Darned creative and impressive, Gareth! Nice accuracy on that star. Or pentagram, you robotic Sorcerer!

    You may be in Switzerland, but I find it hard to stay neutral about your numerous accomplishments! :)
  • GarethGareth Posts: 278
    edited 2014-01-25 03:11
    erco wrote: »
    ... robotic Sorcerer!
    You know Erco I often do things without knowing why I do them.... "Blind - Magic" ....regards G
  • ercoerco Posts: 20,256
    edited 2014-01-25 08:35
    Re: Maths Challenge

    More precisely, 10.5146222423826... cm

    R=(L/2)/(cos((180-angle)/2))

    And no, I didn't need to peep at your "maths". That would be cheatin'! :)
  • WhitWhit Posts: 4,191
    edited 2014-01-25 16:51
    Wow! Great work Gareth...
  • GarethGareth Posts: 278
    edited 2014-01-26 06:47
    erco wrote: »
    10.5146222423826... cm
    Correct.....

    "G" Lets cat out of bag.... The reason for inserting the maths challenge came after i had made the video ...... I guestimated (guilty as accused) the the radius before i let the S2 burn its trail...... and pondered afterwards why the 5 points did not touch the last ring....... so i showed it to my son and he got his compass and protractor out ....no problem_io dad_io and made me the attachment.
    ....in my defence ..... when you mess up a run on the phosphor screen you have to wait 3 hours for it to fade before you try again....
  • NikosGNikosG Posts: 705
    edited 2014-01-26 13:12
    Spectacular!!!

    you could also calculate radius r directly from triangle AOB :

    attachment.php?attachmentid=106491&d=1390770683


    edit 3rd line is
    attachment.php?attachmentid=106495&d=1390772062
    1024 x 664 - 52K
    252 x 41 - 4K
  • GarethGareth Posts: 278
    edited 2014-01-26 14:32
    NikosG wrote: »
    ..... triangle AOB
    Nice observation..... it would be cool to see which radius routines would run the fastest......

    BTW I just voided my warranty :- see attachment ....
    1024 x 768 - 66K
  • ercoerco Posts: 20,256
    edited 2014-01-26 16:17
    Leave it to Nikos to pull out a uniquely Greek (Pythagorean) solution! :)

    Efharisto polo, Brother Nikos!
  • NikosGNikosG Posts: 705
    edited 2014-01-28 12:28
    Gareth's Pentagram excited my student's interest and I used the GUI in order to make the "PENTAGRAM" and the contour circle.
    Here is my analysis:

    We know that in order to make a circle as (36 normal polygon) with radius r , the side of the polygon will be s36= sqrt(2)* r *sqrt(1-cos(10o))  s36=r*0,1732
    We also proved (post#7 in this thread) that the contour circle of the pentagram with side S has a radius
    r =S*0,52573112

    attachment.php?attachmentid=106551&d=1390940523

    So the formula that connects the side of the contour circle S36 and the size S of the pentagram will be: S36=S*0,00910593

    Using the s2 GUI in order to make a pentagram with the contour circle we can use the following algorithm:

    attachment.php?attachmentid=106553&d=1390940634

    In my example I had time for the pentagram’s side 4 sec, so the time for the contour circle’s side was 4*0,009110593 =0,036. Here is the result:

    attachment.php?attachmentid=106552&d=1390940605

    Nikos Giannakopoulos
    668 x 230 - 39K
    1024 x 767 - 48K
    1024 x 802 - 201K
  • GarethGareth Posts: 278
    edited 2014-01-29 12:53
    NikosG wrote: »
    ..... excited my student's interest,
    ...this was partialy why i posted the MathChallenge (its exactly what my 15 year old son is learning at momo).
    ...also thanks for the additional info and the neat link (new to me) to your work with the S2s Gui.
  • ercoerco Posts: 20,256
    edited 2014-01-29 13:55
    I like the numerous mostly-erased star circles in Nikos' photo. Almost like historical layers of archeological ruins, each new & improved civilization rebuilding on top of the last.
  • NikosGNikosG Posts: 705
    edited 2014-01-30 06:33
    erco wrote: »
    I like the numerous mostly-erased star circles in Nikos' photo. Almost like historical layers of archeological ruins, each new & improved civilization rebuilding on top of the last.

    Before end up to the algorithm that connects the side of the Pentagram and the size of the contour circle I was trying to approach the right circle by tests (changing the speed or the time on the circle’s side). It is proved futile… So I decided to do the math….
    BTW I have been spending endless time playing ”Age of mythology” , “Race of nations”…… etc. Especially when I’m with my second son Andreas :)
  • NikosGNikosG Posts: 705
    edited 2014-01-30 12:06
    Gareth wrote: »
    To get the 5 pointed star I am using the stock XBee "XCTU" Serial terminal ....
    You can program packets of LOGO commands and send them over the 2.4Ghz tube.

    Gareth,

    Have you done any video with this procedure? (showing the use of the software)?

    In the past you have posted a method to run logo with Xbee. . Do you use the same method in this example?

    Personally although I have made a lot of effort to run Logo with my S2 I haven't achieved it yet!
Sign In or Register to comment.