Burnt transistors, start again?

Yesterday, while scoping out my motor control system, I had a real great smoke show. I ordered some replacements and they came today (with some
spares)
(Please no microcontroller debate -- please)
The current system that needs repair is a stand-alone unit that uses an analog signal, +- 5V. 0 is stop, negative is reverse, positive is forward. It is a bit more complex that I'm comfortable documenting.
A simple H-Bridge and a simple circuit would be easier to construct and describe, and possibly reduce the cost of the robot.
I am *not* open to a microcontroller suggestion with the only caveat that I would consider it if it (a) cost less than $2.00 *AND* (b) is not programable. It may contain a small micro, but it is no way to seem like one. My no general purpose microcontroller is an important design goal
Anyone know of a good I2C PWM interface?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Well, you might want to take a look at my H-Bridge design at http://h-storm.tantos.homedns.org/h-bridge.htm . You can download the schematic and the PCB design along with the source code for the microcontroller (yes, it uses one, and yes, it is around $2.00). It uses the I2C bus for interfacing and back-EMF for speed-feedback. It has a lot of features, some I didn't have time to document yet - you have to look in the source-code to figure them out at the moment. It has the PID loop integrated in it for example so your PC can give it speed and/or distance updates and it will do the rest. No need for tight control-loops on the host system. You communicate with it like you would with an I2C memory: you have a parameter block that you can read and write. It also has a softaddress-assignment protocol with PnP discovery (thing SMB 2.0 ARP, but not the same) so you can have multiple of these on the same bus and assign them addresses when your app fires up. This project is still under some development, but most of the design is completed and stable (I would say somewhere between beta and release quality). I also know that Devantech has some I2C H-bridges (http://www.robot-electronics.co.uk/shop/20A_H-Bridge_MD032008.htm ). If you need a fast solution that is probably a better bet. No personal experiences though with that design.
Regards, Andras Tantos
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

I2C is a data bus. You want to appy PWM to an h-bridge using i2c -- is this correct? How could you _possibly_ do this without an intervening microcontroller? Or am I missing something?
I'm not sure what you mean when you say the microcontroller "must not seem like one" and not be programmable, but I'm guessing you want an OTP device (which will actually be much cheaper). Other than that, there's no such thing as a microcontroller that's not programmable -- they can all be programmed at least once. Did you mean you want to purchase a device pre-programmed?
If not:
You will pretty much want a device with i2c hardware on board if it is to act as a slave. It's easy to bitbang a master, but it's more of a pain to bitbang a slave.
I think the PIC16F818 works. I2C/SPI/asynchronous serial hardware, built in PWM, 5 channel AD, blah, blah. Internal oscillators if you want to use them, so I imagine the only external parts you'll need are a pullup resistor and a bypass cap. 3 bucks or so in individual quantities, less than $2 for 25 or more. The SOIC version is actually $1.89 in single unit quantities.
It IS flash programmable, however, but this just makes your job easier -- otp parts generally require that you get a uv-erasable part to develop your code on (unless you're REALLY confident in your coding abilities). If you REALLY don't want it programmable after you've prgrammed it, there's a code protect option on all PICs that will lock out further programming.
--
(Replies: cleanse my address of the Mark of the Beast!)

Teleoperate a roving mobile robot from the web:
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
the Artist Formerly Known as Kap'n Salty wrote:

Sigh, yes, you are missing something.
I could just take an 8Bit parallel I2C bus, apply it to an R2R ladder, feed that into one terminal of a comparitor, and apply a ramp to the others, and violla! PWM. There are a great many ways to do it.
I would like a nice 8pin dual PWM generator, write a 7 bit PWM and the 8th bit would be direction. That would be sweet. Maybe even dual!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote: [snip]

*sigh* no -- I'll give you the benefit of the doubt and assume we're not talking about the same bus. Most folks would would have thought you meant this:
http://www.semiconductors.philips.com/markets/mms/protocols/i2c /
Technically, it's pronounced "i-squared see", but usually written I2C or i2c. This is a two-wire data bus with a defined electrical specification. It is not 8-bit parallel -- i2c is serial by definition.
What bus were *you* talking about?
--
(Replies: cleanse my address of the Mark of the Beast!)

Teleoperate a roving mobile robot from the web:
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
the Artist Formerly Known as Kap'n Salty wrote:

This is why there are always arguments, everyone here is so excited to critisize or find error, and then assume great ignorance or stupidity, rather than assume there was a typo. Geez.
(1) I assumed people would know what I2C was, I assumed people would know that I knew it as well.
(2) I did, infact type "8bit parallel I2C bus," and accidentally forgot to add "interface chip." Something like an PFC8574A.
Actually there is another way do do it cheaply without analog, create an oscilator, run a 7 bit counter (74XX393 -- dual 4bit), Feed the count output to two 74XX688 (XX = LS, HC, etc.) comparators. Connect the PFC8574A to the other side of the comparitors. Take the "<" signal as your PWM.
Program your pulse width as an 7 bit number into the PCF8574A. While the count is lower then the value programmed, the pulse output is high, otherwise it is low.
If your smart, your would use different sides of the comparator for the different motors, that way at 50% or less duty cycle, two motors would not be on at the same time.
$1.50x2 for the I2C chips $0.75x2 for the comparators $0.52 for the dual counter. $3.00 for the oscilator components.
Approx: $8.00
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

For other people's edification, the part number appears to be PCF8574A, a simple two letter transposition typo.

By the way, the lowest quantity 1 price I found for the PCF8574A is $1.88 from DigiKey. (I use <http://www.findchips.com/ for these kind of price comparison queries.)
What started this whole flurry of traffic was your following original question:

^^^^^^^^^^^^ A number of us answered that using a dedicated microcontroller is less expensive.
After much back and forth, the following gem came out:
> Not at all. I have said, over and over, that microcontrollers have their > place in well defined tasks but that I would not base a robot on one > because they are too limited. This has been taken to mean that I would > never used one anywhere. Its not true. > > I have done my share of micro development and it doesn't interest me. > In this project, the sub $500, robot, it will not use any because they > cost too much. ^^^^^^^^^^^^^
FACT: The control of two motors can be done with a single dedicated microcontroller (PIC16F630) that costs $2.05 quantity 1 from Digikey. Here's a URL for one such design:
<http://gramlich.net/projects/robobricks/dualmotor1amp/rev_c/index.html
It drives two motors with direction control and a number of other goodies.
You are free to build your motor drive electronics any way you want, since it is your robot. However, other people who read this list for advice should be aware that there are significantly less costly ways of getting the job done ($2 vs. $8)
-Wayne
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wayne C. Gramlich wrote:

Doh!! The keyboard is not my friend.

The original premise still exists, but I was looking at it, while testing, and it does have an amount of touchy analoge circuity. I'm not comfortable describing how it works, it uses an integrating oscilator, and the types of people likely to build this robot have probably not covered this type of circuit.

And I have said repeatedly that it was not an option, so can we please drop it? At the top of this thread, I asked that we not debate this in this thread.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

Sorry, but this is usenet. You are allowed to express your opinions, we are allowed to express ours.
The *only* disagreement I've seen is that you claim your analog circuit is cheaper and most of us say a dedicated microprocessor is cheaper.
There are *many* motor control solutions out there, off-the-shelf. I seem to recall that you wanted OTS parts.
They are not generally programmable, except for upgrades.
Some use USB, some use the serial port.
However, at the heart of all the solutions I've seen has been a microprocessor or equivilent. I *think* that Nat Semi makes a chip dedicated to closed-loop control and PWM. I remember seeing this some time ago and don't remember exactly where.
And your solution still have the PWM driver going to some sort of H-Bridge I believe, -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
D. Jay Newman wrote:

LM628 and LM629, but the JRKerr chips are arguably better in many ways.
Mitch
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
MLW:
One further comment.
You talk about selling a $500 robot, yet all the prices quoted have been retail.
If you're going to sell this in quantity you can buy whoesale and probably get lower prices.
Just my opinion, of course. -- D. Jay Newman http://enerd.ws/robots /
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote: [snip].

OK -- now you're just whining. Nobody around here is capable of reading minds, and frankly that was one hell of a typo. But as I wrote -- I was willing to give you the benefit of the doubt. 2) below makes clear what you were attempting to say -- I get it.

Or you could go the $3.25 microcontroller route. The only other ancillary components required would be a 10k resistor and a bypass cap. (plus any required connectors, which you have in either case). Cost is lower by a factor of around 2.5, and part count is FAR lower - 1 IC and two discrete components, versus at least 5 ICs and an unknown number of discrete components. The circuit itself is substantially simpler, and likely has a smaller footprint (if that matters).
The only reason I can think of to avoid the microcontroller route is if you are ONLY planning on publishing the design itself, and don't want any potential users to have to program a chip, AND you don't want to otherwise provide the chip already programmed. Is this the case?
If you're planning on producing a finished product or kit, though, it makes no sense to go with a higher part count and a greater total expense.
--
(Replies: cleanse my address of the Mark of the Beast!)

Teleoperate a roving mobile robot from the web:
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
mlw wrote:

I would suggest here using either the Microchip MCP23016 16 bit i2c i/o expander at ~1.28 a chip, and save yourself 1.50 (not much, but in production quantities it could mean thousands), on top of the board cost, and development costs. It's basically just two 8 bit i/o's stuck together.
Another option would be the Maxim MAX7300. This is a more expensive chip ($2.55 budgetary from maxim site, cant find anyone who actually stocks it and is willing to put pricing on thier website), but it will give you 20-28 i/o's, which you could use for direction control etc from just the one chip, and still have your 16 i/o's for the D2A.
As far as I2c PWM controllers...for motors I have never seen any. There are LED dimmers and blinkers though. T%hey're really not what you would want to use for easy PWM, but the dimmers will go up to about 150hz (probably not high enough for your application?) and are fully programable in both frequency and duty cycle, with 8-16 or higher outputs. Generally, though, they're set up for two different "blink rates" on power up, then you just send a command to switch between the blink rates. You can, however, set different rates for every pin, and use diode switching to mix them all together onto each motor through an H-bridge. Possibly even mixing the actual pins together so as tog et even more "steps". You can reprogram the rates on the fly if you wanted though, but it's alot of i/o. Beyond that, I cant think of any way to pwm control motors with a dedicated i2c chip (aside from uC's, but you specifically asked not to get into that).
On the counter front, you could use a programable divider such as those used in a frequency synthesizer. You could then just use more i2c i/o (or possibly an i2c divider, though I dont know of one off hand) to set the divsion rate to anything you wanted from 0 to thousands.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.