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?

Reply to
mlw
Loading thread data ...

Well, you might want to take a look at my H-Bridge design at

formatting link
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
formatting link
If you need a fast solution that is probably a better bet. No personal experiences though with that design.

Regards, Andras Tantos

Reply to
Andras Tantos

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.

Reply to
the Artist Formerly Known as K

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!

Reply to
mlw

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:

formatting link
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?

Reply to
the Artist Formerly Known as K

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 "

Reply to
mlw

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

Reply to
Wayne C. Gramlich

Doh!! The keyboard is not my friend.

Reply to
mlw

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.

Reply to
the Artist Formerly Known as K

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.

Reply to
Andy P

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

formatting link

Reply to
D. Jay Newman

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

formatting link

Reply to
D. Jay Newman

LM628 and LM629, but the JRKerr chips are arguably better in many ways.

Mitch

Reply to
Mitch Berkson

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.