What I should notice from prototype to factory implementation?

Hello all, I'm newbie in Arduino stuffs, it was since February 2012.

I am doing my internship in a factory which produces cable. And they give me project to make counter for the cables. I decide to use IR sensors. Then I make all the prototype (mini design) for it, then it results in:

http://zugiduino.wordpress.com/2012/07/11/how-to-drive-4-seven-segments-using-ic-74hc595/

If you saw the prototype, I am using: - USB power supply (5V) for the Arduino UNO - External power supply (2.1V) for the IC 74HC595 - IR sensor (5V) - pull-down circuit (http://www.thebox.myzen.co.uk/Tutorial/Inputs.html) - 7 segment common cathode 0.5"

Fortunaltely, all things work well in the prototype.

Then, they ask me to implement it in the factory, it means: - I must use PCB not breadboard - I must use only one power supply (from AC to DC from wall electricity 240V AC to 7V DC) to power the Arduino, how about the IC 74HC595 (that needs 2.1V only)? - I will use larger 7 segment size, it means it will change to voltage it needs, how to deal with this?

I am confused a lot in supply the power, I am afraid if they fund the project but it will not work, or it blow up because I just have experience in prototype not real implementation Is there any consideration I need to notice?? :grin:

Please forum help me.

Looked at your code and hardware. If I may make a suggestion try one of many LED 7 segment display drivers. You have built a whole lot of shift registers when you do not need them a single $1 part can replace nearly everything external the the arduino except the LED display and IR sensor while vastly reduce the complexity of the hardware and software. Any reason for the 2.1v supply the shift registers your using at 2-6v if memory serves so a single larger supply would work fine. Have you though about using an interrupt to count rather than hoping you catch all the low to high transitions?

silasmoeckel: If I may make a suggestion try one of many LED 7 segment display drivers.

When I implement it, do you mean that I should try it using 1 7 segment only? try and error you mean?

You have built a whole lot of shift registers when you do not need them a single $1 part can replace nearly everything external the the arduino except the LED display and IR sensor while vastly reduce the complexity of the hardware and software.

I do not need them? what do you mean? a single $1 part can replace nearly everything external the the arduino? Replace by what?

Any reason for the 2.1v supply the shift registers your using at 2-6v if memory serves so a single larger supply would work fine.

single larger supply? if I increase more than 2.1v for the 7 segment, it will light so bright, it means, it will not be long lasting

Have you though about using an interrupt to count rather than hoping you catch all the low to high transitions?

not yet, is it better? I have no idea about interrupt anyway. Does it make the code or processing simpler?

If I may make a suggestion try one of many LED 7 segment display drivers.

Something like a MAX7219 chip will drive 8x 7 segment displays performing all the segment scanning etc for 3x arduino pins.

creativen:

silasmoeckel: If I may make a suggestion try one of many LED 7 segment display drivers.

When I implement it, do you mean that I should try it using 1 7 segment only? try and error you mean?

You have built a whole lot of shift registers when you do not need them a single $1 part can replace nearly everything external the the arduino except the LED display and IR sensor while vastly reduce the complexity of the hardware and software.

I do not need them? what do you mean? a single $1 part can replace nearly everything external the the arduino? Replace by what?

Any reason for the 2.1v supply the shift registers your using at 2-6v if memory serves so a single larger supply would work fine.

single larger supply? if I increase more than 2.1v for the 7 segment, it will light so bright, it means, it will not be long lasting

Have you though about using an interrupt to count rather than hoping you catch all the low to high transitions?

not yet, is it better? I have no idea about interrupt anyway. Does it make the code or processing simpler?

No like I said a 7 segment display driver IC there are lots of different ones out there. They can deal with multiplexing (or various similar methods) constant current and dimming several have well established libraries so are very easy to work with. This lets you forget about building arrays etc and just send the digits you want it to display. For added fun they can drive multiple 4 digit displays to get to 8+ digits. They can be cheaper than the 4 shift registers your using now. The primary point is to get the chip count down while lowering the cost and complexity.

See first reply section.

See first reply section.

An interupt can be setup on some pins. This lets you run a bit of code check out here http://www.arduino.cc/en/Reference/AttachInterrupt for the details. The advantage is you do not have to hope to sample each count twice (low then high) the interrupt can just be set to rising and it can call a function that just does no1++; while your loop does non critical things like displaying said count (if your display goes from 1 to 3 it should not matter but 3 things going though and reading 2 would be bad I would think).

Riva:

If I may make a suggestion try one of many LED 7 segment display drivers.

Something like a MAX7219 chip will drive 8x 7 segment displays performing all the segment scanning etc for 3x arduino pins.

The MAX7219 is the bomb. There is a library for it. Basically the Arduino sends commands to it and the MAX7219 runs the 7 segment displays for you, you don't even need individual current limiting resistors (you need one to set the overall current limits). Some info:

http://arduino.cc/playground/Main/LedControl http://arduino.cc/playground/Main/LEDMatrix http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf

Cheap chips. They also are available on eBay or the newer 7221 which does the same but has some enable functionality that allows it to be used more easily with bicolor and tricolor matrices.

https://www.taydaelectronics.com/catalogsearch/result/?q=max7219

I am noobie too.. but have used/messed with the MAX72XX chips before..

I also suggest using them to drive your 7-segment LEDS

1 MAX72xx chip can drive 7 x 7-segment displays or 64 individual leds by itself.

only needs:

V++ (5v+) GND

and 3 Arduino pins/lines:

DIN CLK Load (CS)

2 x caps

and 1 resistor.. this sets the 'brightness' (mA) for all leds in the circuit..

read here: http://arduino.cc/playground/Main/LEDMatrix http://arduino.cc/playground/Main/MAX72XXHardware http://arduino.cc/playground/Main/LedControl

The LED control library is very easy to use.. (even for me) :P

and there are some posts where we discuss using SPI to communicate with the chip(s) as well..

I myself would like to learn more about using the WALL OUTLET to power an Arduino based project..

wallwart? into a some sort of power 'jack'?

thanks

I myself would like to learn more about using the WALL OUTLET to power an Arduino based project

You can find a suitable wallwart that provides ~7V@500mA through a 2.1mm connector and plug it into the Arduino's power jack - make sure that the polarity is correct. Alternatively, you can use a wallwart that has a USB outlet (such as for charging Apple devices) and run a suitable usb cable into the arduino's usb port.

xl97: I myself would like to learn more about using the WALL OUTLET to power an Arduino based project..

You may want to read this, you can set up a Arduino based project using just the ATMega328 chip from the Arduino, a regulator, a crystal, and a few other components, on a breadboard or PCB, however you want.

http://arduino.cc/en/Main/Standalone

You don't even have to bother with the USB connection, you can just move the chip back to the Arduino if you need to reprogram it. Extra chips for when you off-Arduino the ATMega328P:

https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_2129334_-1

A TLC5916 is a shift register designed to be used with LEDs. The pinout is different and the 8 output channels sink current. The primary advantage is that it controls the current passing through the LEDs and does not care what voltage is being used to power the LEDs (as long as it is greater than the LED forward voltage). Current is set by a single resistor.

Grumpy Mike has a tutorial on LEDs you should read to understand this concept. LEDs

Thanks..!

I have built many standalone/breadboard type Arduino based circuits.. :)

