element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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 & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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 & Partners
  • More
Arduino
Arduino Forum Have a question about Arduino? Ask me!
  • 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
  • Replies 1914 replies
  • Subscribers 527 subscribers
  • Views 70031 views
  • Users 0 members are here
  • jeremy_blum
  • expert
  • student
  • arduino
Related

Have a question about Arduino? Ask me!

sciguy14
sciguy14 over 15 years ago

This thread has been closed to new questions.

However, we welcome you to Post Your Questionabout Arduino in the element14 Community Arduino group.  You'll find many fellow members and experts who have just the answer you're looking to find! 

 

Thank You, Your Friends at element14 Community


image

Jeremy Blum

Jeremy is an Electrical and Computer Engineering Student at Cornell University. He has been building microcontroller projects since high school, from a prototype prosthetic hand with a novel control scheme, to a nerf gun that fires at the intruders and uploads their picture to the web.
  • Sign in to reply
  • Cancel

Top Replies

  • billabott
    billabott over 13 years ago in reply to e14 Contributor +2
    @Brendan Your video is somewhat adequate for the intended purpose, however, from an engineer's point of view it is lacking in providing pertinent facts. Such as the part number, data sheet, and source…
  • e14 Contributor
    e14 Contributor over 15 years ago +1
    Jeremy, thanks for your intro videos. I am just getting started myself in Arduino though I have done some simple electronics projects using Atmel chips. Here is an example using ATTiny13 chips. www.youtube…
  • e14 Contributor
    e14 Contributor over 15 years ago +1
    Hi Jeremy I've built a device (see picture) with an Arduino and Ethernet shield that connects to our Network Monitor (Nagios) and moves an arrow to indicate if any of the computers we monitor are not responding…
Parents
  • BigG
    BigG over 15 years ago

    Hi Jeremy

     

    I'm not an Electronic Engineer so struggling here. I would like to use my Arduino to generate some Wiegand compliant logic signals as an output. So not sure if I should use Digital IO's or Analogue or otherwise (I2C SPI?) and whether I need one or two IO ports to do it. Assuming you're not acquainted with Wiegand, here is my take.

     

    You require two data wires (Data 0 and Data 1). Both are default high at 5V (max 1mA). Having seen your tutorial on I2C (very good by the way) I'm assuming I need somewhere some pull-up resistors (or do I). The Wiegand operates using 26 bit code to transmit the data. This code is generated using the two wires (without a timer clock). Thus if you want to generate a data bit "1" you open the Data 1 line to generate a 0V pulse and similarly for your data bits with zero binary value you use the Data 0 line. The standard is particular about the timings of these (square wavish) pulses. The data pulses for the Data One and Data Zero shall not overlap or occur simultaneously. Pulse Width Time should range from 20microseconds to 100

    One and Data Zero shall not overlap or occur simultaneously.

    microseconds and the Pulse Interval Time should be anywhere from 200microseconds to 20milliseconds.

     

    Is this readily done. I'm assuming that one will always need a microcontroller to convert any input - say a mobile phone number or a keypad pin code or any unique identifier and convert this into 26bit format and then send this to my Wiegand signal generator to send the code.

     

    Any help gladly appreciated.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sciguy14
    sciguy14 over 15 years ago in reply to BigG

    Yes you should be able to write a library for the arduino to accomplish this - It should probably be done in actual C code for efficiency.  I'd start by taking at a look at the I2C library source files for hints.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • sciguy14
    sciguy14 over 15 years ago in reply to BigG

    Yes you should be able to write a library for the arduino to accomplish this - It should probably be done in actual C code for efficiency.  I'd start by taking at a look at the I2C library source files for hints.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • BigG
    BigG over 15 years ago in reply to sciguy14

    Regarding the creation of a Wiegand output, I stumbled across this tutorial: http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM and within this tutorial an additional example and manual creation of PWM: http://www.arduino.cc/playground/Main/PWMallPins

     

    The tutorial describes different methods of manipulating the PWM duty cycle which to me, sounds as if you could use two output pins to create a Wiegand output directly with Arduino rather than a C library. The question is which method would be best, namely:

     

    Simple Pulse Width Modulation with analogWrite
    Bit-banging Pulse Width Modulation
    Using the ATmega PWM registers directly
    The Atmega 168/328 timers.
    Fast PWM Mode
    Phase-Correct PWM
     
    Or if none of these would work, I would be curious to learn why.
     
    Your help is greatly appreciated.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • sciguy14
    sciguy14 over 15 years ago in reply to BigG

    You can't say which is "best" without an application in mind.  Each will have their merits, but I'm sure only one is the ideal solution in a particular scenario.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 15 years ago in reply to BigG

    Hi BigG,

     

    Since you appear to be knowledgable about both forms of wave generation, why don't you do some experiments and share the data?  Maybe we can assess the merits of both on some test applications and give the whole group some useful data.

     

    Just a thought,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • e14 Contributor
    e14 Contributor over 15 years ago in reply to DAB

    Hi, I change in my arduino chip, befor use atmega 328, now I put in socket atmega8 16PU, and dont work he, what is problem.

    Thanks in advance

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • leon_heller
    leon_heller over 15 years ago in reply to e14 Contributor

    You need a 328 chip with the correct Arduino bootloader.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • WestfW
    WestfW over 15 years ago in reply to leon_heller

    Currently the Arduino "system" supports ATmega328, ATmega168, and ATmega8 chips.  It does have to have a bootloader pre-installed, and you have to select an appropriate "board" in the tools menu.  If you put an Atmega8 in an Arduino Uno board, you should tell the IDE that you have an "NG or older with atmega8" (the "board type" has more to do with the chip and the  bootloader than it has to do with the rest of the board.)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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 © 2026 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.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube