Notifications
Clear all

[Sticky] Project Corner  

Page 2 / 2
  RSS

byron
(@byron)
Reputable Member
Joined: 1 year ago
Posts: 307
2020-05-02 6:02 pm  
Posted by: @americanmike

i'm building a venue on the 'back 40'

Taking this to mean your back garden, then if your wifi extends that far (if not you could easily put in an outside access point) then maybe that would prove a better comms route than ir or ultrasonic.  Just a thought. 😀 


ReplyQuote
AmericanMike
(@americanmike)
New Member
Joined: 3 months ago
Posts: 4
2020-05-02 7:08 pm  

@byron Actually, we have wifi back there since I put in a beacon to extend my mesh. I have echo, speakers in the trees, 8 of em... lights everywhere.. lights in the creek that surrounds the area...i'm all set for that. What i'm trying to figure out is on the runway pixels (rgb) to trigger them by section to come on as she (we) walk past them toward the alter. So, IR beam break, microwave prox sensors, ultrasonic prox, or lidar for distance and do the math in arduino to kick off the sections. 160 feet of pixels right and left of the runway at every 4 feet or so. What's the best way to kick off as we walk by. That's the question. oh, and yes, back 2 acres... 'back 40' is what we call it.


ReplyQuote
byron
(@byron)
Reputable Member
Joined: 1 year ago
Posts: 307
2020-05-02 7:37 pm  
Posted by: @americanmike

and yes, back 2 acres... 'back 40' is what we call it.

More than a garden then, more like a field 😀.  For the triggering of the lights I would look for the very simplest solution.  A lot can go wrong on the day.  Say you're using LIDR and a cat or dog wanders where it shouldn't, let alone an overenthusiastic child guest, lights may be popping off all over the place.  So how about a simple handheld device that triggers a signal over wifi on a button press that you manually press as the bride proceeds.   Maybe the button pressing task is better given to another responsible family member as you probably don't want to wander down the aisle with you hands in your pocket. Sometimes human action can be better than electronic automation. (on the other hand too much wedding festivities drinking...... 😀 )


ReplyQuote
AmericanMike
(@americanmike)
New Member
Joined: 3 months ago
Posts: 4
2020-05-02 8:37 pm  

@byron all valid points, especially the potential consumption of certain beverages.  I could probably just have a small fob in my hand triggering the next section with each 'click' on some sort of arduino controller. has to be a master controller for all and that's a long run to ensure wireless connectivity since that fob would just be RF. Doable. I'll keep the drinks on ice till afterward. On the prox, some of them could differentiate between cat or dog to human... no cats around but an ambitious group of squirrels could possibly join the festivities with a combined mass to fool a system like that... really need this to be perfect. 


ReplyQuote
SolitaryLeaf
(@solitaryleaf)
Active Member
Joined: 3 months ago
Posts: 10
2020-05-02 8:49 pm  

@americanmike

Neat project! I am sure you have considered this, but my first instinct is to experiment with cheap motion sensors, maybe something like this?

 


Squish liked
ReplyQuote
mikeykokomo
(@mikeykokomo)
Active Member
Joined: 1 year ago
Posts: 5
2020-05-17 2:43 am  

@chumley

If you put something which floats on the water, you could sense the distance to that object using the HC-SR04 sensor. A project was published on the workshop in July of 2017 with code. 
HC-SR04 Ultrasonic Distance Sensor project

Cheers, Mike


ReplyQuote
mikeykokomo
(@mikeykokomo)
Active Member
Joined: 1 year ago
Posts: 5
2020-05-17 3:25 am  

@americanmike
A photo transistor mounted inside a tube is good as a sensor. The tube would narrow the field of view to limit effects of other light sources. At the opposite side of the walkway would be a string of IR LEDs. Only the photo transistors need be wired individually. Newark Components has several types, and in quantities of 10 or more, they run at about $0.50 each. I suggest consider checking whether they are in-stock. Covid-19 affects importation so I recommend buying from a supplier that has a warehouse in your country. Don't buy a surface mount device. Also consider the number of sensors and the Arduino board inputs. 


