TinyTwo Speed Controllers

All things antweight

Moderators: BeligerAnt, petec, administrator

Post Reply
User avatar
BeligerAnt
Posts: 1872
Joined: Wed May 15, 2002 12:00 am
Location: Brighton
Contact:

Re: TinyTwo Speed Controllers

Post by BeligerAnt »

If you don't have a solid ground plane you will have to be very careful about your layout and routing to avoid being plagued by noise for ever and a day! :(

Keep your signal 0V tracks separate from your power 0V tracks, otherwise you *will* have problems.

Consider 2 signals in a system. One is high current, the other is low current and susceptible to voltage noise.
If the two signals share a common 0V track on the board they will share a common impedance. They will both have a current flow in the common impedance which will cause a voltage drop along the track.
The high current signal will cause a (relatively) large voltage drop which will be "seen" by the susceptible circuit as a change in signal level. This is often how noise pick-up works.

I have a favourite quote at work from Analog Devices (those guys really know their stuff):
Remember, whilst you can always trust your mother, you should never trust your "ground"
The only advice I can add to that is to always remember Kirchhof's Laws; the current always has to get back to where it starts from. Ground tracks are not some magical equipotential, they have current flows and voltage drops just like everything else. In fact, their current flows and voltage drops are usually much more complex than any other net's.

Here endeth the lesson, hope it's helpful ;)

BTW sorry I didn't get to talk to you at the AWS
Gary, Team BeligerAnt
Rapidrory
Posts: 1160
Joined: Sun Nov 24, 2013 9:54 pm

Re: TinyTwo Speed Controllers

Post by Rapidrory »

Hehe yeah, ground planes have never been my forte; I know that you should have one, but I'm trying to learn how it should be laid out properly for best effect. These ESCs are the first high power PCBs I've ever laid out, so it's all a little hit and miss atm! (Though I have to say in my relatively short time working with electronics, I definitely agree with Analog devices there :L)

That being said, even the 0V line back at the LIPO terminals was pretty wild; even LIPOs don't seem to be able to kick out the very short high current bursts you get from the motor brushes, despite having plenty of capacitors to try keep things quiet. So having an ideal ground plane would help, but only to a point it would seem in this case.

