Author Topic: Beginner Question  (Read 737 times)

0 Members and 1 Guest are viewing this topic.

Offline kyleighterryTopic starter

  • Newbie
  • Posts: 1
  • Country: us
Beginner Question
« on: September 20, 2024, 04:27:35 am »
So this may be a silly simple question, but I’m new to the nitty gritty of electronics and would appreciate if someone pointed me in the right direction to get this project going.

I’m looking to make a little art project in a picture frame. In the picture frame I want to attach a light action figure. I want to rig it to where when I press a button, a preprogrammed noise goes off and the toy moves up and down.

Any help, suggestions, name of the electronics that will be needed to make this happen would be much appreciated!
 

Online Bryn

  • Regular Contributor
  • *
  • Posts: 187
  • Country: gb
    • mindsConnected
Re: Beginner Question
« Reply #1 on: September 20, 2024, 06:34:41 am »
For that, you will need the following:
  • A microcontroller (such as a Raspberry Pi), which would serve as the "brain" of your project and can be programmed for the basic things you want for it
  • A servo motor, where it is needed should you want the figure to move up and down especially if you want it move in these directions smoothly (and not slightly deviate from its path)
  • A sound module, like the DFPlayer Mini, and can easily be interfaced with the microcontroller and also play audio files stored in a microSD card (so you'll need that also if you don't have one handy)
  • Everything else such as a power supply, wired, breadboard and a simple push button for the magic to work once everything is assembled with these and other things above

By these, you should be able to start building your art project as long as you know what part connects with what, and also some programming skills for everything to work the way you want it to be.
mindsConnected
Alternate tech forum for all... we welcome engineers also!
Interesting long read: Create a 12v battery from 6v batteries
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4497
  • Country: nz
Re: Beginner Question
« Reply #2 on: September 20, 2024, 10:23:01 am »
Point of order! A Raspberry Pi isn't a microcontroller -- except the Pico, which would be at the same time good enough for this task, and also overkill.

Depending on how hifi / long the sound is a $0.10 8 pin CH32V003 could be enough for this project. You can program it "bare metal" or there is an Arduino library implementation for it.

- two pins for power and GND

- a pin for the button