sometimes though your projects use other components, and these components can not be properly driven by the Arduino..

such as higher voltage or higher current draw than the Arduino can provide..

so have a 'project/prop' that includes an Arduino "AND" tapping the power supply (regulating it) enough to power these other components is always something I am concerned/worried/question about..

an example:

I want to build a simple "DATE" display.. using an Arduino as my base/brain... some sort of IC driver.. and whatever flavor of NixieTube I pick out.. (they take HIGH voltage & low current).

I need a High Voltage booster pcb in the mix..

so I have all this stuff.. in my 'wooden box'.. and I want to have 1 cable/plug from the base to power everything.. my Arduino & my NixieTube HV booster board... all from the WallWart,.

sorry if I wasnt clear. its that type of stuff that confuses me..

thanks

wildbill:

I myself would like to learn more about using the WALL OUTLET to power an Arduino based project

You can find a suitable wallwart that provides ~7V@500mA through a 2.1mm connector and plug it into the Arduino's power jack - make sure that the polarity is correct. Alternatively, you can use a wallwart that has a USB outlet (such as for charging Apple devices) and run a suitable usb cable into the arduino's usb port.

I read from my ipad charger: the output voltage 5 V, 2A, will it blow up the Arduino? because according to this (http://arduino.cc/playground/Learning/WhatAdapter), the output voltage for the adaptor must be between 9-12V and current could be 250mA, 500mA or even 1A. what do you think?

@silasmoeckel, according to your suggestion

The primary point is to get the chip count down while lowering the cost and complexity.

Using MAX72xx IC, in here (Indonesia if you know) the cost of this IC about US$12, more expensive I think. :grin:

creativen: Using MAX72xx IC, in here (Indonesia if you know) the cost of this IC about US$12, more expensive I think. :grin:

Look on eBay as you can pick them up in small batches a lot cheaper.

Riva:

creativen: Using MAX72xx IC, in here (Indonesia if you know) the cost of this IC about US$12, more expensive I think. :grin:

Look on eBay as you can pick them up in small batches a lot cheaper.

shipping cost to indonesia about $20-$30 .. sad things! :~

A quick look on Malaysian eBay site (closest to Indonesia) and http://www.ebay.com.my/itm/10PCS-IC-MAX7219CNG-MAX7219-DIP-24-DRIVER-LED-DISPLAY-8DGT-NEW-GOOD-QUALITY-/300739928460?pt=LH_DefaultDomain_0&hash=item46057f218c#shId sell 10x MAX7219 with free shipping to Indonesia for about $5.10 US dollars or http://www.ebay.com.my/itm/1PCS-IC-MAXIM-MAX7219CNG-IC-DRIVER-LED-DISPLAY-8DGT-24DIP-/280849405928?pt=LH_DefaultDomain_0&hash=item4163edd7e8#shId for 1x free shipping for $1 US dollar.

Thank you!!! Is there raspberry Pi in malaysia ebay? I'm not good at searching on ebay...any thx I bought it :grin:

creativen: Is there raspberry Pi in malaysia ebay? I'm not good at searching on ebay...any thx I bought it :grin:

Raspberry Pi is still difficult enough to buy through official suppliers so the only ones you will probably find on eBay are from profiteering scumindividual at silly prices.

Due to supply problems, I would not think about using raspberry-pi at this point for anything other than general purpose hacking.

However, there are other ARM boards out there, such as the Simplecortex http://imall.iteadstudio.com/featured-product/im120410002.html, which has an Arm Cortex-M3 processor, 512KB of flash (compared to 64KB for the UNO), 64KB of ram (compared to 2KB for the UNO), 120Mhz processing speed (compared to 16Hmz for the UNO), and its pins are laid out such that it can take Arduino shields. However, in the context of your project, I would have to think whether I had the time to learn a new system.

In looking at the tangle of wires for those 4 digits, I would seriously think about moving to a 16x2 or similar LCD rather than having to wire all of those LED segments. Or you can get various shields with 4-8 digits such as http://www.dfrobot.com/index.php?route=product/product&path=53_133&product_id=374.

creativen:

wildbill:

I myself would like to learn more about using the WALL OUTLET to power an Arduino based project

You can find a suitable wallwart that provides ~7V@500mA through a 2.1mm connector and plug it into the Arduino's power jack - make sure that the polarity is correct. Alternatively, you can use a wallwart that has a USB outlet (such as for charging Apple devices) and run a suitable usb cable into the arduino's usb port.

I read from my ipad charger: the output voltage 5 V, 2A, will it blow up the Arduino? because according to this (http://arduino.cc/playground/Learning/WhatAdapter), the output voltage for the adaptor must be between 9-12V and current could be 250mA, 500mA or even 1A. what do you think?

Voltage and polarity are important current is a max possible potential so as long as it's more than required it's fine. Looks like others found you a decent way to source a max72xx at a reasonable cost.