Unfortunately I can't fit a ground-plane on these boards unless I go up to 4 layer boards, which I can't prototype at uni, and would cost a fair bit more to get made proffesionally (although thanks to some advice from Peter, I've found some very cheap suppliers :) )

Here's the ground 'plane' in green on my latest board... Faar from an optimum layout!

Image

Sadly that's the best solution I could come up with.. Not much more I can do other than bulk it up with a layer of solder... Fortunately, It's a very short track (about 10mm long), and all the chips on the board have pretty high noise tolerances, so I think it should at least run well enough to test the concept, and if I'm lucky and testing's all good, well enough to produce!
Rory Mangles - Team Nuts

Robots: Nuts 2 and many more...

NanoTwo Motor Controllers: https://nutsandbots.co.uk/product/nanotwodualesc
User avatar
BeligerAnt
Posts: 1872
Joined: Wed May 15, 2002 12:00 am
Location: Brighton
Contact:

Re: TinyTwo Speed Controllers

Post by BeligerAnt »

It's hard to comment on the layout without knowing the circuit, but as I said it's where the current flows that is the issue.
You also have to consider that your noise is quite high frequency so it's impedance rather than inductance that's important. Minimising track inductance and capacitive coupling between circuits will help.
Vias are a significant source of track impedance. If you can use 2 or more in parallel it will help enormously.

As perverse as it sounds, you may actually be better off splitting your big 0V track into multiple thinner tracks, with a single 'star' point at the battery connection. This allows you to force each circuit to have its own return path. It's a common technique in audio design.

Don't expect a ground plane to magically cure all your problems. It will help but will still need careful design. Splitting the area into several separate return paths with a single star point should work well and having an extra layer to do it on makes routing a lot easier.

Also, for decoupling the supply you need a range of capacitor values. High value capacitors do not work at high frequencies, especially electrolytic types (and even tantalum). I would suggest 10uF, 1uF, 100nF and 10nF (all ceramic) in parallel as a minimum starting point. Since you are seeing noise at the battery terminals you probably need to improve the supply decoupling on the board. The battery has a very low internal (DC) resistance, but has inductance which limits its ability to respond to very fast changes in current draw. It's down to the bulk capacitors to provide the current for these pulses.
Gary, Team BeligerAnt
Rapidrory
Posts: 1160
Joined: Sun Nov 24, 2013 9:54 pm

Re: TinyTwo Speed Controllers

Post by Rapidrory »

All the current for the motors is handled on the left hand side of the board in the picture, so the large, noisy current isn't sent through the vias on either the +ve or 0v. I'll try out some lower value capacitors across the voltage rails; I had a single 4.7uF one on the last set of boards. I need to put in an order for some higher value ones as well at some point.

I've tried to star point it as much as possible within the space available (having built audio equipment before :L); the light green tab is where the battery terminal connects, and either side of that T junction (the large square patches) is the connection to the 0v from the motors (the vias to the other side supply the PIC and the voltage reg). It's better than my last layout, which was just daisy chained, but the problem with wide tracks like that is you seem to get a lot more capacitive/inductive coupling to the logic lines on the underside of the board. This was one of the problems I had on my last board, and although it didn't seem to noticeably effect the performance, it's probably not doing the PIC much good inducing large voltage spikes at it's pins..
Rory Mangles - Team Nuts

Robots: Nuts 2 and many more...

NanoTwo Motor Controllers: https://nutsandbots.co.uk/product/nanotwodualesc
User avatar
peterwaller
Posts: 3213
Joined: Fri Feb 15, 2002 12:00 am
Location: Aylesbury Bucks
Contact:

Re: TinyTwo Speed Controllers

Post by peterwaller »

I must admit I tend to use much larger capacitor values than people seem to recommend as can be seen in the layout of my latest controller.
Image
One of the advantages of incorporating the receiver not only do you save all the wiring but the lead lengths between the receiver and controller are reduced from many cms to a few mm.
Also you don't have to cater for many different ways the wiring can be routed or even different receivers.
All the large current tracks are to the left of the controller chips away from the reciever and microcontroller tracks.
Rapidrory
Posts: 1160
Joined: Sun Nov 24, 2013 9:54 pm

Re: TinyTwo Speed Controllers

Post by Rapidrory »

Just so you all know, this project isn't dead, just dormant till after exams; I'm hoping to get the first 'production' run of these done in time to sell them at the next AWS.

One thing I still can't get is clear information on the legality/ risks of selling these on the open market; I'd really like to be able to sort that, as I'm planning to set up an ebay shop selling various small circuits including these, but if there's a ton of expensive paperwork to do then that kinda ruins that plan.

Where I think I stand atm is that if I sell it as a component instead of a final product, then it's the responsibility of the buyer to test it and ensure that it doesn't catch fire etc. as I have little control over how they are using it, and therefore I'm not liable if it fails in an expensive way... Unfortunately there doesn't seem to be a whole lot of clear information on the web about this sorta thing, so was wondering if anyone could verify/ dismiss that idea?
Rory Mangles - Team Nuts

Robots: Nuts 2 and many more...

NanoTwo Motor Controllers: https://nutsandbots.co.uk/product/nanotwodualesc
User avatar
peterwaller
Posts: 3213
Joined: Fri Feb 15, 2002 12:00 am
Location: Aylesbury Bucks
Contact:

Re: TinyTwo Speed Controllers

Post by peterwaller »

Bearing in mind I have been retired for about 8 years so thing may have moved on but this is what I remember.
To sell electronic parts in the UK and Europe they had to be CE approved.
As part of that they required to pass EMC testing which can cost in the £1000's plus various other requirements.

EMC testing is to check if a piece of equipment is likly to be affected by electromagnetic interference either radiated or conducted or is likely to intefer with other equipment buy means of either radiated or conducted electromagnetic eminations.

Rohs is far more than using lead free solder all the components have to be Rohs compliant and you require documentation to back up all this. There were a total of 6 banned substances mercury, lead, hexavalent chromium, cadmium, polybrominated biphenyls and polybrominated diphenyl ethers the last two being flame retardants used in many plastics but there may be more now.

WEEE is about recycling the product at the end of its life and you either need to set up a system for taking back the product and getting it recycled or joining a scheme run buy one of the comercial recyclers.

There is also saftey testing although being low voltage means this is not as stringent as mains operated gear.

It may well be possible to circumvent some of these by selling them as a kit but I have no knowledge about that.

Here is a link to the government site that is supposed to make it all clear.
https://www.gov.uk/ce-marking

It is the cost and complexity of all this that has stopped me form openly selling controllers but if you are looking to start it might be worth talking to one of the many companies offering consultancy or training but I think you will find the costs prohibitive when you consider the small quantities involved.
Rapidrory
Posts: 1160
Joined: Sun Nov 24, 2013 9:54 pm

Re: TinyTwo Speed Controllers

Post by Rapidrory »

See that's more or less what I had seen originally. However I recently asked my dad about it, as he's a qualified electronic engineer who works for a company building ticket machines. He was the one who suggested that I sell them as components as that affords a lot less liability. He also said that although you need an EMC test sticker, you don't actually need to get the tests professionally done, and as long as you check it's not producing anything huge it's fine (which sound's a bit dodgy to me, but hey). I have access to an RF spectrum analyser so I can check it's EMC emissions up to a few GHz, but the main problem is that the emissions produced by the device are entirely dependent on what motors are connected to, which brings me back to classing it as a component: the device itself does nothing without the user effectively adding to the circuitry, which I have no direct control over and therefore can't be liable for.

As for ROHS compliant, again I would agree with you that I would have expected it to be required, however all the boards in my dad's ticket machines are soldered using lead solder (I would know; I end up having to make half of them :roll: ), and these are sold to councils or large businesses, who are notorious for needing all the correct paperwork and certificates in place (also you can still buy non ROHS compliant components from RS or Farnell, so it's not illegal to sell non ROHS compliant components it would seem).

