Architecture Pro

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

Architecture Pro

Postby Andrew Davie » Sun Aug 06, 2017 10:27 pm

This post describes the televisor's connections to the Arduino Micro.

The Arduino Micro is a capable beast and I used it for my televisor, but it doesn't seem to be too popular. It is becoming harder to find and seemingly replaced by the similarly named but slightly different (?) Arduino Pro Micro. They use the same micro-controller, the ATMega32U4, but the Pro is roughly 1/2 to 1/3rd of the price. In theory it should be possible for my televisor to work using the Pro Micro, provided I get all the connections right. So that's what I'm going to start thinking about in this thread. The Pro Micro is very common on AliExpress, and rather cheap (around US$4).

I thought I'd start by listing equivalent pins, so I'll grab the pin connectors from the other thread...

Image


MOSI --> blue of SD card (MOSI)
RX LED/SS
1/TX <--> Nextion RX (yellow)
0/RX <--> Nextion TX (blue)
RESET
GND --> GND of motor board --> speaker negative
2/SDA
3(PWM)/SCL --> output PWM for motor board
4/A6 --> purple of SD card (=CS select pin)
5(PWM) --> SD on PAM8302 (selects on/off and reduces pops) --> TODO: implement software
6(PWM)/A7 --> speaker positive
7 <-- comparator input from IR sensor board
8/A8
9(PWM)/A9
10(PWM)/A10
11(PWM)
12/A11

13(PWM) --> LED driver board PWM output
3.3V
AREF
A0
A1
A2
A3
A4
A5
nc
nc
+5V --> +5V of IR control board, 5V of speaker board, 5V of nextion
RESET
GND --> GND of IR control board
VIN <--- +12V from motor AC/DC converter (shared with motor)
MISO --> green of SD card
SCK --> yellow of SD card

additionally,

5 "modules"...

1) LED control board
takes GND from IR control board
takes PWM from Arduino pin 13
takes GND and +22V from AC/DC converter board
outputs -/+ to LED array
"outputs" GND to SD reader (grey)

2) IR control board
takes +5V from Arduino +5V
takes GND from Arduino GND (right side)
"outputs" GND to LED board GND
"outputs" +5V to SD reader (orange)
outputs IR sync pulse to Arduino comparator on pin 7
outputs GND/5V to IR xmit
takes +/- from IR rcv

3) motor board
takes GND/+V (12V) from AC/DC converter board
outputs -/+ to motor
takes PWM from arduino pin 3
takes GND from arduino GND (left side)

4) sd card
grey --> LED GND
purple --> arduino pin 4 (CS select)
blue --> arduino MOSI
green --> arduino MISO
yellow --> arduino SCK
orange --> IR control +5V

5) Nextion
black GND --> arduino GND
yellow RX --> arduino TX
blue TX --> arduino RX
red +5V --> arduino +5V


I'll use bold green text as I update the links to the pins for the Arduino Pro Micro.

Here's a neat view of the Pro Micro pins... I haven't done any changes/content yet, so watch this space.

523a1765757b7f5c6e8b4567.png
523a1765757b7f5c6e8b4567.png (386.34 KiB) Viewed 8035 times
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Architecture Pro

Postby Andrew Davie » Sun Aug 06, 2017 10:31 pm

OK, I see this...

"VCC is the voltage supplied to the on-board ATmega32U4. This voltage will depend on whether you’re using a 3.3V/8MHz Pro Micro or a 5V/16MHz version, it’ll be either 3.3V or 5V respectively. This voltage is regulated by the voltage applied to the RAW pin. If the board is powered through the ‘RAW’ pin (or USB), this pin can be used as an output to supply other devices."

There's no 3V3 output (required for the MicroSD card - although I did somewhat successfully run my MicroSD card at 5V for the longest time. I might need to provide separate voltage supply. I don't think I'm going to even consider the 8MHz speed option, as I'm definitely pushing the 16MHz Micro as it is. So, that decision effectively defines VCC as 5V.


Let's start with the MicroSD card, then...


4) sd card
GND --> any GND
CS --> pin 4 (unchanged)
MOSI --> 16=MOSI
MISO --> 14=MISO note the out-of-order 14/15/16 pin numbering in the diagram!
SCK --> 15=SCLK
VCC --> 3V3 from somewhere!

Now the nextion (an optional component)...

5) Nextion
black GND --> any GND
yellow RX --> 1=TX or to RX if I have them the wrong way round
blue TX --> 0=RX
red +5V --> VCC (=5V)
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Architecture Pro

Postby Andrew Davie » Sun Aug 06, 2017 10:48 pm

For the motor and LEDs (and the sound) I require PWM outputs.
However, there are restrictions on which timer interrupt output on which PWM pins. I'm going to have to do a bit of investigation to find/confirm which pins are which (or even if they're connected) on the Pro. If they're not connected, that's a show-stopper and we're dead in the water.

Available PWM pins, based on the diagram, are 3, 5, 6, 9, 10.

Mmh. This post details a hardware fix that suggests that the required pinout for high-speed timers is not "broken out" on the Pro Micro. That is, the AtMega32U4 pin might not be connected to any of the output pins on the Pro itself. That's a show-stopper.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Architecture Pro

Postby Andrew Davie » Sun Aug 06, 2017 10:57 pm

Here's a lovely diagram of the Pro Micro...

pro_micro_pinout_v1_0_red.png


For the while, this idea is dead unless someone can show/convince me that the high-speed timer 4 is broken out to a pin. How sad.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: Architecture Pro

Postby Steve Anderson » Mon Aug 07, 2017 5:30 am

Yep, these pre-assembled modules are often frustrating in their omission of pins, and/or the inability of the micro to output in hardware internal functions. You generally have little choice in processor selection. This applies to all flavours of micro, ARM, PIC and all the rest.

You have to admit this application is somewhat unique compared to the run-of-the-mill uses for these devices. Controlling your washing machine, microwave or alarm system, even 625 vision processing. They have a vast array of applications they are suited for, just not quite this one - perhaps. I'm sure you'll work around it - somehow!

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5360
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: Architecture Pro

Postby Andrew Davie » Mon Aug 07, 2017 10:44 am

Steve Anderson wrote:I'm sure you'll work around it - somehow!



It's not worth the effort! Unit cost Arduino Micro: US$5-$10 vs Unit cost Arduino Pro Micro US$4-#7
I'll just stick with the rarer Micro!
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia


Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 2 guests

cron