Programming ATmega328

I have a volume production item developed using the UNO R3

All it does is this :

  1. Receives 2 channel Analog input 0-5V
  2. Reads the input and directly writes it to the PWM output pins after spanning the value between 0 and 255.
  3. These output Pins in turn drive two MOSFETS like the IRF540 connected to two 24V solenoids.

In effect what I am trying to do is drive two solenoids in proportion to the level of 0-5V command signals.

Once developed and checked out I don't need much of the bells and whistles on the UNO board and I just can pull out the programmed MCU and use it on a simple PCB as required by the end application mentioned above.

I guess I will need a MCU programmer for this. Which is a good economical one ( not a very universal one that will program all MCUs know to mankind)

Any other points to watch out in above proposal ?

Thanks Raghu

A good, cheap ATMega programmer that is supported by the Arduino IDE is the USBASP. You can find them on eBay. Mine cost about AU$2.

Regarding the IRF540, it's not logic-level so shouldn't be directly driven by a 5V micro. You would do well to use logic-level MOSFETs instead.

The most economical programmer is the Arduino itself if you have already one. You can program any ATmega with this (Arduino as ISP). USBasp programmer is often used for ATmegas and it costs about $2 on ebay.

If you load the Arduino bootloader onto the Atmega 328 then you can program it with a USB-ttl connector from the PC.

You can use an Uno to load the bootloader onto the Atmega 328.

…R

OldSteve: A good, cheap ATMega programmer that is supported by the Arduino IDE is the USBASP. You can find them on eBay. Mine cost about AU$2.

Regarding the IRF540, it's not logic-level so shouldn't be directly driven by a 5V micro. You would do well to use logic-level MOSFETs instead.

Thanks for the tip Steve. Can I use the RFP30N06LE MOSFET ? Or is there any other commonly available Mosfet.

Budvar10:
The most economical programmer is the Arduino itself if you have already one. You can program any ATmega with this (Arduino as ISP).
USBasp programmer is often used for ATmegas and it costs about $2 on ebay.

Thanks. I latched on the net o this : http://www.instructables.com/id/Arduino-UNO-as-AtMega328P-Programmer/

Any comments ? My main appeal on this route is the use of the ZIF socket…

Mogaraghu:
Thanks. I latched on the net o this : http://www.instructables.com/id/Arduino-UNO-as-AtMega328P-Programmer/
Any comments ? My main appeal on this route is the use of the ZIF socket…

For the 28-pin chips, a ZIF socket is a good idea. I made boards for my commonly-used chips, with a ZIF socket on the '328P board:-
ATtiny85 & 328P Prog Boards.JPG
Unlike the board in the instructable, my boards are only made for ISP programming, not for serial uploads - I didn’t see the point of incorporating both.

Thanks for the tip Steve. Can I use the RFP30N06LE MOSFET?

Looks fine to me.

In effect what I am trying to do is drive two solenoids in proportion to the level of 0-5V command signals.

This is possible? I consider solenoids capable of two states: plunger in or plunger out. The position of the plunger is variable between those two states?

  • Scotty

scottyjr: This is possible? I consider solenoids capable of two states: plunger in or plunger out. The position of the plunger is variable between those two states? - Scotty

Proportional Solenoids and Valves

Proportional Solenoid Vs On-Off Solenoid Valve

scottyjr: This is possible? I consider solenoids capable of two states: plunger in or plunger out. The position of the plunger is variable between those two states?

  • Scotty

Good question !! You are right - Solenoid valves are binary - either in or out.

But I am driving a proportional solenoid and hence the current level in the solenoid decides how far the spool moves.

I see that Steve has already y put out the difference chart.

Thanks for pointing this out !