element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Help on I2C question
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 11 replies
  • Subscribers 394 subscribers
  • Views 861 views
  • Users 0 members are here
  • iot_holidaylights
  • sparkle_ball
Related

Help on I2C question

clem57
clem57 over 10 years ago

Looking for a method/device to address as I2C to turn on/off 12+ volts. It needs to be very small and can have an address set. I will have around 50 different addresses to control 3 lights.

 

Thanks

Clem

  • Sign in to reply
  • Cancel

Top Replies

  • bobcroft
    bobcroft over 10 years ago +1
    Clem, Not I2C but SPI. Have a look at Majenko.co.uk he does a 32 port IO expander board and up to 4 can be used on 4 wires from the Arduino i.e. 128 IO! I use these to drive banks of 8 relays via opto…
  • bobcroft
    0 bobcroft over 10 years ago

    Clem,

              Not I2C but SPI.  Have a look at Majenko.co.uk  he does a 32 port IO expander board and up to 4 can be used on 4 wires from the Arduino i.e. 128 IO!   I use these to drive banks of 8 relays via opto couplers, these come as ready made boards.  The realys can switch any voltage you like.

     

    The Majenko stuff is very good quality and he produces a library to drive the boards.

     

    Bob

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • binarygenius
    0 binarygenius over 10 years ago

    does it have to be i2c because there is a lot of ways to address 50 transistors switching 12v+ but if you have to use i2c maybe a port expander with transistors connected could work something like Expanding the number of I/O lines using Microchip MCP23008 | Embedded Lab it would help if you could say more about the project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    @bobcroft

         I could use SPI interface from what you show. Researching that angle. Would like something elegant/simple to do...

     

    @Michael Oldfield

         Need to check this one out too because transistors should be rather inexpensive. MCP23008 could be the key to switching these. About how fast do you think this can occur (the switching).

     

    Thanks to all,

    Clem

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • binarygenius
    0 binarygenius over 10 years ago in reply to clem57

    The MCP23008 according to the datasheet MCP23008 - Interface- Serial Peripherals can switch at 100kHz, 400kHz and 1.7MHz I2C with the transistors depends on which ones you use but normally very fast and to save on pins you could do a 7x7 matrix and it should only use 8 pins i think if you have a common ground but that would only be 49 transistors. if you where going to use SPI the 595 series shift register at 20mhz could be a cheap option http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf but can use a lot of memory and you would still need transistors but like i say it is hard to offer solutions without knowing more like how many amps at 12v, what type of load the more info the better.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to binarygenius

    Looking at 300 LED's at 20 mA each for a total around 6 A if all on with white! Really hope not to do this... I plan on feeding this with old 120V-> 20 volt/6 A laptop regulator rated at 90 watt's into a buck DC to DC down to 12 Volts. Am I crazy? LOL

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to clem57

    Oh I plan on dividing these into groups of 3-6 LED's per cup...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 10 years ago in reply to clem57

    If you have all that stuff already then no, not crazy at all

     

     

     

    I would do the same

     

     

     

    Peter

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • binarygenius
    0 binarygenius over 10 years ago in reply to clem57

    i can help with what your planning i had a feeling it was going to be leds and i had to do something similar in a limousine. Their is some great IC`s out their for just this kind of thing but if you are a masochist take a look at http://en.wikipedia.org/wiki/Charlieplexing i dont have much time at the moment but i will help more tomorrow and try and put all i know about controlling large arrays of leds but if they are RGB leds then you will need to triple the current because it is 20ma per colour so 60ma with all three colours on to produce white but if they are being PWM`ed then it is unlikely that you will every reach the full 18A also if you connect some in series you can lower the current but will need to raise the voltage.

    PS its not crazy sometimes you just have to climb the mountain because it is there image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • binarygenius
    0 binarygenius over 10 years ago in reply to clem57

    Hi sorry for being so late but here we go if you have not purchased anything yet then maybe look at something like NeoPixels : Adafruit Industries, Unique & fun DIY electronics and kits they are more expensive than normal led strips but much easier to control and if you look on ebay for addressable leds you will find cheaper alternatives but if you already have 12v strips you can lower the voltage by removing the resistors on the strips which will bring the voltage down to about 6v per color line but it is a lot of work. if you need to have a scale of color and you need to change it fast the TLC59 series IC`s are a better choice than 595 shift registers from Texas instruments LED Driver ICs | Products for LED Drivers | Power Management | TI.com and you will get 8bit grey scale control of each colour which is 256 shades of each colour to mix with both through hole DIP and surface mount IC`s but what every you do I think you are going to need to use transistors.

     

    Logic level transistors would be best due to the lower gate voltage something like the IRLZ44N but depending on whether the strips are common anode or common cathode you with have to use NPN/N-channel or PNP/P-channel transistors or Mosfets but you could use non logic level transistors by using 2 transistors like the BC337 from the mircocontroller to the Mosfet to enable you to turn them on fully and lower the heat dissipation by the transistors. one last thing remember to add pull up or down resistors on the mosfet get pins.

     

    There is some good info out their on controlling led walls with teensy like these 800+ LED Wall With Diffuser Panel is a Work of Art | Hackaday  https://www.youtube.com/watch?v=ufqte-Je7Zo there is also a tone of good led control libs for the arduino https://www.google.co.uk/search?q=arduino+library+led+&oq=arduino+library+led+&gs_l=serp.3..0j0i22i30l3.35273.35772.0.39… i hope some of that ramble helps Mick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • shabaz
    0 shabaz over 10 years ago

    Hi Clem!

     

    Is this related to the Xmas lights challenge? Could you sketch roughly what you wanted to do with the I2C control and LEDs, I wasn't sure what the I2C control was for (i.e. is it to switch different banks of LEDs into the Arduino shield)?

    Also, I2C isn't good for long distances often (but maybe your requirement is for short distance) and a serial chain of 50 would have an impact too (there are workarounds, e.g. additional repeater type chips, or use additional I2C bus,etc).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube