View Full Version : Renard 16 Simple with ULN2803
budude
09-24-2009, 12:38 AM
I've built up several of the Renard 16 "simple" controllers based from P. Short (Phil) and scorpia's (Peter) PCB layout. I have been using the PIC16F723 as the MCU and have used them for both AC and DC applications with no issues.
I want to create a compact DC version of these using ULN2803s as the drivers instead of DCSSRs (sort of like Franks Ren LV) for small LED projects. I am not using opto-isolators for this. Since the ULN2803s are inverted outputs I inverted the outputs in the code for the PICs to be active high. The PIC pins are connected directly to the ULN2803 inputs and the outputs drive a current limit resistor (using 470 ohm for now) to an LED to 5V. I have the 5V supply ground connected to pin 9 (ground) of the ULN2803 as well as the ground from the PIC.
What I find is that the LEDs are always on and just get little dimmer when I turn on the channel. With the original SINK version of the code they were always on but got a bit brighter so I'm a bit befuddled at the moment.
Do I need a tie-down on the inputs to the ULN2803? This is the first time playing with these so any help is appreciated.
jrock64
09-24-2009, 12:59 AM
Sounds like non PWM code to me.
I would verify that setting in the code.
Joel
budude
09-24-2009, 01:04 AM
Sounds like non PWM code to me.
I would verify that setting in the code.
Joel
I didn't change the PWM setting in the include file for the code - only the SINK setting:
;; PortA, bit 0 has channel 1 mapped to it
#DEFINE PIN2_CH 1
#DEFINE PIN2_SINK NO (was YES)
#DEFINE PIN2_PWM YES
I have confirmed that when active I get 5V from the controller - however when connected to the ULN2803 I see 1.36V at the input which sounds like the dual B-E drop across the Darlingtons?
Matt_Edwards
09-24-2009, 03:22 AM
Is Pin 10 not connected to anything? it should be free.
Not sure what you mean by inverted outputs. the ULN2803 is really just a simple Transistor array. Pulling the Inputs LO, turns them Off. Pulling them HI turns the Transistor ON.
I would pull out the PIC and drive the ULN2803 input pins (2 to 8) LO (LED should be OFF) and HI (LED should be ON). That will at least prove your hardware.
Cheers
Matt
LabRat
09-24-2009, 08:47 AM
Would a second set of eyes reviewing the schematic be in order?
(You did check which end of the 2803 has the notch.. right? ;) )
So without the 2803 in it's socket, you are seeing 5V, but with the 2803 it's measuring as 1.36V? Is that correct?
(try a different 2803?)
I didn't change the PWM setting in the include file for the code - only the SINK setting:
;; PortA, bit 0 has channel 1 mapped to it
#DEFINE PIN2_CH 1
#DEFINE PIN2_SINK NO (was YES)
#DEFINE PIN2_PWM YES
I have confirmed that when active I get 5V from the controller - however when connected to the ULN2803 I see 1.36V at the input which sounds like the dual B-E drop across the Darlingtons?
budude
09-24-2009, 10:24 AM
The ULN2803s are active sink outputs so a high input results in a low output to sink the current - that's what I meant by inverting outputs (the schematic symbol shows it as inverted also). I believe the 1.36v is correct since that represents the on state of the two cascaded transistors in the Darlington array.
Anyway - I'll breadboard everything with a static setup (no PIC, etc) since I know that part is working. I didn't bother creating a schematic since I sort of expected this to work right off the bat because it's so simple...
kostyun
09-24-2009, 10:29 AM
Remeber with using a 2805 with the PIC that you need to set the pic for + output. For the 16F688 - you would do this by removing the following lines and then compiling the firmware. Not sure on the single chip 16 as I haven't looked at the code.
;; For positive_true outputs, remove the following define (normally, this
;; should be left in place).
#define OUTPUT_NEGATIVE_TRUE
budude
09-24-2009, 10:55 AM
I took another 2803 out of the tube and everything works perfectly - man I hate that! Good call LabRat... wasn't really expecting that for a fresh out of the tube chip - live and learn...
Anyway - on to the experimentation - thanks for the replies - argh!!
P. Short
09-24-2009, 12:29 PM
Frank,
AFAIK this thread is about the PIC16F722-based controllers. Output inversion is handled a bit differently in the firmware for this design. The output polarity can be controlled on a pin-by-pin basis, as well as some other parameters. The implementation results in many lines of code that must be changed to affect polarity or PWM configurations (as well as how channels are assigned to PIC pins), so the configuration settings have been moved out into a separate file. This is so that the user doesn't have to change many different lines when a new firmware comes out.
kostyun
09-24-2009, 01:36 PM
Frank,
AFAIK this thread is about the PIC16F722-based controllers.
Hence my earlier edit with a comment of "doh"
Powered by vBulletin® Version 4.1.10 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.