Im using an atmega328 MUR so far, Im a PCB layout designer but not a electrical engineer, I have a project I need help with the circuits
6 zones of RGB 12v led strips, common anode with Rgb cathodes, needs to be dimmed in brightness by a 60mm travel 10Kohm slider potentiometer, but each zone can be different in brightness. 3 other sliders are provided to control colors
so 4 sliders total 1 brightness, 2. red 0-255 3. green 0-255 4. blue 0-255
B a single push button to scroll through each zone, only the 4 sliders will do the controlling so each zone must save the current slider positions, then as the button is pressed the next zone can be changed without effecting the others.
need a finger print sensor
need an RFID scanner
a latching emergency stop button momentarily engaging 2 pin solenoids for 3 seconds then off while still High from latching button
stepper motor control with 2 buttons for open/close positions on the stepper
play sounds from files on sd card
I am using 74hc595 shift registers controlling N channel mosfets for the rgbs and solenoids
voltages are 12v on leds solenoids
5v for MPU
3.3 for finger sensor and rfid
ive made a mostly complete sloppy schematic if that helps.
hope someone can
Need #1 can be solved in software with common potentiometers.
Need #2:this sensor is kinda the new kid around the block those days, it also includes a RGB light around this module to indicate whether the fingerprint recognition is successful
Need #3: depends on which type of card you want to read. You have a choice of the typical RC522, PN532, RDM6300 and more... If the use case is simple I would go for a PN532 NFC/RFID controller (it's a popular NFC chip that is embedded in many phone or device that does NFC).
Need #4: You can find big red buttons for emergency stop. Connecting it to an interrupt pin could help with "emergency situation" if software actions are needed.
Need #5: I don't know what open or close mean for a stepper. Are you talking about limit switch? (ie detect when the course is complete in one direction or the other)
Need #6: there are multiple MP3 players. Some like the DFMini Player will have an SD card, others like the DFPlayer Pro would have an on-board 128MB Storage and you don't need to mess around with the SD. if you need to be "louder", you'll find other shields like the Adafruit "Music Maker" MP3 Shield with a 3W Stereo Amp. SparkFun also offers an MP3 Player based on the VS1053B MP3 audio decoder IC.
For 6 channels of RGB you need 18 PWM outputs. The ATmega328 only has 6 and that assumes you don't need to use one of the three timers for something else. There are several 16-channel PWM chips like the PCA965. You might even find one that can sink your 12V cathodes directly. That and two of the PWM outputs from the ATmega will get you 18 channels.
I'm concerned that you may find this won't be very convenient to use. It might be worth building a prototype first, just using 6 X 5mm RGB LEDs to represent your zones, to see how well it works in operation.
Suppose you get them adjusted as you want, but then realise you made zone 3 too dark or just the wrong shade of pink. To get back to adjusting zone 3, you will have to go via zones 1 and 2. If you keep clicking the button to get to zone 3, you will disturb the settings in zones 1 & 2, making them the same as zone 6, unless you readjust them each again to what you want. If you make another mistake, you have to go around all 6 zones again, adjusting each in turn.
I just think you might want to re-think the "user interface" after you try it.
Are you using a "shift-pwm" library or something? Otherwise you cannot dim or select more than 7 colours with 74hc595. Shift-pwm libraries can be quite resource-hungry, and with all that other stuff going on, you might get flickering and flashes of unwanted colours because the Arduino cpu is busy doing something and can't maintain the PWM signals perfectly. That's why the pca965 is such a good idea. It off-loads the PWM signal creation from the Arduino.
On a tutorial by Kevin Farrah on 8x8x8 rgb led cube, he used the 74hc595 to get all his colors (more than 7). He used multiplexing in the code with bit angle modulation. Heavy code but now know all the chips, or many at all. I thought I could adopt that method. Now hearing these pwm chips that sounds like a place to go. Also the fingerprint sensor and stepper motor driver both need int0 and INT1. I’m not sure if I’m okay to put two devices on those pins at the same time. Does it work like a 1 wire library or i2c lines?
As for the interface that a very good point.
This is all for my brothers computer cockpit man cave. The emergency stop is an over kill way of getting out. It triggers some solenoids to unlatch his monitors and they lift up to the ceiling letting him out. As for the door open door closed, they will be preset positions for the stepper in the code. There is a pocket door going into the room and we will use a nema 17 steeper 40mm to open and close it. The rfid and finger scanner will let him in from the outside. Sounds want to be played like a mechaworrior theme. “Systems online” “reactor ready” etc. if anyone is familiar with the game. It’s crazy. Like I said. I layout pcbs. Not design the circuits. Thanks!
Yes, it is absolutely possible to mix more colours with that technique, but an led cube does not usually have fingerprint readers, RFID readers, stepper motors and other stuff like that attached (and their associated libraries). With only a cube to drive you can guarantee that the Arduino's CPU is dedicated to maintaining those PWM signals accurately.
Interupt pins can be shared, if wired in the correct way, but probably the libraries that drive these components don't expect to be sharing those interrupt pins with other components. Post links to the specs or data sheets of those components, and to the libraries you intend to use with them.
Does not sound like an appropriate use for a stepper motor. Stepper motors, by themselves, have no idea what position they are at. Perhaps you meant servo motors?