ReplyQuote
mikeykokomo
(@mikeykokomo)
Active Member
Joined: 1 year ago
Posts: 5
2020-05-17 5:00 am  

My aquarium light project uses an Arduino Nano to control 4 LED strips through PWM. As demonstrated in the RGB LEDS - Colorful Arduino Experiment, N-MOSFETs will be switching the LED strip power. 

The intent is to reduce power requirements. Each strip will receive 25% of the duty cycle and is turned on, when the other three banks are off. My PSpice modeling indicates an old 75 watt laptop power supply will have no problem. My searching for controlling a delay for starting each bank turned up a whitepaper titled Secrets of Arduino PWM.  That article included code which gave more control of pulse timing. My hope is the following will stagger the outputs.

void setup()
{
// Setup MOSFET pins as outputs
pinMode(LED11, OUTPUT);
pinMode(LED10, OUTPUT);
pinMode(LED9, OUTPUT);
pinMode(LED3, OUTPUT);}

void loop() {

// Write PWM to pins

digitalWrite(LED11, HIGH);
delayMicroseconds(250); // Approximately 25% duty cycle @ 1KHz
digitalWrite(LED11, LOW);
delayMicroseconds(4); // all off time
digitalWrite(LED10, HIGH);
delayMicroseconds(250); // Approximately 25% duty cycle @ 1KHz
digitalWrite(LED10, LOW);
delayMicroseconds(4); // all off time
digitalWrite(LED9, HIGH);
delayMicroseconds(250); // Approximately 25% duty cycle @ 1KHz
digitalWrite(LED9, LOW);
delayMicroseconds(4); // all off time
digitalWrite(LED3, HIGH);
delayMicroseconds(250); // Approximately 25% duty cycle @ 1KHz
digitalWrite(LED3, LOW);
delayMicroseconds(4); // all off time
}

I also need to experiment with the Mini360 output voltage. LEDs can be over-driven somewhat if the average power is well below the average max current. I hope the fish don't mind the strobe effect. 

Comments appreciated.

Cheers, Mike


ReplyQuote
chumley
(@chumley)
Active Member
Joined: 7 months ago
Posts: 5
2020-07-08 8:04 am  

Hey Guys,

Well, I'm off on another tangent and found the a fuel tank /level sensor schemaatic/code and I have breadboarded it. Its by Scottie Boyer.  I asked him for help on a niggly little thing, but he hasn't gotten back to me yet.

Here is part of the code that I don;t understand:

void loop() {
// Do level scan with ultrasonic board

// Start a scan - trigger pin must be high for at least 10us
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// Get time echo pin is high using pulseIn, which returns value in microseconds
// Default timeout of 1s is more than enough for 8 pulses, and we're not in a hurry
timeHigh = pulseIn(echoPin, HIGH);

if (timeHigh == 0) {
// Oops! Timeout...
showError();
} else {
// Calculate level.....

If I leave the system plugged in and running after a few minutes I get the error message as requested in the code. My question is what does (timeHigh ==0); havd to do with anything and why do I need to get a Error message. I actually plan on just flipping a switch and taking a reading and the turning the system off to save battery since I will use a 9v. So I probably won't even get the error message, but since I am not sure what the (timeHigh == 0); is doing I would like to know.

I could send all the code if needed, but seems like this is where my confussion lies.

Thanks for listening guys.


ReplyQuote
mbogelund
(@mbogelund)
Active Member
Joined: 1 year ago
Posts: 19
2020-07-08 8:22 am  

Hi @chumley,

timeHigh is set to the return value of the function call to the pulseIn() function. 

I suggest you look up the documentation for that function in order to understand what the timeHigh variable is doing.

Vkr Martin 


ReplyQuote
Page 2 / 2