Who wants a cheap, simple, Arduino-based LED controller?

Anyone look at the Typhon_B sketch? it has temp built in. Anyone ever get it working? O2 just reposted it a couple posts back.
It would be great if someone that can do a little programming could get the temp to work.

sb

Anyone looking at this?

As far as the 6 channel Typhon. Spuzzum posted it with an I2c lcd screen. I built the I2c interface and used five channels on it. The sixth channel made my Typhon flicker. Since then I have went back and taken the I2c out of the program and have 6 channels working but I can't get more channels to work. I'll try something else .
Thanks for the suggestions.

sb
 
Looks like no one has done anything with this sketch other then running it like it sits.


Does anyone have a sketch they would like to show off. Think yours is better than this one?
Please post it if you do. I'm sure everyone here would change sketches if there was a better one available.
 
Looks like no one has done anything with this sketch other then running it like it sits.


Does anyone have a sketch they would like to show off. Think yours is better than this one?
Please post it if you do. I'm sure everyone here would change sketches if there was a better one available.

SharkBoy-

Post up which digital pins you're planning to use on your MEGA & I'll take a whack at the Typhon "B" code and see if I can make it work for you. Let me know what size LCD you're planning to use, I'll need to modify the code if you're using a 20 x 4.
 
SharkBoy-

Post up which digital pins you're planning to use on your MEGA & I'll take a whack at the Typhon "B" code and see if I can make it work for you. Let me know what size LCD you're planning to use, I'll need to modify the code if you're using a 20 x 4.

O2,
I'm gonna use 6-13. It doesn't really matter which pins, I can change the code.
I've gotten some things to work but over all the things not stable. I will be using a 20x4 display. Have you looked at the temp part of the code? I posted that sketch myself a long time ago and never realized it had temp untill you reposted it for me.
Any help would be really appreciated. The Typhon is a heck of a usefull led controller and has much more to offer if someone knew how to do the coding.
thanks
sb
 
SharkBoy-

Post up which digital pins you're planning to use on your MEGA & I'll take a whack at the Typhon "B" code and see if I can make it work for you. Let me know what size LCD you're planning to use, I'll need to modify the code if you're using a 20 x 4.

O2,
Have you had a chance to look at this yet?

sb
 
I'm slowly chipping away at it as time permits. It's the whole"Two steps forward & one step back" kind of progress so far. Hopefully I'll have something that compiles correctly soon.

I did a sketch with all 8 channels. Compiled correctly uploaded fine. I could even scroll through the 8 led channels and do adjustments to time, duration, fade and all, but when I returned to the main screen all it would show was the first 4 channels even though I told it to drop down a column to display the other four channels and even the first 4 never showed anything except 0s.
I'll see if I can find the sketch. I'm constantly deleting failed sketches.

Have you tried the jarduino sketch?
I guess I'll have to pay for ver 1.2 to have support for my 5 inch lcd.
Don't want to because I'm pretty sure I'm not gonna use it but I am very curious about it because it has 7 led channels. I tried to convert ver 1.1 to the updated utouch lib but no go.

Thanks for your time.
sb
 
7 channel led sketch

7 channel led sketch

Almost got it!!!
I still get these errors when I try to compile.

Here is the file. Couldn't figure out how to upload the error log.

The 2 errors are in void loop()':
expected ')' before 'lcd'

at global scope:
expected unqualified-id before 'if'
 

Attachments

Last edited:
Almost got it!!!
I still get these errors when I try to compile.

Here is the file. Couldn't figure out how to upload the error log.

The 2 errors are in void loop()':
expected ')' before 'lcd'

at global scope:
expected unqualified-id before 'if'

Hey Terry - good job!

I've been working on an 8 channel version of the Typhon "B" code. I've managed to add the other 4 channels, but the Lcd portion still needs some work. The code compiles correctly in Arduino 23, but I don't own a Mega or a 20 x 4 Lcd to test it. I'll attach it here. Maybe you can make the needed changes and it will work for you?
 

Attachments

Hey Terry - good job!

I've been working on an 8 channel version of the Typhon "B" code. I've managed to add the other 4 channels, but the Lcd portion still needs some work. The code compiles correctly in Arduino 23, but I don't own a Mega or a 20 x 4 Lcd to test it. I'll attach it here. Maybe you can make the needed changes and it will work for you?

Thanks O2,
I'll give it a whirl!
Have you looked at the temp portion of the "B" code? It still seems like it should work. Doesn't work in serial monitor either..??

sb
 
I just spent some time converting the typhon channels to a class based library.

This allows you to add infinite number of channels to the typhon or any other arduino based pwm driver.
This code only allows for a standard ramp up - hold - ramp down pattern.

If you use this code please credit the typhon project and myself.

Code:
/*
// LED Channel Class.cpp
// version 1.0 
// 03/02/14
// 
// This class provides an object for each LED channel you wish to use.
// Allows for a basic ramp up/hold/ramp down patterning. 
//
*/

#include "ledChannel.h"
#include "Arduino.h"


LEDChannel::LEDChannel(uint32_t channel)
{
	_channel = channel;
}

void LEDChannel::setFade(uint32_t fadeTime)
{
	_fadeTime = fadeTime;
}

void LEDChannel::setPin(uint32_t pin)
{
	_pin = pin;
}

void LEDChannel::setTotal(uint32_t totalTime)
{
	_totalTime = totalTime;
}

void LEDChannel::setStart(uint32_t startTime)
{
	_startTime = startTime;
}

void LEDChannel::setIntensity(uint32_t intensity)
{
	_intensity = intensity;
}

