Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
United Kingdom
Asked — Edited

Setting Voltage Of Adc Ports

Hi guys,

Is it possible to set the voltage of the ADC ports. I'm trying to get them to act as switches to control an LED array.

I've already used up the 20 Digital I/O's.

I want to set them to values 0 or 255 to switch between 0 & 5 volts'

Any thoughts would be appreciated.

Thanks

Dan

#1  
Hi Dan,

Unfortunately ADC is input only; check out the Port Types section of our Hardware Turorials for more information at http://www.ez-robot.com/Tutorials/Hardware.aspx

In order to have more than 20 ports you'd need to get another EZ-B.

Can't wait to see a robot that has so many ports:)

Cade
United Kingdom
#2  
Thanks Cade C

Many thanks for the reply.

I thought that would probably be the case but thought i'd ask as i'm new to the device.

I'm controlling LEDs individually (1 LED per Digital Port). Is there any way to control more than 1 LED per digital port?

Thanks again

danUK
#3  
Since you can only get 5V out of a DO port you are limited as to how many LEDs can be run off a single port. I have an LED chaser circuit that is powered by a single port then I placed my LEDs randomly on the front of my bot so when it goes through the sequence they blink in random areas. But I am going to try and hook up to lower consumption(voltage wise) LEDs to one port and see if I can light them both (for my bots eyes).
#5  
Another neat "trick" is to use a servo control instead of a digital control. The servo control acts like a dimmer switch for the LED.
United Kingdom
#6  
Thanks Choyster

I'll give it a try.
PRO
Synthiam
#7  
Or use the pwm slider
United Kingdom
#8  
Thanks for the suggestions guys. I'll try them out
PRO
Canada
#9  
Hey danUK, there are a few options out there for controlling multiple LEDs with a few ports, one method that's gaining popularity is called Charliplexing. Charliplexing doesn't require any external components (besides resistors), you just but the LEDs in a matrix and control which LED comes on by setting some ports to inputs (High-impedance state), some to output high (5V) and some to output low (0V). Just google charliplexing and you'll get the info you need, probably check out instructables or Jimmie Rodgers' website.

Another method you could use is a Shift Register like the 74HC595 you'd just need 3 digital lines to control 8 LEDs. Anyway, good luck with your project!
United Kingdom
#10  
Hi Skater_j10

Many thanks for the info. I'll check it out.