Jump to content

Recommended Posts

  • Replies 454
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

@h4nd I have a couple of questions.

What is the 'go' signal?

Does the arduino need to be powered all the time or for a set amount of time to boot?

The actuators have limit switches that cut the motor up or down, what happens in this condition?

Does everything reset for the trip downwards with reversed polarity on the motors? At the moment this is just done with a dt switch taking all load.

Posted
7 minutes ago, ThePog said:

@h4nd I have a couple of questions.

What is the 'go' signal?

Does the arduino need to be powered all the time or for a set amount of time to boot?

The actuators have limit switches that cut the motor up or down, what happens in this condition?

Does everything reset for the trip downwards with reversed polarity on the motors? At the moment this is just done with a dp switch taking all load.

The L298Ns are an H bridge controller so they switch the polarity for you. No idea about any of the other questions as I've not used them!

Posted
2 hours ago, ThePog said:

@h4nd I have a couple of questions.

What is the 'go' signal?

Does the arduino need to be powered all the time or for a set amount of time to boot?

The actuators have limit switches that cut the motor up or down, what happens in this condition?

Does everything reset for the trip downwards with reversed polarity on the motors? At the moment this is just done with a dt switch taking all load.

I wondered when you'd spot that. Either I'm very dumb, or lazy, I have a sneaky plan (or 3).

Actually there's a few options, depending on what suits you.

  • fit some external up/down buttons to spare inputs (except A4, A5)
    • safe - normal, boring. Don't do that to me!
      • image.png.31e0aa5e9e6c424381231efe30d40121.png
  • have a laptop to send a serial string saying - up / down now!
    • image.png.eeaa90424c9991d0dfbe3c9eaa6e3600.png
  • do the same with a serial interface from you phone usb port.
    • boooring, but smaller and more portable, OR!
    • Add a bluetooth serial module to the rig, so same as above, but wireless
  • CAN bus?
  • OG TV remote with 2 tuning forks and a microphone, for the whistle the right tone at it LoLs
  • re-purpose an old TV remote, bang an IR receiver on the arduino ($2)
  • Add a single button where you have to tap 'Fuck Trum'p in morse for it to work - y'know, a safety cognition test to prevent kids and the mentally feeble from operating it and injuring themselves or others
  • run the motors up to see if they move. If not, you've topped out at the top, so start going down instead
    • I'd have put current feedback on those motor drivers, but the end-stop on the actuators will be fiiine, we'll just look for 'the motor stopped turning'
  • better yet, run the motors down unless they've stopped - if so, run them up:
    • That way from rest you can make it go up to 1/2 way, and just power it off - then it'll come down next time.
    • Full positional control all from just the main power switch
Quote

Does the arduino need to be powered all the time or for a set amount of time to boot?

Just put it on the power control. Wakes up in about a second. Slow for a uController, but it's got to do some bootloader fucking around.

Quote

The actuators have limit switches that cut the motor up or down, what happens in this condition?

Job done, the Arduino puts itself to sleep (goes to about 10mA); then you can turn the drive system power off.

The limit switches are selected through diodes, so when you run them the other way - off they go again.

Quote

Does everything reset for the trip downwards with reversed polarity on the motors? At the moment this is just done with a dt switch taking all load.

Nah, per last option above, the Arduino just goes, oh: drive isn't making the spinny, off we go the other way.

Simples

image.png.e5270c6f37aff4fd69bcabcbff0065cc.png

Posted

Cheers @h4nd

 

All of these methods are excellent, however a single go button would probably be the best.

I was excited to bring you some scope creep but it seems you have addressed that, ruining my fun.

I was going to ask if the bed could be stopped at any position by podging the button, this looks like it is solved.

The button probably needs to be an estop as well, just in case there is need to stop it quickly...

Otherwise that all looks spiffy.

Edit; pull up resistors indication on your diagram?

  • 2 weeks later...
Posted

Was gonna build a noise thingy for kiddo. cheap simple noise PCB! ACE!

8 simple switch inputs, fuck yeah no software! should only take an hour

in this mode each button plays noise 1-8 - sweet, but need more noises!

in that mode it's a binary input for 255 noises. Great. wire up - test. but it starts at 0-127 twos-complement???!?!

yeah, all inverted, starts at 1 not 0. Whut?? Oh, so I'd need to space all the noise files every 2nd number if I use a button? only 1/2 the entries are usable?? huh??

oh, oh dear only 126 available then.

hang on, you're not playing the intended file number!