void LEDChannel::setLEDChannel(uint32_t channel, uint32_t pin, uint32_t startTime, uint32_t fadeTime, uint32_t totalTime, uint32_t intensity)
{
	_channel = channel;
	_pin = pin;
	_startTime = startTime;
	_fadeTime = fadeTime;
	_totalTime = totalTime;
	_intensity = intensity;
}

int LEDChannel::pwm(int minutes)
{
	uint32_t pwm = 0;

	if (minutes > _startTime || minutes <= (_startTime + _fadeTime))
	{
		pwm = map((minutes - _startTime), 0, _fadeTime, 0, _intensity);
	}

	if (minutes > ((_startTime + _totalTime) - _fadeTime) && minutes <= (_startTime + _totalTime))
	{
		pwm = map((minutes - (_startTime + _totalTime - _fadeTime)), 0, _fadeTime, _intensity, 0);
	}

	if (minutes <= _startTime || minutes > _startTime + _totalTime)
	{
		if ((_startTime + _totalTime ) % 1440 < _startTime && (_startTime + _totalTime) % 1440 > minutes)
		{
			pwm = map(((_startTime + _totalTime) - minutes) % 1440, 0, _fadeTime, 0, _intensity);
		}
		else
		{
			pwm = 0;
		}
	}

	if (pwm > _intensity)
	{
		pwm = _intensity;
	}

	if (pwm < 0)
	{
		pwm = 0;
	}

	analogWrite(_pin, map(pwm, 0, 100, 0, 255));

	return pwm;
}

Code:
/*
// LED Channel Class.h
// version 1.0 
// 03/02/14
// 
// This class provides an object for each LED channel you wish to use.
// Allows for a basic ramp up/hold/ramp down patterning. 
//
*/
#ifndef ledChannel_h
#define ledChannel_h

#include "Arduino.h"

class LEDChannel
{
	public:
		LEDChannel(uint32_t channel);
		void setFade(uint32_t fadeTime);
		void setPin(uint32_t pin);
		void setTotal(uint32_t totalTime);
		void setStart(uint32_t startTime);
		void setIntensity(uint32_t intensity);
		void setLEDChannel(uint32_t channel, uint32_t pin, uint32_t startTime, uint32_t fadeTime, uint32_t totalTime, uint32_t intensity);
		int pwm(int minuntes);
	private:
		uint32_t _channel;
		uint32_t _pin;
		uint32_t _startTime;
		uint32_t _fadeTime;
		uint32_t _totalTime;
		uint32_t _intensity;
};

#endif

This will allow you to instantiate an array of objects, and utilize them.

Code:
//Sample code to show you how to create an object array and utilize the Channel class.

#define CHANNELS 16

LEDChannel ledArray[CHANNELS] = {LEDChannel(1), LEDChannel(2), LEDChannel(3), LEDChannel(4), LEDChannel(5), LEDChannel(6),
                                 LEDChannel(7), LEDChannel(8), LEDChannel(9), LEDChannel(10), LEDChannel(11), LEDChannel(12), 
                                 LEDChannel(13), LEDChannel(14), LEDChannel(15), LEDChannel(16)};

uint32_t pwmPinArray[CHANNELS] = {2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9};
uint32_t startTimeArray[CHANNELS] = {600, 600, 600, 600, 1300, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600};
uint32_t fadeTimeArray[CHANNELS] = {120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120};
uint32_t totalTimeArray[CHANNELS] = {600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600};
uint32_t intensityArray[CHANNELS] = {50, 100, 100, 40, 40, 30, 100, 100, 100, 100, 100, 40, 40, 30, 100, 100};

void setupLED()
{  
  for (int i = 0; i < CHANNELS; i++)
  {
    ledArray[i].setLEDChannel(i, pwmPinArray[i], startTimeArray[i], fadeTimeArray[i], totalTimeArray[i], intensityArray[i]);
  }
}

void checkLED()
{  
  rtc_clock.get_time(&hh, &mm, &ss);
  int minutes = (hh * 60) + mm;
  
  for (int i = 0; i < CHANNELS; i++)
  {
     ledArray[i].pwm(minutes);
  }  
}
 
Last edited:
Typhon v3

Typhon v3

Did anyone see SaltyDogaqua's Typhon?

He isn't making them anymore but his had a lot of stuff on it.
Four independent output channels (both 5V PWM and 10V PWM signals) for dimmable LED drivers. Controller controls each channel with "œStart" and "œEnd" times, fade duration, minimum and maximum intensity level.
It also has 2 inputs via USB-mini for (2) DS18B20 Temperature
sensors, an output for a 4-channel relay unit and Bluetooth lighting control via a Bluetooth Module. You could set the out puts to fan control, wave maker, heat, cool, whatever.
His code was loaded in HEX format. I have a copy of it but haven't tried to see if it works yet.
Very cool. I have been tring to get in touch with him to see if maybe he would come off of eagle files and a sketch that's not in hex format.

He was in on some of the posts on this forum.

I can upload a copy of the hex file if anyone is interested.
Google saltydog typhon github and you should be able to find what I found.

sb
 
I have just built a Typhon controller using v1.0 of the layout.

As I had to buy 10 boards I now have some spares. I plan to keep four myself.

Is anyone interested in a board or two?

2d9cuxi.jpg
 
Don't suppose anyone can help me?

I've got the old Arduino 022 running with the code loaded up and it's telling me
" 'DS1307' does not name a type."


Any hints?
Tried multiple RTC libraries but no joy....
 
Hey Steve, I just read through a post about an Arduino led controller that you said you built and it working. I have Marsaqua lights and just want to ramp them up and down. Everything seems complicated by people wanting to control more. What does your build consist of?
 
Back
Top