MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 I see what you're doing. That could easily be converted into seconds. Basically what I'm doing. What does map() do? Quote Link to comment
MOJOEJOEJOE Posted May 1, 2013 Share Posted May 1, 2013 http://arduino.cc/en/Reference/Map 1 Quote Link to comment
MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 Thanks. Didn't know how I missed that. EDIT: Tad limited with only integer math. But also very useful for everything else. Quote Link to comment
MOJOEJOEJOE Posted May 1, 2013 Share Posted May 1, 2013 My code is still a bit sloppy but I`m learning as I go. I have a new found respect for guys who do this for a living. My firmware engineer at my work has reviewed my code and helped with suggestions to make it work better. Its a fun hobby but once you start you never stop. You will find other ways to do things and constantly make tweaks and enhancements trust me LOL. The next thing you know you will have 4 fixtures and tons of Arduino parts. Its a sickness with no known cure. 1 Quote Link to comment
MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 The next thing you know you will have 4 fixtures and tons of Arduino parts. Its a sickness with no known cure. Too late. Quote Link to comment
Jacob042426 Posted May 1, 2013 Share Posted May 1, 2013 The sickness goes away when you have an empty bank account. 3 Quote Link to comment
MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 I need an equation. Hmmmmm... The current one doesn't work for night lighting. Whatever, I'll just do set moonlights right now. Also, a surprise coming. Quote Link to comment
MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 Reading about PWM to analog conversion. It seems extremely simple actually. Support will be added in a few days. Night cycle not going so good. I just can't wrap my head around passing midnight. Quote Link to comment
MeepNand Posted May 1, 2013 Author Share Posted May 1, 2013 PWM to voltage converter: http://sim.okawa-denshi.jp/en/PWMtool.php That's 5v analog. Double the voltage to get 10v. A 15k resistor and 1uf capacitor net a perfect voltage in .1 seconds. Combined with this: http://www.farnell.com/datasheets/28871.pdf and you get 10v output for less than a dollar. Plus hipping. EDIT: Wrong. Don't listen to me. 5v analog, but no 10v analog. Look it up. I have to write an essay right now. Quote Link to comment
L0st Posted May 1, 2013 Share Posted May 1, 2013 Haha thanks for fixing my diagram, I'm glad I could help out. And I'm very happy that you're using this drawing on your front page. 1 Quote Link to comment
MeepNand Posted May 2, 2013 Author Share Posted May 2, 2013 https://code.google.com/p/meepduino-controller/downloads/list Put all code on there, with libraries too! Still keeping first post updated though. Quote Link to comment
L0st Posted May 2, 2013 Share Posted May 2, 2013 how many watt resistors are you using for the drivers? 1 Quote Link to comment
MeepNand Posted May 2, 2013 Author Share Posted May 2, 2013 1/4 10kohm. The amount of power is very little. 5v/10,000ohm comes out to .5ma. That times voltage is 2.5mW. That means that 0.0025W resistors are needed. So any resistor really, with any resistance between 1k and 20k. Any higher I would be wary of. Quote Link to comment
MOJOEJOEJOE Posted May 2, 2013 Share Posted May 2, 2013 Asid, Looks like your making good progress. Is this a touch screen interface? I have no touch screen for my set up but would love to interface one. 1 Quote Link to comment
MeepNand Posted May 2, 2013 Author Share Posted May 2, 2013 Touch screen all the way. Just shield, mega, and screen. This won't work with the UNO at all. I might revamp my equation again. Individual hour programming looks good actually, especially with the "Map" function. I'll offer that later. I made a simple night cycle, but I figured out how to do it. For real this time. 1 Quote Link to comment
MOJOEJOEJOE Posted May 2, 2013 Share Posted May 2, 2013 The map function is useful. 1 Quote Link to comment
MeepNand Posted May 2, 2013 Author Share Posted May 2, 2013 Very. While I can't use it for a full cycle like now, I can use it in hours. So in one hour, I map the starting and ending power. Quote Link to comment
MeepNand Posted May 2, 2013 Author Share Posted May 2, 2013 Tested the new code for calculation. Looking snazzy. Quote Link to comment
MeepNand Posted May 3, 2013 Author Share Posted May 3, 2013 Okay, so new code will work like this: -User sets % of leds per hour -Leds dim up/down to that value every hour -Each channel has 24 hours of control Solves the moonlighting issue and adds a whole new world to this controller. Expect it in 2-3 days. Quote Link to comment
L0st Posted May 3, 2013 Share Posted May 3, 2013 does this mean that moon phases are out of the question now? 1 Quote Link to comment
MeepNand Posted May 3, 2013 Author Share Posted May 3, 2013 No, you program each hour of the day for each channel. So you can set all 6 channels to be moonlights. Much better than before. I'll post a video when it's done. EDIT: Moon phases will have to go. Unless you want it to be static and annoying. Quote Link to comment
MeepNand Posted May 4, 2013 Author Share Posted May 4, 2013 There aren't going to be any updates for several days. I am changing all the lighting channel stuff, I.E everything. Quote Link to comment
MeepNand Posted May 5, 2013 Author Share Posted May 5, 2013 Actually, this is taking less time than I thought. With luck, one day. Quote Link to comment
MeepNand Posted May 5, 2013 Author Share Posted May 5, 2013 Version 1.3 is finished and tested! The new version is miles better, and has programming for every hour of every channel. That means that the night channel is good. Realistic moon effects, however, are a lot harder. Quote Link to comment
MeepNand Posted May 5, 2013 Author Share Posted May 5, 2013 5v PWM to 10v PWM converter. The +12v input can actually be anything below 37v. EDIT: Does not work. transistor must be connected in the ground line. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.