BasicMicro - Forums

www.basicmicro.com
It is currently Sat Feb 04, 2012 5:50 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 1:06 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Ok i read the nano does not support hservo.
But does it support servos at all? I mean without using an external servo controller like the pololu ones, or ssc-32.

If so, what kind of commands does it need? An example of some commands would be nice, like position 0, -90* and +90 degrees.
I'm asking before i buy.

Additionally, can i use the serial In/out programming pin as a serial in pin for sending commands?

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 8:01 am 
Offline
Master

Joined: Tue Nov 21, 2006 9:34 am
Posts: 500
Hi Fallentine,

I am pretty sure the Nano can support servos. Could be wrong, But my guess is it supports the servo command (not in the current draft document?). It can also support the pulsout command, which a lot of out programs used.

The nice thing about the HSERVO command is that you can issue the command one to have the servo go to a position and forget about it. With the pulsout command you issue the correct length pulse for the location you wish and then you need to repeat this about 50 times a second...

Kurt


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 9:26 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
Most micros can run a few servos. The nano is no exception. You can use the servo command (servo pin,positon{,repeat}) or you can use the pulsout command and send the correct length pulse. Note that you need to constantly be sending pulses to servos every 20ms so you need to write your program accordingly.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 3:22 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
I'm trying to expand my current atom pro 28, so i can make a quadruped or hexapod, but on a budget, so i won't be getting an ssc32 or arc32, though i really really want one.
Just need an extra 4-6 servos.


Though i'm also trying to get my boyfriend into robotics, so i want to get him started on the cheap, though i MIGHT go with a pololu baby orangutan for him, since it has a built in bidirectional motor controller.

I wouldn't mind seeing the arc32 with a built in 2 x 5amp motor controller.


On topic:
Will the normal servo command, will it work like, set and forget?
IE
servo p5, 0, 20
or what ever.
And then i can move on to something else? IE will it continue to repeat in the background?



Also can i use the bidirectional serial port on the nano for command signals? like
serin s_in,i9600, blah blah blah?

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 4:39 pm 
Offline
Master

Joined: Mon Jul 17, 2000 10:00 am
Posts: 155
The servo command runs only in the foreground. So it would move the servo, wait, then move onto the next command. Yes the nano serial ports same as AtomPro serial port. Also have you seen the Nano driver board? http://www.basicmicro.com/Nano-Driver-Board_p_52.html It will do what you want? I have some interrupt code laying around here to drive the servos. We do have a version of this coming out that has an ATOM Pro mounted on it. Should retail cheap.

Funny you mention the ARC with motor controller. Was kind of thinking about making something like that. Do you have a website you post on? Or blog?

_________________
Servo Controller - ARC32!


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Fri Aug 27, 2010 5:34 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
I only post here, the pololu forums (rarely) and most commonly, lynxmotion.
I don't have a blog or anything.
The nano driver board is a bit to large. I was thinking of soldering an IC socket onto a 1.5"x1.5" circuit board, and making a mini bot board of sorts.

If you design an arc32 with mother controller, I'd be more than willing to test any samples, and give any feedback.
The first naming scheme that came to mind was MARC-32. For Motor-ARC-32.
The command should be simple, and have it connected by serial internally probably.

motor m1,speed/m2,speed ;speed being -100, 0, 100
or
motor m1,speed,direction/m2,speed,direction ; speed 0-100, direction, 0 = forward, 1= reverse.

It can be linked by serial, or what ever way you can figure out, and all the programing can be done in the Studio itself. So noobs don't need to type out 50 serial commands.

Now then, feel free to dismiss this, but a 4 channel motor controller, 3-5A per channel.
My boytoy wants to make a Ghost in the Shell tachikoma, which is a quadruped, with two 3dof arms, and a wheel on each foot. So it's high speed and can climb over stuff. He and i would have to get about $1000 together to make it, so it's a bit out of budget, but it's still an idea.
Though really 2 channels would be fine, we could use an external motor controller in addiction to a built in one.
As the guys at Lynxmotion all know by now, i'm poor, my robot hobby budget is small, about $20 a month.
I actually just returned a sweet brand new unused soldering iron i bought at radioshack a couple weeks ago, just so i can buy a bread board.
I bought a new soldering iron tip for my old iron instead. $21, vs $2
Look at how sweet this thing is.
Never even got to use it!

It's small and light, and look at all those tips!

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Sat Aug 28, 2010 12:21 am 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
Hello, Fallentine.
When in doubt, share the load.
Have a look at this circuit diagram:
Attachment:
Fallentines Servo Ckt.PNG
Fallentines Servo Ckt.PNG [ 23.66 KiB | Viewed 488 times ]

