Jump to content


Photo Transistors In Series


10 replies to this topic

#1 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 08:03 AM

I am trying to rig up photo transistors in series for section timing and its doing my head in.

Initially I set up a trial circuit on the Arduino Uno board with +'ve going to collector leg on first transistor, emitter leg on first to collector on second and emitter to ground on board.
I am sure that worked fine. I then put them all in place on the track and low and behold, nothing.
Thought I might have got the polarity wrong so tried the other way and laps went by one after the other without influence, so I guess that was wrong.

Question is, phototransistors are a closed circuit with a light source aren't they?

The thing that gets me is if I pull the +'ve out of the board (circuit not closed) the laps tick on by on their own again. with only ground connected, doesn't happen if I leave +'ve in and ground out though.
Where is the power coming from, I checked and double checked that there was no short in the circuit, it is a pretty simple circuit.

I can get each one working individually OK, just not in series.

Mind you it was late last night so I'll check again today.
Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#2 shadow_rusty

    "Team ABC" Team Leader

  • Members
  • PipPipPipPipPip
  • 3,334 posts
  • Gender:Male
  • Location:Canberra

Posted 30 August 2016 - 09:51 AM

Yes they will work in series, but there are a couple of things to note.

Polarity is KEY. With 2x sensors, there is only 1 correct wiring out of 4 possible ones.
Make sure that each sensor has an adequate light source to work correctly.
Check your minimum laptime setting. If it's too long, only one sensor will 'work'.

Now, it's also possible that you need a pull up resistor (5k to 10k) between the input pin and +5V too...
Posted Image
Stolen from SlotsNZ

Team ABC Team Leader
(Ambitious, But Crap)


Home Track Threads - Shadow's Semi-Permanent Layout & Another Rug Racer & Proud of It & Gymkhana Test Track
Car Collection Thread - My Car Collection
Charts / Diagrams - MJK Tyre Selector
/ Slot.it 4wd Gearing / PoliCar Rollout / [size=3]Rollout Chart Generator / SCX 4wd Rollout / Track Wiring with Brake on Track Call

#3 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 10:39 AM

View Postshadow_rusty, on 30 August 2016 - 09:51 AM, said:

Yes they will work in series, but there are a couple of things to note.

Polarity is KEY. With 2x sensors, there is only 1 correct wiring out of 4 possible ones.
Make sure that each sensor has an adequate light source to work correctly.
Check your minimum laptime setting. If it's too long, only one sensor will 'work'.

Now, it's also possible that you need a pull up resistor (5k to 10k) between the input pin and +5V too...

This is the polarity I set up.
When I say +'ve, it is actually pin 5 on the digital part of the UNO board.
Posted Image

Check on Light source
Check on lap timing

Not sure on where or why to place resistor, what is "pull up" sounds like trying to raise the voltage with a resistor, is that right?

Edited by ZeGas, 30 August 2016 - 10:40 AM.

Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#4 shadow_rusty

    "Team ABC" Team Leader

  • Members
  • PipPipPipPipPip
  • 3,334 posts
  • Gender:Male
  • Location:Canberra

Posted 30 August 2016 - 11:44 AM

I'm assuming that "Posative" is actually the input pin on the arduino...
So, a pullup resistor sits between the input pin, and +5v.

Also, my brain is 'rusty' right now, and I can't remember which way arround the sensors need to be, but the orientation does not change from the single sensor setup.

But, other than that, it looks correct...
Posted Image
Stolen from SlotsNZ

Team ABC Team Leader
(Ambitious, But Crap)


Home Track Threads - Shadow's Semi-Permanent Layout & Another Rug Racer & Proud of It & Gymkhana Test Track
Car Collection Thread - My Car Collection
Charts / Diagrams - MJK Tyre Selector
/ Slot.it 4wd Gearing / PoliCar Rollout / [size=3]Rollout Chart Generator / SCX 4wd Rollout / Track Wiring with Brake on Track Call

#5 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 02:38 PM

Hey Michael,
I watched this fantastic video and understood 90% of it.
Towards the end he writes code to release the pullup resistor built in to the UNO board.
I cannot see in Dave's Sketch "LAPCOUNTER" where I can change the setting to release this or if it has already been done.
The on off thing going on with him is exactly what I experienced so am guessing a pull-up or pull down would fix the problem.
I have not got into the intricacies of Arduino yet so may ask insomniac Dave if he can help, unless you know where to find it in the sketch..


Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#6 shadow_rusty

    "Team ABC" Team Leader

  • Members
  • PipPipPipPipPip
  • 3,334 posts
  • Gender:Male
  • Location:Canberra

Posted 30 August 2016 - 03:45 PM

As we are switching the inputs between 'floating' and ground, the internal pullup resistor should be on for the inputs we use, but I have found that sometimes it's a bit 'weak', and needs external assistance.
Posted Image
Stolen from SlotsNZ

Team ABC Team Leader
(Ambitious, But Crap)


Home Track Threads - Shadow's Semi-Permanent Layout & Another Rug Racer & Proud of It & Gymkhana Test Track
Car Collection Thread - My Car Collection
Charts / Diagrams - MJK Tyre Selector
/ Slot.it 4wd Gearing / PoliCar Rollout / [size=3]Rollout Chart Generator / SCX 4wd Rollout / Track Wiring with Brake on Track Call

#7 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 04:15 PM

That's, dear I say it, understandable.
So one phototransistor is enough for the internal resistor to divert the power but putting two lowers the effectiveness of it, so adding an additional one external helps.
Bloody hell if I'm correct I have had an epiphany, if wrong ....

So just to be clear, I put the resistor between the red line (input pin) on my sketch above and connect to the 5v pin on the board, is that correct?
Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#8 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 04:15 PM

Posted Image
Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#9 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 04:17 PM

Don't worry just reread your original post Michael, in one ear out the other.
I'll give it a go and see what happens.
Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#10 ZeGas

    ZeGas

  • Members
  • PipPipPip
  • 1,226 posts
  • Gender:Male
  • Location:Mundoolun, QLD

Posted 30 August 2016 - 08:46 PM

Thanks SR the resistor did the trick.
All go now.
Cheers Grant
Posted Image.......................................................Posted Image
Home Track..........Corvette C1 Build..........McLaren M1A Build..........Maserati 300S Build..........Allard J2 Build..........50's Diner..........Iso Griffo A3C

3D Printed Adjustable Chassis..........3D Print Projects

If life gives you lemons, take them, free s#!t is cool.


#11 shadow_rusty

    "Team ABC" Team Leader

  • Members
  • PipPipPipPipPip
  • 3,334 posts
  • Gender:Male
  • Location:Canberra

Posted 31 August 2016 - 08:07 AM

Great to hear. Have fun.
Posted Image
Stolen from SlotsNZ

Team ABC Team Leader
(Ambitious, But Crap)


Home Track Threads - Shadow's Semi-Permanent Layout & Another Rug Racer & Proud of It & Gymkhana Test Track
Car Collection Thread - My Car Collection
Charts / Diagrams - MJK Tyre Selector
/ Slot.it 4wd Gearing / PoliCar Rollout / [size=3]Rollout Chart Generator / SCX 4wd Rollout / Track Wiring with Brake on Track Call





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users