Go to advanced search

by zassx
Fri Mar 23, 2018 1:52 pm
Forum: Beginners
Topic: Phototransistors in parallel not working
Replies: 6
Views: 611

Re: Phototransistors in parallel not working

-a1- if you question your code you could use: from terminal: gpio readall and see status ( and possible change ) -a2- check with your code -a3- connect the R1k for test to +3v3 or GND and check with -a1- AND -a2- -b- your circuit could never work as the R1k from GPIO is not connected anywhere The r...
by zassx
Fri Mar 23, 2018 12:36 pm
Forum: Beginners
Topic: Phototransistors in parallel not working
Replies: 6
Views: 611

Re: Phototransistors in parallel not working

Mortimer wrote:
Fri Mar 23, 2018 12:18 pm
Can't see your diagram.
Is the link broken?
Sorry I was having issues with image, updated its link so it should be working now.
by zassx
Fri Mar 23, 2018 12:02 pm
Forum: Beginners
Topic: Phototransistors in parallel not working
Replies: 6
Views: 611

Phototransistors in parallel not working

Some time ago I created lightgate project with single IR LED and phototransistor (with the same scheme like below, only there were single elements) and it was working alright. Now I decided to add another set of elements in parallel since I need to detect additional beam break. https://www.dropbox.c...
by zassx
Mon Feb 19, 2018 9:33 am
Forum: Beginners
Topic: Measuring speed using IR LED Phototransistor
Replies: 12
Views: 2829

Re: Measuring speed using IR LED Phototransistor

The speed of a object passing the sensors, could this be don by ,two sensors spaced apart The first sensor will start a timer when the leading edge of the object passes the sensor. When the leading edge of the object passes the second sensor ,this will stop the timer. Calibrate timer to suit Thanks...
by zassx
Fri Feb 16, 2018 3:04 pm
Forum: Beginners
Topic: Measuring speed using IR LED Phototransistor
Replies: 12
Views: 2829

Re: Measuring speed using IR LED Phototransistor

The speed of a object passing the sensors, could this be don by ,two sensors spaced apart The first sensor will start a timer when the leading edge of the object passes the sensor. When the leading edge of the object passes the second sensor ,this will stop the timer. Calibrate timer to suit Thanks...
by zassx
Thu Feb 15, 2018 3:17 pm
Forum: Beginners
Topic: Measuring speed using IR LED Phototransistor
Replies: 12
Views: 2829

Re: Measuring speed using IR LED Phototransistor

Oh nice, that is what I was looking for! Thank you very much, will definitely drop by again as soon as I test this out.
by zassx
Thu Feb 15, 2018 2:31 pm
Forum: Beginners
Topic: Measuring speed using IR LED Phototransistor
Replies: 12
Views: 2829

Re: Measuring speed using IR LED Phototransistor

Thanks, I already came across this project and already got all the useful info. But the problem is that since the elements I will be using are not the same, will creating same scheme work on my end? Maybe I could fry my Raspberry or something, that is why I would like few guidelines on how to implem...
by zassx
Thu Feb 15, 2018 11:01 am
Forum: Beginners
Topic: Measuring speed using IR LED Phototransistor
Replies: 12
Views: 2829

Measuring speed using IR LED Phototransistor

Hey there guys. I am relatively new to Raspberry PI scene. Well I have some experience in software development but none when it comes to electrical circuits. Me and my mates came up with an idea of building a speed sensor to measure speeds of some objects passing through. We are talking about small ...
by zassx
Sun Jan 21, 2018 5:04 pm
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

Yes I have tried reading sensors separately and it works ok. Well first few reads aren't consistent but later on the interval looks good. Oh that could be the problem. Sorry I am new to this so I don't know exactly what are they using. For display I know it is I2C, probes are 1wire set to certain PI...
by zassx
Sun Jan 21, 2018 11:10 am
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

The data object in above example isn't relevant, the important output is just time. Also readingDHT is a flag that indicates reading data from DHT sensor. I tested reading only DHT on very short interval and it got flooded - sensor was trying to read but didn't return any data. That is why I added f...
by zassx
Sat Jan 20, 2018 1:56 am
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

Okay, just updated my code and tested only reading DHT and DS18B20. The interval for DHT is 1 second, DS 3 seconds. From the output I can see, that the code is not running like it is supposed to and is interrupting one another. JS code below log. 0|main | READ DS: Sat Jan 20 2018 02:51:27 GMT+0100 (...
by zassx
Fri Jan 19, 2018 3:51 pm
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

Thank you again. It will be easier now that I have some guidelines to follow.
I am guessing too (didn't have really time lately to properly debug everything) that updating screen is the issue. Will post back result after I update code.
by zassx
Fri Jan 19, 2018 2:09 pm
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

Thank you very much for ideas, will definitely try it out later! Do you think it is possible to achieve almost realtime reading (or at least as close as possible) or are there any limitations that would prevent that? Or at least for screen updates and button inputs, so that there is no delay when pr...
by zassx
Thu Jan 18, 2018 9:08 am
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Re: Temperature and light controller in NodeJS - sensor reading slow

I have stripped out the pieces of code that should be causing a problem and have updated my question. There must be something in the main loop, some of the functions for reading sensors or updating the screen. I tested everything separately and it works well, there is some delay but should be ok. Bu...
by zassx
Wed Jan 17, 2018 9:13 pm
Forum: Beginners
Topic: Terrarium Controller running NodeJS
Replies: 8
Views: 1342

Re: Terrarium Controller running NodeJS

I got 2 sensors. But I think everything together reading and writing to screen is causing some delay.
by zassx
Wed Jan 17, 2018 7:10 pm
Forum: Beginners
Topic: Terrarium Controller running NodeJS
Replies: 8
Views: 1342

Re: Terrarium Controller running NodeJS

It looks like with the default 12-bit conversion of the DS18B20 running in parasitic power mode (i.e. the 3 wires + resistor) will take nearly a second. On my pi zero W (just one DS18B20 connected to pin 4) it takes around 880ms using this node.js code. // read temperatue from a single DS18B20 cons...
by zassx
Wed Jan 17, 2018 3:33 pm
Forum: Other programming languages
Topic: Temperature and light controller in NodeJS - sensor reading slow
Replies: 12
Views: 6325

Temperature and light controller in NodeJS - sensor reading slow

Hello there! I want to do (actually already done a part) a fun project which is making my Raspberry PI Zero W a terrarium controller for my pet snake. Since I have some programming skills in Javascript so I decided to go with NodeJS (all other programming languages are still option if this does turn...
by zassx
Tue Jan 16, 2018 11:52 am
Forum: Other programming languages
Topic: Node.js with i2c one wire
Replies: 3
Views: 2188

Re: Node.js with i2c one wire

Check out my topic, I am doing exactly this. The topic contains a link to my source code so feel free to check out which libraries I am using and how am I reading temperatures and displaying everything on i2c OLED.

viewtopic.php?f=91&t=202603
by zassx
Tue Jan 16, 2018 10:40 am
Forum: Beginners
Topic: Terrarium Controller running NodeJS
Replies: 8
Views: 1342

Re: Terrarium Controller running NodeJS

Thanks all for such a quick response, sorry couldn't post code before but I wasn't near my home PC. Okay, the code could be a little messy now since I was testing some things out (tried adding promises so the code doesn't block main loop), but you should get an idea of what I am doing. // So this is...
by zassx
Mon Jan 15, 2018 4:55 pm
Forum: Beginners
Topic: Terrarium Controller running NodeJS
Replies: 8
Views: 1342

Terrarium Controller running NodeJS

Hello there! I want to do (actually already done a part) a fun project which is making my Raspberry PI Zero W a terrarium controller for my pet snake. Since I have some programming skills in Javascript so I decided to go with NodeJS (all other programming languages are still option if this does turn...

Go to advanced search