This is what is confusing me, as although what I've found on the internet has more or less agreed with you, the company my dad works for has been running for years selling to the most pedantic of customers with no expensive certification (I don't know about whether they have CE or WEEE certification). Now either they're doing dodgy business, which would be difficult considering their customer base, or there are a set of loopholes I don't know about... I'm hoping it's the loopholes one; I'll ask the head of the company about it next time I see him :P
Rory Mangles - Team Nuts

Robots: Nuts 2 and many more...

NanoTwo Motor Controllers: https://nutsandbots.co.uk/product/nanotwodualesc
User avatar
BeligerAnt
Posts: 1872
Joined: Wed May 15, 2002 12:00 am
Location: Brighton
Contact:

Re: TinyTwo Speed Controllers

Post by BeligerAnt »

There are a few classes of equipment which are exempt from RoHS for the moment including measuring equipment which is where the company I work for fit in. However there are only a few specific exemptions and they are periodically reviewed. The one for measurement equipment expires in 2017 and will not be extended. I think the only exemptions beyond then will be for certain military equipment.

It is still legal to use non-RoHS parts and solder for the repair of equipment placed on the market before the regulations came into force.

Your equipment will be classed as consumer and will be subject to RoHS. When RoHS II comes into force (in the next year or two) the paperwork gets far more onerous!

I know that originally kits were exempted from EMC testing, but as far as I know they have to meet all other relevant CE-marking directives. I'm not sure whether they are still exempt, nor exactly what constitutes a "kit" vs a "product".

The fact that your equipment needs to be connected to "ancilliary equipment" does not mean that it is not a product nor that it is exempt from EMC testing. Tests are carried out with representative ancilliary equipment connected with the tests arranged such that only the unit under test is actually tested.
There are some different rules regarding "systems" and components thereof but these are generally large installations so I don't think you could apply these rules.

EMC testing for emissions is sadly not as simple as you seem to think. The receiver system has to be calibrated across the entire frequency range. My company can do in-house immunity testing, but not emissions as it's just too difficult. Consequently it's also horrendously expensive.

In order to place a product on the market it has to be CE marked. In order to apply the CE mark it has to meet the essential requirements of all applicable CE-marking directives. It's a legal minefield and as Peter suggests, it's probably best to get professional advice.
Gary, Team BeligerAnt
Rapidrory
Posts: 1160
Joined: Sun Nov 24, 2013 9:54 pm

Re: TinyTwo Speed Controllers

Post by Rapidrory »

Ok, I've done a bit more research, and here's where i'm at:

In regards to RoHS compliance, the easiest way to ensure this seems to be to get the boards assembled by a 3rd party who can then certify it as such (It would also save me a lot of time with a soldering iron). A quick check of online companies gave me a cost of about £1- £2 a board to get them assembled, which isn't too bad.

The main downside of this is that I would have to get a bulk order of boards made, say 500 or so, which could cost me up to around £2000 on just parts and manufacture. I would make that back by selling them, but I would need that money up front to get them made. One thing I've been looking at to solve this is running a kickstarter on it, which would have the added bonus of gauging whether there's a market for these things outside of robot wars; If it doesn't reach it's funding target then there's probably not enough demand to justify it anyway.

As for CE markings, I've been looking through the official directive ( http://eur-lex.europa.eu/LexUriServ/Lex ... 019:en:PDF ) and it says that you only need to affix the CE mark to your product to be able to sell it on the EU market ( Article 8 ). You don't need to produce evidence of conformity unless you are challenged about it. On such a small scale product, which is likely to conform anyway and is only going to be sold in the UK, I feel it is very unlikely. If it is challenged, you have to either run the tests to prove it's conformity or remove it from the market, neither of which are particularly harsh penalties given the probability of it happening. If for whatever reason it turns out I do actually need certification before they go to market, I'll add the cost of it to the kickstarter. CE markings seem mainly to be only checked on exported goods ("Non-compliant products are at risk of being recalled or stopped at customs") so as long as they're not exported I think it should be a fairly unlikely to be challenged.

For the moment, I'm going to sell a hand assembled run of prototypes straight to you guys, to check their reliability and that it's actually worth selling them on the open market. If they pass this, I'll start getting these things sorted for the open market. One of the reasons I'm looking into this is that Will wants to use them in his robot kits, which are sold on the open market, which (I think) would require CE marked components. The other reason is it's some what of an experiment to see if it is possible to legally sell stuff on the open market without ridiculous start up costs, as I would quite like to sell other miniature circuits eventually.

(Source: http://ec.europa.eu/enterprise/policies ... m?filter=6 )

EDIT: Hmm, looking through some of the other directives that i'd missed first time round (namely the RoHS and EMC ones)... looking slightly less promising, but I'm still determined to work something out :L
Rory Mangles - Team Nuts

Robots: Nuts 2 and many more...

NanoTwo Motor Controllers: https://nutsandbots.co.uk/product/nanotwodualesc
Post Reply