3
\$\begingroup\$

I am doing a project in which I need to read RGB values from a color sensor TCS230 and send it to a microcontroller and use an linear equation to get glucose value from it and display it on an LCD.As such this whole thing needs to be packaged into a cellphone sized device.The project needs to be completed in 2 1/2 months. The block diagram is as follows: Cant post image as new user.Anyway, Inputs:optical sensor(6pins),2 buttons(4 pins),sensor to test fit of glucose plug(2 pins).Output:LCD(16 pins). Microcontroller and power supply from battery. Total nearly 30 pins

My questions are:

  1. I am using TCS230 as my optical sensor.I need to read from only 15mm2 at a distance of 1cm matte surface.I propose to use a concave lens to focus.Is this setup good or is there a better sensor I can use?
  2. The device is cellphone-sized. So I thought of using arduino mini but I need 30 io pins where as mini has only 20. I could use a plain microcontroller. I know arduino prog but not avr prog.I did a course on microcontroller but assembly programming.*How hard is it for me to use a microcontroller.I need to complete this in 2 months.Is there any other option for me?Can I reduce LCD pins to fit mini?*Main concern is time arduino I know and can prog quickly but I do not know avr yet.The sensor outputs square waves whose freq gives rgb values.
  3. Which microcontroller should I use?
  4. What type of battery to use Li-ion ?How should I decide on batterygiven size considerations?
  5. *What LCD can I use?*I need to display letters and numbers and it needs to be small-size of cellphone screen.
\$\endgroup\$
4
  • \$\begingroup\$ You may want to break up your post into 5 different questions. They are valid questions, but we can go into great detail answering each part. That being said, we're not going to design your project for you, especially if this is a school project. To be clear, we'll be more than happy to help, but you have to put the pieces together yourself. \$\endgroup\$
    – In silico
    Commented Aug 29, 2012 at 7:32
  • \$\begingroup\$ Thank you Insilico I will break this into different questions. \$\endgroup\$
    – Samyuktha
    Commented Aug 29, 2012 at 9:22
  • \$\begingroup\$ Can you use a cell phone? \$\endgroup\$ Commented Aug 29, 2012 at 11:26
  • \$\begingroup\$ No I already made it using a cell phone .Now I need to make a stand alone device \$\endgroup\$
    – Samyuktha
    Commented Aug 30, 2012 at 1:03

3 Answers 3

2
\$\begingroup\$

When I am working on a new design, once I know what I want it to do I normally start by writing out the basic code, and drawing out a basic schematic. This way I have a good idea of what the microcontroller needs to be able to do. Once you know what parts you are using, you can finish the schematic then the software. And make sure you double check the datasheet for each component, paying attention to size/package, abilities, power and heat requirements!

I am using TCS230 as my optical sensor.I need to read from only 15mm2 at a distance of 1cm matte surface.I propose to use a concave lens to focus.Is this setup good or is there a better sensor I can use?

I skimmed the datasheet and didn't see anything that makes me think this wont work. You may have to play around with the lens/lenses a bit to get the ratio correct but I think that should work.

If you're not familiar with this ic, make sure you buy the prototype board, not just the chip because it is very small and hard to work with if you don't have an etched pcb.

How hard is it for me to use a microcontroller. I need to complete this in 2 months. Is there any other option for me? Main concern is time arduino I know and can prog quickly but I do not know avr yet.

I'm not a fan of the Arduino's language, it's not too precise and Avr-GCC is easy to get the hang of. You don't need to use assembly. That being said, since this is a project that has a deadline, stick to what you know. You can write it out in the Arduino Framework then if you have time you can port it over to Avr-GCC, it may even help you get the hang of it quicker.

I think you can program most all the Atmega line with the Arduino Framework, So you can make a custom device and still use the langueage you know.

Can I reduce LCD pins to fit mini? What LCD can I use? Which microcontroller should I use?

If the LCD is just displaying text you can use a mono LCD controlled via serial i2c. This would allow you to use only 2 pins for the LCD, so your total will be 14 pins for everything. This would allow you to use something like the Arduino Pro Mini, as long as it has enough serial lines for everything.

Just google Mono LCD, and see what looks good to you. Make sure it is controllable via serial, and doesn't have any high voltage requirement.

What type of battery to use Li-ion? How should I decide on batterygiven size considerations?

Build the device then you can measure the power draw and figure out how long you want it to run, etc. Then you can pick a battery based on that and the final size of the project. This won't be hard to find something that works.

\$\endgroup\$
0
\$\begingroup\$

For your size constraints, you can look at Teensy or mbed. There's also a new Kickstarter project for a board called Galago, which I find quite intriguing. It's nice because it's the size of the Teensy, but supports hardware debugging via their IDE. The only problem there is that their board isn't going to be released (at best) until November 2012, and it doesn't have as many I/O as Teensy and mbed.

Those suggestions might not help if you only have 2.5 months, and if you're only used to Arduino programming. This tells me that you expect to use a micro that's practically plug and play, with minimal fuss as far as peripheral support libraries go. Because of this, you either bite the bullet and go with a nice, small platform but post questions here (or elsewhere) along the way to get additional help, or you look for another Arduino-compatible board that has a small enough footprint, but has enough pins to support your external devices. Teensy also has libraries available that were ported from Arduino, so it sounds like there's some Arduino compatibility there. The small Mini and Nano boards don't have all of the I/O that you think you need, but more on this in a bit.

I haven't any experience with LiIon or LiPo batteries, but I'm just starting a fun project where I will learn about them a little. I recently saw a post showing a guy's LiPo battery charger via USB, so you might want to take a look at that. LiPo batteries come in all kinds of shapes. While looking around for my project, I saw flat, rectangular, and round LiPo batteries, which is really nice. Each cell (1S) is 3.7V, so I assume that if you keep your project running on 3.3V, one cell might do the trick for your packaging requirements.

As far as the LCD goes, you have lots of options, and here's where I think you can cut back on your I/O budget by a large margin. If you want to go with a simple parallel monochrome LCD, those can be driven with a 4 bit or 8 bit bus, plus strobe and RW lines. But since nicer and smaller displays exist, and you did mention cell phone, check out some of the LCDs from SparkFun that are color and SPI or I2C compatible. Then you'll either be able to use the smaller Arduino boards, or go with something new / different if you feel ambitious.

\$\endgroup\$
0
\$\begingroup\$

My recommendation would be to bite the bullet and invest a week or so in learning to deal with bare ARM MCU's (setting up the toolchain, etc) as almost every vendor offers one. Assuming your software can fit in the 8-128 KB of on-chip flash (a few devices have more) this is an inexpensive choice, with a lot of options - need a small PCB, you downgrade to the 48 PQFP, need more pins you jump up to the 64-pin or even larger device, while keeping the time consuming part (learning to build projects and configure on-chip peripherals) the same.

I routinely put these on hand made PCB's with a fairly large iron tip using only a 10x loup for inspection after soldering and fine braid to clean up any bridges, though I'll admit it's an acquired skill.

ST's STM32F10x family is my current reach-for choice, with < $10 eval boards/in circuit programmers which can work with open source tools on any desktop platform, but each engineer will have their own preference - typically driven as much by familiarity as actual advantages.

The AVR family is probably going to also put you into the surface-mount only devices (as used on the Arduino Mega) to get the actual I/O count you want, though obviously if you can work out a multiplexing scheme (including the serial display interface possibility others have mentioned) that would cut the requirement down to what the DIP package parts provide. As you are probably aware, the Ardunio IDE, bootloader, and hardware are all distinct components with a lot of mix and match possibilities - you can use the board to evaluate a bare metal software solution, use their bootloader to load it, or you can make your own minimal board and run their software and libraries, etc.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.