Please help - uln2803, light barrier, 12v fans, individual control

hello there

we're working on a project which is about visualizing the approximate amount of people in a room. we dont want to count the people exactly, its more about the 'movement' or approximate fluctuation of people in that room. we want to visualize that with ten 12v fans one after another, upon which we'll put a textile fabric which then, when looked at it from the side, will show a curve, depending on which fan is blowing at which rate. each fan stands for one minute, so the whole installaton should visualize the last ten minutes activity in the room.

here is a sketch of our current setup. for simplicity weve only put one fan into the sketch, imagine there are ten of it, connected logically.. also, were using four uln2803, connecting three fans to each of it and the last one on the fourth..

  • arduino gets power from macbook
  • fans get power from 12v external power supply
  • sketch shows only one fan, weve connected 10 in the same logical manner
  • sketch shows only one uln2803, were using four, three fans per each, one on the fourth
  • fan specs: 12v dc, 1.4 W


  • it looks like its random: when connecting more than one fan, at one time or another, without action from us, the notebook crashes... we assume the setup is sucking too much current from the computer... not a good sign... what could the problem be?

  • what kind of ir-sensor could we use as a simple light barrier? its really not about accuracy. we thought about using a simple distance sensor, place it in between the entrance door and let it trigger as soon as the distance measured is less than maybe one meter (when someone passes through)... could this work?

thanks for your help! s&r

It looks like you "reverse" chip 180 degree, inputs and outputs goes wrong sides. Is it ULN2003 or 2803? On picture 2003. You don't have to connect +5V from arduino, only ground. Pin 9 (ULN2003) "common free willing diodes" should be connected to +12V source. Distance sensor will be easy to mount, nevertheless it cheaper to build trip line sensor using pair of IR led + photo-diode.

the chip is mounted correctly, ive done wrong in the sketch only. it is uln2803a, not like in the sketch 2003. sorry for the mistakes. i thought i have to connect power to the chip to let them use the integrated diodes? until now ive used 5v from arduino, must i use 12v?

thanks for your help man!

Chip doesn't require a power, it array of Darlington's. Diodes common pin must be connected to +V power rail, where your load connected , in this case +12V. If you put it to +5, current will flow from +12 V throw the load & diode to +5V, that could ruin your board and computer! This , probably cause, why you notebook crashed. Be careful.

thanks man! it works now! glad my computer is still working :-)