- a pin for a PWM signal to a cheap (e.g. 5g) R/C servo (https://aliexpress.us/item/1005007335327107.html or many others)

- a pin for the audio out

There are still 3 pins to spare!

The limiting factor of the CH32V003 would be the 16k of flash, which might not be big enough to store the sound you want to play as well as the (very small!) program code.

Here are some things people have done with that chip:





Spending $2 or $3 or $4 on a higher end chip with more speed and RAM and flash might make things easier, but that's half the fun, right?

Here's me getting digital audio out of 1 GPIO pin on a microcontroller back in early 2017. That one is running at 256 MHz and has a whopping 16 KB of RAM (vs 2 KB in the CH32V003, and 48 MHz) and a 16 MB external SPI flash which I used maybe half of for the rather long song.


 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38641
  • Country: au
    • EEVblog
Re: Beginner Question
« Reply #3 on: September 24, 2024, 06:30:30 am »
For that, you will need the following:
  • A microcontroller (such as a Raspberry Pi), which would serve as the "brain" of your project and can be programmed for the basic things you want for it
  • A servo motor, where it is needed should you want the figure to move up and down especially if you want it move in these directions smoothly (and not slightly deviate from its path)
  • A sound module, like the DFPlayer Mini, and can easily be interfaced with the microcontroller and also play audio files stored in a microSD card (so you'll need that also if you don't have one handy)
  • Everything else such as a power supply, wired, breadboard and a simple push button for the magic to work once everything is assembled with these and other things above

By these, you should be able to start building your art project as long as you know what part connects with what, and also some programming skills for everything to work the way you want it to be.

Way too complicated.
This could be hacked together with a simple hobby servo motor and armature system that moves the figure up and down.
https://www.ebay.com.au/itm/355408250389
Just connect a latching button to the motor.

Then all you have to do is wire an SD card message playback generator in parallel to the motor. e.g.:
https://www.ebay.com.au/itm/313451481615
So it plays whatveer message you want when you press the button.

No need for any programming here.
« Last Edit: September 24, 2024, 06:34:19 am by EEVblog »
 
The following users thanked this post: MK14

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: Beginner Question
« Reply #4 on: September 24, 2024, 08:55:44 am »

Way too complicated.
This could be hacked together with a simple hobby servo motor and armature system that moves the figure up and down.
https://www.ebay.com.au/itm/355408250389
Just connect a latching button to the motor.

...

No need for any programming here.

I think you still need some sort of controller to send a signal to the servo.

You could pair up a continuous rotation servo with a simple servo tester like one of these to avoid programming:

https://www.amazon.com/HiLetgo-Consistency-Controller-Adjustment-Helicopter/dp/B07TQSKLBK/

Update: Or are you suggesting opening up the servo and modifying it so that the motor always runs? I suppose that could work too. Relevant video:

Converting Servo to Regular DC motor -- miliohm
https://youtu.be/cxLo8qDG1Kg
« Last Edit: September 24, 2024, 09:18:10 am by ledtester »
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38641
  • Country: au
    • EEVblog
Re: Beginner Question
« Reply #5 on: September 24, 2024, 10:36:14 am »
You could pair up a continuous rotation servo with a simple servo tester like one of these to avoid programming:

Yes, that's what I meant.
Or a DC motor with inbuilt gear reduction, e.g.
https://www.digikey.com.au/en/products/detail/seeed-technology-co.,-ltd/114090050/10385087
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4497
  • Country: nz
Re: Beginner Question
« Reply #6 on: September 24, 2024, 11:05:48 am »
No need for any programming here.

Not sure what's supposed to be so hard about programming -- it's a lot easier than analogue electronics or making mechanical things. Something low performance like this is dead easy to do using e.g. Arduino libraries.
 

Offline EEVblog

  • Administrator
  • *****
  • Posts: 38641
  • Country: au
    • EEVblog
Re: Beginner Question
« Reply #7 on: September 24, 2024, 11:38:03 am »
No need for any programming here.

Not sure what's supposed to be so hard about programming -- it's a lot easier than analogue electronics or making mechanical things. Something low performance like this is dead easy to do using e.g. Arduino libraries.

"Beginner"
No need for any "analog electronics" here. Just connect things up.
As for mechnical, that's a given, you have to contruct some sort of mech interface to make the figure move up and down.
« Last Edit: September 24, 2024, 11:39:41 am by EEVblog »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3249
  • Country: us
Re: Beginner Question
« Reply #8 on: September 24, 2024, 04:08:54 pm »
Not sure what's supposed to be so hard about programming -- it's a lot easier than analogue electronics or making mechanical things. Something low performance like this is dead easy to do using e.g. Arduino libraries.

In fact, just google "code to sweep a servo" - it's an Arduino library example.
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2407
  • Country: us
Re: Beginner Question
« Reply #9 on: September 24, 2024, 05:22:53 pm »
   I have many of the skills mentioned so far here, including a couple years on bench technician repairing dense system pc boards.   Might be satisfying to do a less complicated build, that does the sound and LED driving you need:

   Try purchase a couple of 'drug store' greeting cards (Happy Birthday, etc.), that has sound / lights & also maybe a moving portion (like a paper 'hand' waving.

   Similarly, I've purchased inexpensive toys that have interesting features;   A little battery powered 'bird', that chirps and sings, triggered off of a light sensitive part (Cds photo resistor).

    With that 'bird', you can experiment with the photo sensor, for perhaps a hand wave in front of your frame....maybe the robot bird sitting on a piece of little tree branch, there in the frame.

   And even that frame could be done by converting some (cheap) picture frame, maybe obtained from a 'crafts store'.

   Battery operated things like this are fairly safe, for a beginner, and  can be modified in experimental ways:
Try, place a small speaker in series with an output originally intended to drive a small d.c. motor.   Just for your curiosity, but many times a motor driver circuit has tone sounds and click noises (from circuitry originally for driving motor, or solenoid).
   You can also try out an LED in similar (experimental) but also place a resistor, around approx. 200 ohms, that will blink and flutter, according to the toy outputs intended for a motor.

   As to safety, those sorts of toys or electronics greeting cards often are seen to run on 3 battery cells...;  like 3 AAA batteries, that sort of thing.

   I suppose you could label (my own) approach, to involve pre-built stuff, as 'gorrila technician', meaning use of ordinary parts, that had other intended uses.
 

Online RJSV

  • Super Contributor
  • ***
  • Posts: 2407
  • Country: us
Re: Beginner Question
« Reply #10 on: September 24, 2024, 06:09:13 pm »
Here, I've placed photo of a greeting card type circuit, that waves the tail of a dog, graphic on paper.   The little pc board has the usual processor, (potted in black plastic), and in this case has 2 little solar cells, (no battery).

   So, when card is opened, the little paper 'tail' will oscillate, pendulum style, by way of a coil on the lower end, with fine wires to the circuit.

   Not exactly what you wanted, but an unusual circuit, that runs when in light, due to the solar cells.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf