Recommend me a microcontroller dev board

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
I am looking for an inexpensive microcontroler dev board (or similar) that has the following attributes:
1.Can run off standard batteries (AA, AAA, 9V) and doesn't drain a ton of power.
2.Can be programmed in C from a standard Windows PC over USB using free tools.
and 3.Has 4 pins each of which can somehow drive/turn on and off (either directly or via additional circuitry) a set of 4 of these LEDs (not sure if I need to wire them in parallel or series) https://www.jaycar.com.au/red-3mm-led-2800mcd-round-clear/p/ZD0104
 

danadak

Joined Mar 10, 2018
4,057
https://www.cypress.com/documentati...s/cy8ckit-043-psoc-4-m-series-prototyping-kit

https://www.cypress.com/documentati...oc-5lp-prototyping-kit-onboard-programmer-and

The first board is PSOC 4 low end, the second PSOC 5LP.

The IDE and compiler are free. The onchip resources (lots of analog as well) in attached
catalog of components. A component is an onchip resource. The 5LP has pretty much
all the catalog resources, the 4 a subset.

Lots of video training https://www.cypress.com/video-library/PSoC-Software/psoc-creator-101-lesson-1-introduction-0/108116

There are lower cost boot loader based boards, but I recommend you start with
above as boot loader boards do not have debug.


Regards, Dana.
 

Attachments

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
I think for what I want (something that will continuously turn the 4 strings of LEDs off and on in a specific sequence) a full on ARM Cortex-M0 is overkill (especially given the desire to run it off regular old AA or AAA batteries).
I need something that uses a lot less power (and I dont particularly care if it doesn't have easy debugging options)
 

AlbertHall

Joined Jun 4, 2014
12,346
I think for what I want (something that will continuously turn the 4 strings of LEDs off and on in a specific sequence) a full on ARM Cortex-M0 is overkill (especially given the desire to run it off regular old AA or AAA batteries).
I need something that uses a lot less power (and I dont particularly care if it doesn't have easy debugging options)
In that case one of the smaller PICs would do the job.
 

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
Does Microchip still charge extra if you want all the features in the PIC development kit (IIRC you have to pay money to get the PIC compiler with full optimization options)
And are there any easy-to-program PIC dev boards out there?
 

danadak

Joined Mar 10, 2018
4,057
Then Attiny85, you buy and Arduino UNO or NANO board and use that
to program the ATTINY85. 8 pin dip, or bigger dips for more I/O. Google
"attiny85 boards", there are some real low end dirt bag boards out there.
Arduino IDE of course free, as are the other tools below.










Use Arduino to write the C code. Or GUI Block programming Snap4Arduino,
Ardublock, or Mblock. Or Bascom basic https://www.mcselec.com/ to write
code in basic.

Regards, Dana.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
I think for what I want (something that will continuously turn the 4 strings of LEDs off and on in a specific sequence) a full on ARM Cortex-M0 is overkill (especially given the desire to run it off regular old AA or AAA batteries).
I need something that uses a lot less power (and I dont particularly care if it doesn't have easy debugging options)
As an aside Cortex M0 now considered a real low end processor, billions
being shipped.

https://www.arm.com/zh/files/event/20130715_AES_Joseph.pdf


Regards, Dana.
 

djsfantasi

Joined Apr 11, 2010
9,160
To add to @danadak ‘s reply.

Those three boards can all be programmed in C using the (free) Arduino IDE on your PC with the included USB cable.

The ATTiny85 can also use the Arduino IDE and USB on your PC, but requires an USB programmer that you can buy from Sparkfun for less than $20.
 

danadak

Joined Mar 10, 2018
4,057
To add to @danadak ‘s reply.

Those three boards can all be programmed in C using the (free) Arduino IDE on your PC with the included USB cable.

The ATTiny85 can also use the Arduino IDE and USB on your PC, but requires an USB programmer that you can buy from Sparkfun for less than $20.
You can save yourself some dough using a UNO or NANO to program the ATTINY85.

https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829

Above just one of many examples on web.


Regards, Dana.
 

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
Definitely looks like an AVR is the microcontroler of choice then.
Just need to investigate my options here in Australia (shipping from overseas will cost too much for what I am ordering, that or it wont get here in time for the event I need it for)
 

djsfantasi

Joined Apr 11, 2010
9,160
You can save yourself some dough using a UNO or NANO to program the ATTINY85.

https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829

Above just one of many examples on web.


Regards, Dana.
He’s right. You can get an Arduino Uno clone from Elegoo for $15. Then wire it up to your breadboard with the ATTiny85. And hope you don’t make a mistake and that all connections are solid.

Or, for $1 more, buy the Sparkfun programmer (actual retail price $15.95) and plug it in. Also, if you want to program another ATTiny85 in the future, you don’t have to search for how to wire up an Uno as a programmer, wire it up... etc. Just find the programmer and plug it in.

Many people have the idea that a programmer is a significant investment. Which may be true for some microprocessor platforms. For those chips that the Arduino IDE supports (and it supports more than Arduino) there may be a less expensive options.

Manufacturers are beginning to make chips that can be supported by the Arduino IDE because of its popularity, ease of use, excellent support and ubiquitous nature.

Personally, the extra dollar is worth the simplicity, ease of use and peace of mind. My time to create a programmer with an Uno is definitely worth more than $1
 

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
Yes that is correct, 4 strings each of which is 4 LEDs.
And my code will basically do this
Toggle the 4 lines to the first sequence
Wait a little bit
Toggle the 4 lines to the second sequence
Wait a little bit
And continue like that until it wraps around to the first sequence
 

djsfantasi

Joined Apr 11, 2010
9,160
Yes that is correct, 4 strings each of which is 4 LEDs.
And my code will basically do this
Toggle the 4 lines to the first sequence
Wait a little bit
Toggle the 4 lines to the second sequence
Wait a little bit
And continue like that until it wraps around to the first sequence
Why do you need to toggle 4 lines? Are they on one pin or four pins?
 

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
I have 4 separate strings of 4 LEDs each.
On the first cycle I need all 4 strings off
Then string 1 on.
Then another string on.
And so on in the sequence I have in mind.
 

djsfantasi

Joined Apr 11, 2010
9,160
Ok, so you can toggle one pin and turn on the 4 LEDs of the first string. How you do that depends on what power supply you decide on and the characteristics of the LEDs in each string (forward voltage and current rating). Knowing those parameters, we/you can design how to wire each string and calculate the values of resistors which you’ll need.

As far as deciding on an appropriate power supply, we/you need to know what microprocessor you’ve chosen.

You provided a link to the LEDs, so you’ve provided the forward voltage and current rating. So the wiring design can be done.

Finally, it’s likely that you’ll need something to drive the LEDs. A transistor or logic level MOSFET. I’ll go out in s limb and suggest 2N7000 logic level MOSFETs.

Let me know your chosen microprocessor solution and I/we can provide you with a complete solution.

The monkey is on your back.
 

djsfantasi

Joined Apr 11, 2010
9,160
Here is the schematic using an ATTiny85. It will run on 4 AA batteries.

To be added later

I was overly hopeful. The link to the LEDs you supplied provided no data sheet specifications. A little research suggests that a forward voltage of 2.1V and current of 25mA is reasonable. Before I continue, note that the current specification for an LED is the maximum current. They often run with just a little discernible difference in brightness as low as 5mA. For your project, I will use 10mA. Follow my calculations and you can pick a resistor for any current.

With only 6V available, you can’t run more than 2 LEDs in series. Those LEDs will drop 4.2V, leaving 1.8V across a current limiting resistor.

How do we calculate the needed resistor? Using Ohm’s law, R=V/I or in this case, 1.8V/0.01A or 180 ohms.

That’s good for 2 LEDs, but you want 4. Simply parallel a pair of these substrings, and Voila! 4 LEDs.

But you can’t drive this serial/parallel string of four LEDs directly with a microprocessor. Ta da, bring in the MOSFET! Connect the gate to the pin and a 10K resistor to ground. Connect the source to ground and the drain to the cathodes of the LED strings.

That’s it. Repeat for the remaining three strings and we’re ready to test. Almost... we need code

This is code for an ATTiny85. It had a pause while it cycles through the LED strings. To eliminate the pause, replace “i=0” with “i=1” in the fir statement. You can create it with the Arduino IDE and program it with your PC and a Sparkfun programmer... or the hard way danadak likes. (Hehe)

C:
#define LEDString i
// LEDString is an alias for 
// the index used in the “for”
// statement.

setup() {}

loop() {
const int mydelay = 4000;
// for a 4 second delay
// between each string

for(int i = 0; i<5; i++) {
digitalWrite(LEDString,HIGH);
delay(mydelay);
digitalWrite(LEDString,LOW);
}
}
The code in the loop() function automatically repeats, so you don’t have to code an external loop.

Any questions? Just ask!
 

Thread Starter

Jonathan Wilson

Joined Jun 9, 2019
22
That code looks good, exactly what I need.
If you can come up with the schematic for this (and a parts list) that would be very useful since its been a while since I have done anything with electronics (back then a Z80 or 6502 was state-of-the-art if you wanted to add a microprocessor to a project)
As for the LEDs, click on "specifications" and it shows the relavent data.
That lists a "typical forward voltage" of 2V, a "typical forward current" of 20mA and a "maximum forward current" of 50mA (among other things)
 
Top