| View previous topic :: View next topic |
| Author |
Message |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Tue Feb 16, 2010 12:29 am Post subject: |
|
|
Whilst for now I am concentrating on using the existing V3 board, here are some additional thoughts/my input on the next version (V4?)...
Temperature sensor
I believe this appears useful as it allows for an automatic shutdown to be implemented in the firmware if things are starting to get too hot... and it does not take up that much space on the board, therefore I would vote for it to be retained.
Brown outs
I have not had any brownouts (that I am aware of!) since the crowbarring issue was fixed in the firmware; as long as the battery has a reasonable charge or I am running off a PSU - however, maybe this will change once the biped starts to walk properly (currently it can “stand” and “sit” on its own, but other biped tests are not really putting a significant load on the servos). There doesn’t seem to be a problem with a single servo, even with extreme test loads on high power servos (for example: including HS-645MG and MG996R).
Power supply
I would potentially still like to see some kind of improvement. Better isolation? For example: a diode and cap (as a reservoir) to isolate the regulator, I know it means the battery volts need to be bit over 6V as things stand (I am using 7.2V PSU and 7.2v “racepaks”). Maybe it could be optional via a user installed “link”/“jumper” (see “Option pads” below)... possibly even an n-way split (regulator via VBATT, regulator via diode-cap from VBATT, regulator via diode-cap from separate supply or via separate +5V supply).
“Option pads”
If possible some unused pins or other functionality should be brought out to spare pads on the PCB, thus allowing experimenters to easily connect other things... This would even be a way to allow for the “other comms method” option that was suggested - for example: RXD/TXD or the TWI pins can be brought to the external connector by installation of “links”. If there are spare pins in the connector, then this is one way for end users to choose their functionality (GPIO, ADC and for on).
Changing the MCU architecture
I cannot currently see any clear gain to changing the architecture of the MCU, especially as it will probably make it harder to support “legacy” users (those already using V3 boards who do not want the expense or hassle of changing) and also impact other areas (for example: boot loader, changes to dev tools, recoding and so on). But maybe someone has some ideas?
However, changing up to the Atmega328p would provide advantages in terms of memory space for the future, with potentially only a few minor issues and possibly allow better support of the legacy users. Cost wise the Atmega328p appears to be 25% cheaper than the Atmega168 (I had better check that again)...
Dropping the EMF support
I have to agree with Barry. Whilst the idea was nice, sadly the realities are that it hasn’t worked as desired. I know I have spent a lot of time on it (code wise), and I suspect Barry and others have too... dropping it to leave space for the “links”/ “jumpers” options and a better sized board seems like a useful gain.
“we can use fast reading off the 12bit encoder for better resolution.”
When I skimmed the docs, I though the 12bit resolution applied to 360 degrees of rotation, so for “normal” servo use the practical resolution is reduced?
Changing the protocol
Currently happy with I2C. If we rely on the 5V interfaces, then different protocols can be added using the “links” option and writing the appropriate software.
However, adding “RS485”, for example, seems trickier as it would require additional onboard hardware if the servo was to be seen as a true RS485 device. However, one could forgo this and probably implement some compatible protocol locally amongst the servos or other devises connected to the same “bus”, or place the buffer and level shifting hardware externally. I.e. 485 is an electrical connection standard not a data protocol.
Board size
It is a tad wide and a tad deep: all the servo’s I have tried it in need careful paring back of the case structure to get them back together again with the OS board inside. There always seems plenty of free space down towards the pot, so maybe a two piece board is workable. But beware if the encoder hardware takes up a lot of extra space compared to the pot.
Design document
I think it would be useful to have some form of design document set (or spam-protected WIKI pages) that can be updated as things progress and so that everything is available in one place. |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
Posted: Tue Feb 16, 2010 1:39 am Post subject: |
|
|
Hi Kevin, thanks for contributing to this
| kbb wrote: | Whilst for now I am concentrating on using the existing V3 board, here are some additional thoughts/my input on the next version (V4?)...
|
V4 sounds like a good starting point.
Here is where robotfuzz stands with v3 stock. There are 150 ish left. At the current sales rate that is going to be about 6-7 months worth of sales at most. It cost me £8000 to purchase the last lot, and I don't really want to have to invest in another 1000 if we are serious about this route. I am serious.
| kbb wrote: |
Temperature sensor
I believe this appears useful as it allows for an automatic shutdown to be implemented in the firmware if things are starting to get too hot... and it does not take up that much space on the board, therefore I would vote for it to be retained.
|
It stays.
| kbb wrote: |
Power supply
I would potentially still like to see some kind of improvement. Better isolation? (snip) Maybe it could be optional via a user installed “link”/“jumper” (see “Option pads” below)
|
I see this one coming up rather a lot. I was resistant at first as it would make the OpenServo more complex hardware wise. I have been turned by all of your arguments, and think there is something we can do.
I like the idea of jumpers, or wire links that can be bridged to change the +5v source to external.
| kbb wrote: |
“Option pads”
If possible some unused pins or other functionality should be brought out to spare pads on the PCB, thus allowing experimenters to easily connect other things...
|
Ok, I see what you are thinking here. I think it would be reasonable to break out 8 pins in total, HSUART (2), SPI/I2C (3), ADC (2), GND (1)
It would be a tight squeeze, but not unreasonable given potential space savings. We could have them as thin edge wafer connectors to save space.
| kbb wrote: |
Changing the MCU architecture
(snip) But maybe someone has some ideas?
|
After a brief look into it, the added pin pitch, complexity and price (more expensive xtals nail it) is not worth it. Retooling and new build envs are, as you identified, a pain in the arse.
| kbb wrote: |
However, changing up to the Atmega328p would provide advantages in terms of memory space for the future, with potentially only a few minor issues and possibly allow better support of the legacy users. Cost wise the Atmega328p appears to be 25% cheaper than the Atmega168 (I had better check that again)...
|
Farnell says they are more expensive at £3.93 in stall quantities compared with £1.92 for the 168
its tricky though, if you buy enough of either it starts becoming quite cheap, almost a non issue (difference of 40p)
| kbb wrote: |
“we can use fast reading off the 12bit encoder for better resolution.”
When I skimmed the docs, I though the 12bit resolution applied to 360 degrees of rotation, so for “normal” servo use the practical resolution is reduced?
|
Dunno about that one. I was looking at changing the arch to ARM because we can get 12 bit ADC. That would be nice to have. Do any AVRs have this?
| kbb wrote: |
Changing the protocol
Currently happy with I2C. If we rely on the 5V interfaces, then different protocols can be added using the “links” option and writing the appropriate software.
|
Agreed.
| kbb wrote: | | However, adding “RS485”, |
Bad example on my part. I meant any multidrop/daisy chain serial protocol so we could use the faster 4Mbit/s USART.
| kbb wrote: |
Design document
I think it would be useful to have some form of design document set (or spam-protected WIKI pages) that can be updated as things progress and so that everything is available in one place. |
This would be perfect for google wave Shame it is a piece of... so a wiki page it is? _________________ http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/ |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Tue Feb 16, 2010 11:25 pm Post subject: |
|
|
| ginge wrote: | I was looking at changing the arch to ARM because we can get 12 bit ADC. That would be nice to have. Do any AVRs have this?
|
No ATmega AVRs with 12-bit ADC as far as I can tell.
The Battery management AVRs do, but the range is limited and I think if we look closer we might lose things that might be needed? And the package sizes are a tad large, maybe too large. Ditto the "XMEGA" and they come with features one probably doesn't need (which means they are likely to be too expensive). When I get a moment I will see if any of the parts with 12-bit ADCs look like they will be worth looking into. But the large package sizes probably mean a servo case friendly PCB will be hard or impossible.
Edit: 17 Feb 2010: One possible problem with the XMEGA appears to be that the supply range is 1.6 to 3.6V. The physical size would have been okay with the correct package. And the cost seems okay too.
Comparison of current Atmel products: here.
Otherwise, the two most practical options to get 12-bit ADC (which would be nice for the pot too) would seem to be:
1) An architecture change as mentioned!
2) Use of an external ADC device with a serial interface in some small package form such as SOT23-6. It is probably possible to jury rig one to an existing V3 board to try it out.
Rejected (not that I am an expert on it) is "oversampling", because it would need a clean signal and the "right sort of noise" (which I think also means extra components). It also takes up extra CPU cycles. I did experiment with it on the V3 board, but whilst it showed possible promise, I think it was also clear that to make it really work any where near acceptably it would require some signal conditioning to occur and a method of injecting the right sort of noise. Oh, and probably a cleaner power supply! There is a nice article on the Atmel website about oversampling here (article AVR121). But I suspect using an external 12-bit ADC would be simpler and more practical.
Last edited by kbb on Wed Feb 17, 2010 10:42 pm; edited 2 times in total |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 352 Location: Maine USA
|
Posted: Wed Feb 17, 2010 12:40 am Post subject: |
|
|
I seem to recall you can increase your accuracy by adding noise to it. Such that if your signal is between two ADC values, lets call them 1 and 2, and your value is 1.2. Your ADC will read 1. If you take 10 samples and add random noise to those samples, at times the noise will raise the sample such that it reads 2, not 1, and the rest of the time it will read 1. Then average the readings should produce a reading of 1.2 not just the 1.
Just a mild brain far. It might be easier to do something like that, then changing the brain. |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Sat Feb 20, 2010 2:49 pm Post subject: |
|
|
Moved here from: "OpenServoV3 and OSIF, servo problem"
| ginge wrote: | I have just seen the XMEGA range from atmel are now reasonably priced. In fact, the XMEGA32 is now comparable in price with the atmega168
It gives us some amazing gains compared with the normal atmega range. here is what I have worked out so far:
1x 12-bit ADC with 4? channels
higher res PWM + more channels?
DMA - we can transfer the ADC result directly into the result registers with no interrupts
It also still uses TQFP44 package, so we know it will fit and it relatively simple to solder.
I'm going to investigate this more, but here is the link to the farnell page:-
http://uk.farnell.com/atmel/atxmega32a4-au/mcu-8-16bit-xmega-32k-flash-44tqfp/dp/1748557 |
The supply range of the XMEGA is 1.6 - 3.6V, which may mean some extra buffers/drivers would be needed. EN_A/B and the external comms for example? On the other hand it should help with the "PSU" side of things.
Using the XMEGA probably involves quite a bit of coding and other development work, which would leave existing V3.x users behind or make it harder to support them?
| ginge wrote: |
1x 12-bit ADC with 4? channels |
Up to 12 inputs channels (from pins) multiplexed into 4 separate "results" registers.
| ginge wrote: |
DMA - we can transfer the ADC result directly into the result registers with no interrupts |
Okay! I am not sure how useful that would be to something like OpenServo, as it is probably more work to set up and use than the IRQ way! - Interrupt latency shouldn't be an issue for OpenServo. |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
Posted: Sat Feb 20, 2010 2:53 pm Post subject: |
|
|
hmm my original post is now here: no idea what happened there!
I have just seen the XMEGA range from atmel are now reasonably priced. In fact, the XMEGA32 is now comparable in price with the atmega168
It gives us some amazing gains compared with the normal atmega range. here is what I have worked out so far:
1x 12-bit ADC with 4? channels
higher res PWM + more channels?
DMA - we can transfer the ADC result directly into the result registers with no interrupts
It also still uses TQFP44 package, so we know it will fit and it relatively simple to solder.
I'm going to investigate this more, but here is the link to the farnell page:-
http://uk.farnell.com/atmel/atxmega32a4-au/mcu-8-16bit-xmega-32k-flash-44tqfp/dp/1748557 _________________ http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/ |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
Posted: Sat Feb 20, 2010 3:00 pm Post subject: |
|
|
| Quote: | | The supply range of the XMEGA is 1.6 - 3.6V, which may mean some extra buffers/drivers would be needed. EN_A/B and the external comms for example? On the other hand it should help with the "PSU" side of things. |
I think we will be forced down 3.3v eventually anyway. I don't see this as a big problem. Sure, things like the OSIF are going to need to run at 3.3v, but that is a pretty minor issue.
| Quote: | Using the XMEGA probably involves quite a bit of coding and other development work, which would leave existing V3.x users behind or make it harder to support them?
|
Looking at the new arch, and reading around ofr some time, it seems like the 168 to xmega is possible, and doesn't require any code changes to anything other than the new modules.
Yes that means quite a lot to as as we rely on them heavily, but I don't think it is deal breaker for the v3 folks.
| Quote: | | Okay! I am not sure how useful that would be to something like OpenServo, as it is probably more work to set up and use than the IRQ way! - Interrupt latency shouldn't be an issue for OpenServo. |
yeah, it looks pretty tricky to set up, but so are IRQs in the new arch. It probably doesn't even matter anyway! _________________ http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/ |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Sun Feb 21, 2010 11:43 pm Post subject: |
|
|
I have been looking at the various MCUs and architectures. The ATXMEGTA32A4 looks like a good choice to me. It seems a bit odd that the cost is lower than the ATmega168/328, even if we look at the 64K ATXMEGA64A4. The 64K looks like a drop in replacement for the 32K, so there is an upgrade path if needed.
Is a 12 bit ADC sufficient for everyone’s needs? Based on the V3 based servos I have here, that would equate to a resolution 0.05 degrees of pot rotation.
The most practical way that the resolution could be increased is with a separate ADC chip. From a cost point of view, the sample rate decreases with increased resolution. Noting that the ATXMEGTAxxA4 has two TWI buses and two SPI busses, there can be an onboard comms method for “upgrades” (e.g. add a higher res ADC chip via the “option pads” solution) as well as retaining the host comms. No bit-banging required! |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
Posted: Mon Feb 22, 2010 12:03 am Post subject: |
|
|
| Quote: | | No bit-banging required! |
That was the intention! We could also use the spare TWI bus as a hookup to an external board similar to the OpenEncoder for use with 16bit ADCs, quadrature or whatever.
2 SPI busses on board has me thinking. We could use them as individual ports for daisy chaining cables to and from the v4 and allow for a fast 4MB/s bus. When a command is not for that board, it shifts it out to the next servo asynchronously. There is no reason why we couldn't do multimaster here. The number of pins required for this is quite large, and may not be worth the trouble.
It also looks like the clocks on the XMEGA are much simpler to configure than the atmega. This may also be a good time to look at our core "heartbeat" architecture. Without the EMF sensing, the heartbeart system is not needed, and we can go asynchronous/more synchronous with ADC. _________________ http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/ |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 352 Location: Maine USA
|
Posted: Mon Feb 22, 2010 1:20 am Post subject: |
|
|
About hardware, I'd like more drive capability. I put a note on the wiki, but perhaps if we drove it with an equivalent of the VNP20N07 set as an H bridge of course. I found that these little servos are just to small for what I wanted to do with them. More current ='s more power.
I know there are inductive drive combo chips out there, like those that drive fuel injectors. Are there equivalents for an H bridge? I'd bet there are, but I haven't had a chance to look yet. |
|
| Back to top |
|
 |
ginge Site Admin
Joined: 14 Jan 2006 Posts: 1029 Location: Manchester, UK
|
Posted: Mon Feb 22, 2010 6:49 pm Post subject: |
|
|
It isn't a bad idea to get some meaty FET driver in there, but I wonder exactly how much more current you can push into a small servo. I have melted a couple by supply too high a current and voltage.
I assume an inductive bridge doesn't waste the field current as head when forward flowing through the diodes? TO be honest with you, I thought for a pure inductive bridge to work, it requires an AC motor... is this not the case? _________________ http://www.headfuzz.co.uk/
http://www.robotfuzz.co.uk/ |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 352 Location: Maine USA
|
Posted: Mon Feb 22, 2010 7:49 pm Post subject: |
|
|
| eh? I don't follow. |
|
| Back to top |
|
 |
kbb
Joined: 01 Jun 2007 Posts: 180
|
Posted: Mon Feb 22, 2010 10:01 pm Post subject: |
|
|
| jharvey wrote: | About hardware, I'd like more drive capability. I put a note on the wiki, but perhaps if we drove it with an equivalent of the VNP20N07 set as an H bridge of course. I found that these little servos are just to small for what I wanted to do with them. More current ='s more power.
I know there are inductive drive combo chips out there, like those that drive fuel injectors. Are there equivalents for an H bridge? I'd bet there are, but I haven't had a chance to look yet. |
The OpenServo board is currently designed to fit inside a “standard hobby servo”, and I would imagine that this is probably going to be its most common use in the future too. Thus there is an issue with supplying lots of power directly on the standard board, that is: what can the traces in the PCB and the host connector take? Look how many VA you can draw through the VNP20N07: answer, probably a fried PCB and hirose connector!
High power MOSFETs, like the VNP20N07, are also probably impractically large (physically) for a board that is supposed to fit inside a standard servo case and would therefore raise the cost and likely cause installation issues for standard servos. It would be fiddly, but probably not impossible, to have a newly designed board allow one or the other to be installed: however, the “what can the PCB and host connector take?” issue would remain. Which brings us to:
Current (and future) OpenServo solutions for big servos:
Think of the standard sized OpenServo board as a controller (the brain):
Option 1 (horrible, not recommended, see DANGER: below):
Remove the low power MOSFETs from the OpenServo
Attempt to solder the high power MOSFETs in their place
Bolster the power linkage from the power input to the MOSFETs with solid core shielded copper wire capable of handling the maximum current that will be drawn Option 2 (better):
Remove the low power MOSFETs from it
Mount it on a carrier board that has the power MOSFETs and also sufficient copper to handle the amps, with the appropriate control linkages from where the MOSFETs used to be on the OpenServo, etc.
DANGER: the caveat for both options 1 and 2 is: you are likely to fry the hirose connector if you use it to supply the power and draw a large current, so I would recommend making some arrangements to deal with that... and make sure the connection to the motor is also capable of handling the power drawn.
Maybe we can make such option 2 easier to implement in the new design. For example, where the standard MOSFETs are soldered on to the OpenServo PCB, maybe through hole plated pads can be provided to be used as an alternative connection allowing it to be connected as the “brain” to the power MOSFETs board.
Option 3 (best):
So finally, one could explore simply having an alterative PCB design featuring the larger MOSFETs, better current capacity and a different connector (it would be a larger PCB). The “core layout” would be identical between the different boards.
There are two more things (that I know of) that might need thinking about if using high power MOSFETs:
1) If they were to be used at voltages higher than the OpenServo is designed for
2) The high power MOSFETs might need a harder drive for their gates than would currently be supplied
these might needs some tweaks to how the ATmega/XMEGA drives them (a few more transistors may suffice?). |
|
| Back to top |
|
 |
jharvey co-admin
Joined: 15 Mar 2009 Posts: 352 Location: Maine USA
|
Posted: Tue Feb 23, 2010 1:37 am Post subject: |
|
|
Hmmm, perhaps the brain board could be the normal OpenServo board, capable of driving standard sized servo's. It would need to include some vias or similar attachment options for a separate power upgrade board.
I think it can be expected that more power will cost more. I suspect that most people will be looking at this as a hobby servo option, however the PID algo's inside, make this attractive as a general purpose control board.
I know the layout is currently tight, but we are also talking about simplifying it. So perhaps that will decrease the cost of real estate, and make room for some vias that could be used to attach add-on modules. |
|
| Back to top |
|
 |
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|