yeah, that numbering scheme? It actually ignores the number on the files, and indexes according to whatever order you put the files on the storage.

whuuut? I'm gonna have to do a software, aren't I

>:-(

 

  • Thanks 1
Posted

Driving a relay: often needs a 'catch diode' stop the back-emf putting 100V+ up the bum of your sensor/transistor/Arduino:

20241223_143939.thumb.jpg.a079fe74310f386b0aec28b8e0122bba.jpg

 

Yep, Kettering ignition uses exactly this effect to get ~100V on the primary of your ignition coil, which gets a 1:100 boost across the secondary to get your 10KV spark ignition voltage.

Also, it is reprehensible to make a gadget that does this for a BDSM party. And let busty goth chicks near it.

Posted
On 22/12/2024 at 15:27, h4nd said:

whuuut? I'm gonna have to do a software, aren't I

>:-(

The software

Quote

  outputVal = ~(inputVal + 1);
  writeOutput(outputVal);

the hardware for the software:

20241225_115513.thumb.jpg.8202410398fd4f95e693cd295f363384.jpg

  • Like 2
  • 1 month later...
Posted

I made it spit out stuff with commas

Up
ct1,	T1,	Drv1,	ct2,	T2,	Drv2,	ct3,	T3,	Drv3,	ct4,	T4,	Drv4
1,	0,	255,	1,	0,	255,	1,	0,	255,	0,	0,	255,	
2,	633,	255,	2,	652,	255,	2,	601,	255,	2,	515,	255,	
3,	616,	255,	3,	616,	255,	3,	568,	255,	3,	512,	255,	
4,	611,	255,	4,	611,	255,	4,	556,	255,	4,	509,	255,	
5,	599,	255,	5,	602,	255,	5,	550,	255,	5,	508,	255,	
6,	593,	255,	6,	600,	255,	6,	537,	255,	6,	507,	255,	

So I could save as .CSV, put in a spreadsheet and graph the screwups to figure them out

image.png.afca3794d22d38c32d0090bc5c35eeb0.png

 

oops, T3 slows down when I reduced drive on Drv4?

hmmm:

Quote

    analogWrite(Motor1_1, 255 - drive1);    // now referencing motor drive from +ve, so need 255 - (x)
    analogWrite(Motor2_3, 255 - drive2);
    analogWrite(Motor4_3, 255 - drive3);
    analogWrite(Motor3_1, 255 - drive4);

There's yer problem, probably

 

 

  • Like 1
  • Thanks 1
  • 4 weeks later...
Posted

So first time trying to play with an Arduino for a project and now wishing i spent the $15 extra and got the genuine one...

Anyone got some advice for drivers on windows.

It's a clone Arduino Uno R3 off Ali Express with CH340G usb chipset (ATMEGA328P-AU) and USB C (https://vi.aliexpress.com/item/1005007335850929.html).

The board powers up and has flashing light. But I just can't connect to it using the software, all signs point to it being the USB drivers.

I've tried different things (uninstalling drivers via pnputils) and currently this is what it looks like. I got to this stage after uninstalling via pnputils the FTDI driver as i noticed that was being used in the properties, previously where it was showing up under Ports (COM & LPT) but had a generic name and COM 3 but just wouldn't connect.

image.png.a014f26e4c5c489cd6b3744d1882a350.png

image.png.15649343ea3625bd405fcfe8d11b3f5a.png

I've run the CH341 driver install (as admin)(3.9.2024.09)

image.png.4b0fc6c68e1debb4c0d729bf4641a979.png

But always get this message.

image.png.34ef7c4a55492812d26a6ba0d6128d31.png

Uninstalling doesn't do anything as says device is not installed.

Tried updating drivers, but doesn't do anything.

Any advice on what to attempt next?

 

Posted

I saw this at work, plugged in a clone, and the regulator erupted in a tiny volcano. Generally they've been pretty good though.

Most the Nano clones I've got have CH340C. Here's what I've got for a MEGA2560 with CH340G

image.png.126a79d17ccb07a932457ffb42083fe7.png

image.png.471e23cf3239b413f52df7d8a6ee8e30.png

update: just checked - yes it does actually connect and upload Ok.

 

  • Like 1
Posted

Yonks ago there was a foofaraw where FTDI didn't like the clones, and borked and earlier driver to nobble the CH340's. There was some bad feelings about that, I think later version became more sane again. May want to check/remove the FTDI, test, maybe re-install it later?

Oh, oh dear.

image.png.bb6a7c5e31c16fede50659bc310bf725.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...