The idea is to use four other 8-pin PICs, each driving its own servo. These little guys are PICAxe-08Ms (AKA P8M). Each P8M (as I understand it) can do hardware servo control. Even if this isn't true, having each one use bitbang should be good enough for this job. These PICs have five I/O pins available each, but we are only using 3 for communications between the Pro and the P8M, and another for servo control, which leaves one free for, say, reading a sensor. These also have a free BASIC to use. But, I have studied this line of processors, and they are very limited when compared to the Atom/Pro lines. But these 8 pinners are just great for this one limited task.

These can be purchased for cheap ($8 for 3, before S&H) at PH Anderson:
http://www.phanderson.com/picaxe/index.html
Looks like these can fill your budget. And they don't need a crystal, so no expense or bother there.

The AtomPro basically signals the appropriate P8M for which servo it wants driven, and which direction, ClockWise (CW) or CounterCW. The P8M goes thru a loop looking at the state of the control pins and driving the servos accordingly. Depending on which pin (FWD, BKWD, STOP) the Pro turns on, the motors are all driven in the same direction, or in different configurations to turn, or signalled to a full stop.
Or you could use one pin per P8M to implement a serial port. Send it a command as to what the Pro wants it to do, and at what rate. Once all four are "programmed", pulse another "GO" pin to tell the P8Ms to act on that command.

Does any of this help you?
Have a nice project.
kenjj

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Sat Aug 28, 2010 1:32 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Sounds like a neat idea, i wouldn't mind using such micro controllers for other more basic projects. But for that price, i could simply get a nano 18/24.
But in the mean time, my atom pro should work for my robot, having just learned i can use p16-p19 with the BB2 (that very first row of headers)
I should be able to make a quadruped with it.

If i get a nano 18, i'll see about making an ultra small quadruped. I was thinking of programming it and adding a button, so i can make it grab and ride on one of my cats. Would freak the cat out.. should be fun.
I'm really interested in these nano 18's. They are so small, but so very functional, all the possibilities are just swarming in my head right now. :D


I plan on making the quadruped with my atom pro, but if i get a nano 18, i'll switch to the nano instead.
14 user pins = 12 for the 3DOF legs, and 1 for a camera pan and 1 to spare.. giving my camera doesn't freak out my new servos, which i should be getting next week.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Sun Sep 05, 2010 4:44 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Reset on the nano.
Ok the Nano needs a 10k resistor between the VCC and the Reset pin to run correct?
How do i trigger a reset? The botboard 2 for the atom/atom pro has a button, how do i connect a button?

Do i connect a button bypassing the resistor directly between the VCC and the Res pin?
Or do i need to use a inverse debounce switch (usually connect, press to disconnect)

I'm going to make a botboard nano for the nano 18.
Also is the nano pro that you mentioned is coming out, will it have the same size and pinouts as the nano 18?

I'm going to make this botboard nano before i purchase a nano as i might just wait for a nano pro instead.
It would be really awesome to make a botboard nano for the nano pro. Then i'll take high res pictures or even my botboard nano and send them to jim, see if he wants to put them into production.
Sending me a couple free boards of course d(^_^)b

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Sun Sep 05, 2010 11:08 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
The 10k resistor is called a pullup resistor. You can then connect a normally open button directly to the reset pin. The other side of the normally open button connects to ground. When you push the button it will pull the reset pin to ground causing the chip to go into reset.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Sun Sep 05, 2010 9:14 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Acidtech wrote:
The 10k resistor is called a pullup resistor. You can then connect a normally open button directly to the reset pin. The other side of the normally open button connects to ground. When you push the button it will pull the reset pin to ground causing the chip to go into reset.


Excellent, thanks.

Another question,
Using this picture below as a reference, do i attach pin4 to RES, or pin 7.
The reason i ask, is my Atom Pro 28 says to connect ATN pin to RTS, however it's connected to pin 4, Data terminal ready.
Is the same done for for the atom nano?
This is important as i plan on putting the RS-232 connector on my upcoming botboard nano, and i want to use the same connector i use for my atom pro, which is a 4 pin header.
Image



I'll attach a spoiler of my upcoming botboard nano, this is version 0.1, i'm actually on 0.4 right now, i've made a few changes, and i have Ideas for more changes, like put the resistors/diode under the IC socket, so i don't waste so much space.
Also going to include some extra stuff too, it's gonna be rockin sweet.
I did all the wiring layouts in photoshop using layers, so when i go final and actually make the thing, i can do the wires individually, as it's sort of a big mess.


Attachments:
File comment: Botboard Nano 18, ver 0.1
11.png
11.png [ 643.57 KiB | Viewed 444 times ]

_________________
Image
Basic Micro Blog
Universal Robot Controller
Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Mon Sep 06, 2010 9:10 am 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 11:00 am
Posts: 784
Location: Temecula, CA
Some of our boards use RTS and some use DTR. if oyu are desiging your own board use DTR. But Studio is setup to use both DTR and RTS so if either is attached to RES you will be ok.

_________________
Nathan Scherdin
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Mon Sep 06, 2010 10:15 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Thanks, that's exactly what i wanted to hear.
I replaced the serial port on my bot board II, with a 4 pin header, which uses DTR, i then added a 4pin receptical onto the rs232 header i took off the botboard2. Picture
And THEN make a long rs-232 cable which has the 4 pin header.

So when making this botboard nano 18, i'll be able to use my already made programming cables.
I already got permission from Jim Frye at Lynxmotion to call my upcoming board the Bot Board Nano 18.
I can send out my noobish MSPaint/Photoshop blueprints for it when i finish them.

I got a few questions now.
When is the atom nano pro be ready for sale, and what's the estimated price?
Will there be an 18 pin version?
If there is an 18 pin version, will the pinout be the same as the current atom nanos?
And last, is there any way i could get on an early list to test the atom pro nano?


Attachment:
11x12 no BT.png
11x12 no BT.png [ 619.26 KiB | Viewed 434 times ]

In this photo, it's ver 0.3, the gold things in the IC header, are resistors, and the brown thing next to it is a diode, in v0.4 one of the resistors is under the diode instead.
I'll upload some better pictures when i get done, it doesn't make much sense as it sits right now, i have all the labels in my head.
When i get done labeling everything it'll all come together.
I'll probably have the first actual bot board nano 18 done by next week friday, maybe earlier. Though i don't have a nano chip to put in it.
I'm just really good at soldering, i find it very relaxing.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Mon Sep 06, 2010 1:10 pm 
Offline
Master

Joined: Sun Aug 17, 2008 5:26 pm
Posts: 798
Location: CA bay Area
I was curious to see if I could stuff all that circuitry on a 1.5 by 1.5 inch board.
It wasn't easy.
I cheated some. I used LEDs with integrated resistors, and I saved on the RS232 circuitry by using the $15 USB2SERIAL adapter. The adapter means I only have to supply just three pins to plug it into. And the power-in connector is just a two-pin header, marked for positive and negative. The voltage regulator is the standard TO-220 package. I could have used the TO-92, transistor-like, package, but these can usually only supply 100 mA, and those four servos would eat it alive. If you use a standard part, your Vin should be 9 to 12 Volts. If you can get a high-efficiency, Low Drop Out (LDO) part, then your Vin can be 6 to 12 Volts.
The circuit was so simple I didn't bother with a schematic. Go ahead and ask for one, but there's nothing special about this. There's two pullups for Reset and Serial; two user LEDs on P10 and P11 (one for heartbeat and one for ?!); a header for four servos; all unused P-pins are brought out to header pins for whatever.
I used a process called "copper fill" for top (in red) and bottom (in green) copper layers. The top layer is 5V; the bottom layer is ground. This saves me the trouble of snaking power traces in and out of all the other circuits. It also means you can deliver a LOT of current anywhere on the board! You'll notice some pads look like they are sitting on a cross. These are "thermal fill" pads. These are connected to one of the copper planes. If these were just nailed to all that copper you would have a Hellacious time soldering anything to these. The draw-down on the soldering iron would be huge. The "cross-hairs" design greatly reduces draw-down, but allows for adequate current supply.
Pictures follow.
Later.
Attachment:
FallentineTop.png
FallentineTop.png [ 32.1 KiB | Viewed 430 times ]

Attachment:
FallentineBottom.png
FallentineBottom.png [ 29.07 KiB | Viewed 430 times ]

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Can the nano do servos directly at all?
PostPosted: Mon Sep 06, 2010 10:48 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 9:06 am
Posts: 120
Location: Wisconsin USA
Kenjj that looks fantastic.
I wanted all mine to have full sets of header pins so i can connect servos directly. If you seen my new quadruped on lynxmotion you'll see how small it is, but if i can make this nano bot board i'll be able to reduce it's size even more.

Kenjj, i was considering a 1.5" by 1.5" one too, it would have looked very similar to yours.

The regulators i'd choose would be TO-220s too. 1.5A, and there would be 2.
It would be a tight squeeze on my board, but it should fit, i have plans of moving them around a tiny bit to the edge, so i can put a single piece of copper across the two making a heatsink of sorts.

I'll upload a new pic of my two boards after i'm satisfied with the designs.

I want the boards small, but i want all the header pins in sets of 3 for servos.
But yours is extremely nice, i'd definitely buy one of those if i could get one for ~$10, it would be smaller than mine, perfect for merging into a ps2 controller, or PS/2 keyboard, if basic micro does infact add PS/2 mouse/keyboard support.
Kenjj if you can find someone that can make the PCB cheap, you can sell DIY kits, for cheap. I really like soldering.
Basic Micro should totally sponsor us some nano pro's. The pictures of our completed botboard nanos alone would probably attract a lot of attention. You can name yours the Mini Botboard nano 18.

Don't forget guys to answer my questions a couple post up.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO