Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital IO for ATMEGA32

Status
Not open for further replies.

j777

New Member
Hi,

I would like to use an ATMEGA32 (power by 5VDC) to operate 9 solenoids, 1 photoeye, and 8 inductive proximity sensors. Below are some specs on these items:

Solenoids - SMC part# SY3120-6LOU-N3 powered with 12VDC system supply. Digital ouputs need to sink current.
https://www.smcetech.com/CC_host/pages/custom/templates/smc_v2/prodtree_product_2.cfm?cc_nvl=((searchPart,sy3120-6lou-n3),(CC,SMC,V_M,1800))

Proximity Sensors - HTM Electronics part# LCM1-1812N-A3U2 powered with 12VDC system supply. VOH = approx. 12V (off/sensing) and VOL = < 1V (on/sensing).
**broken link removed**

Photoeye - Omron part# E3Z-D62 powered with 12VDC system supply.
**broken link removed**

I'm struggling with the best way to do the level translation from 12V to 5V from the inputs. Some ideas that I've considered are diode clamps and optocouplers but I'm not sure which might be best or if there is a better way of doing it out there. As for the outputs I'm considering using some ULN2003A ics to sink the current for the solenoid valves.

I am pretty new to the electronics world so any suggesstions, comments, insights, etc. would be greatly appreciated.

Thanks
 
The ULN2003A should work fine as long as you keep power dissipation in mind - Darlington transistors will saturate at a bit over a volt, just calulate out how much power will be dissipated when the max number of solenoids is activated. If you need higher power capability, a number of companies make Mosfet based parts that have a lower on-voltage.

As for the sensors, the OMRON part seems to be an open collector, so you can just use a pullup resistor (~1K or so) to 5V, and it'll never exceed the logic power supply.

As for the Proximity sensor, I can't get to the datasheet (blinkin plugin...), so I don't know... If it's also open-collector, you can do the same, otherwise just have a single transistor buffer, setup as an inverting common emitter amplifier. You might be able to get away with a ~10K resistor connected directly to the IO line to limit the current to a few milliamps, but a single transistor never hurt.

One question though is isolation - This sounds like it might be for an industrial type app - in which case you might want to use optocouplers for everything. How long are the connections / what's the environment this is going to be used in? How much would it cost if something blows up from ESD/ground loops...

James
 
Thanks for the reply James.

It is indeed for an industrial type application. The solenoid valves would be in the same enclosure as the circuitry but the proximity sensors and photo eye will be positioned 3-8ft outside of the enclosure. Optocouplers seem to me like a good idea but I've never used them and don't know much about what a typical circuit utilizing them would look like. Can you shed some light on this for me? Also, you mentioned the photoeye is an open collector. What does open collector mean and what might I look for in the proximity sensor datasheet to determine this?

Thank you for your help.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top